dguiney edited a comment on issue #7: BEANUTILS-520: Mitigate CVE-2014-0114 by 
enabling SuppressPropertiesB…
URL: https://github.com/apache/commons-beanutils/pull/7#issuecomment-537176485
 
 
   I upgraded my lib to 1.9.4 and added the suggested opt-out to my code.
   
   But PropertyUtilsBean.getSimpleProperty() is still throwing a 
"NoSuchMethodException" when trying to get the property of "class".
   
   My code is 
   ```java        BeanMap beanMap = new BeanMap(oldObject);
           PropertyUtilsBean propertyUtils = new PropertyUtilsBean();
           for (Object propertyNameObject : beanMap.keySet()) {
               String propertyName = (String) propertyNameObject;
               try {
                   myObjPropertyValue = propertyUtils.getProperty(myObject, 
propertyName);
               } catch (IllegalAccessException | InvocationTargetException | 
NoSuchMethodException e) {
                   Errors errors = ErrorUtils.createBindException();
                   errors.reject("Error occured while returing property values 
and propertyName: %s", propertyName);
                   throw new ErrorEnabledRuntimeException(errors);
               }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to