Printing the CsrfGuard's config leads to java.lang.reflect.InaccessibleObjectException in Java 17 #178
-
When using the print feature of the CsrfGuard, either by activating it in csrfguard.properties (org.owasp.csrfguard.Config.Print = true) or in web.xml (set context parameter "Owasp.CsrfGuard.Config.Print" to true), you get the following stacktrace, complaining that the "java.util.regex" package is not accessible via reflection:
Currently the only work-around is to not log the config, which should be fixed, I believe. I think the field "javascriptRefererPattern" of the org.owasp.csrfguard.config.PropertiesConfigurationProvider needs to be added to the "FIELDS_TO_EXCLUDE" constant array in org.owasp.csrfguard.util.CsrfGuardPropertiesToStringBuilder to prevent at least this error. Probably other fields of the PropertiesConfigurationProvider are also affected, like "pageTokenSynchronizationTolerance" (java.time.Duration) or "prng" (java.security.SecureRandom). How can I get this fixed ? :-) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Related ticket: #179 |
Beta Was this translation helpful? Give feedback.
Related ticket: #179