-
Notifications
You must be signed in to change notification settings - Fork 6k
Add logging to CsrfTokenRequestHandler implementations #13626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @jzheaux, I would like to work on it if it is actual, but I will need some details. |
Hi @jzheaux , I'm currently working on the issue to add logging to CsrfTokenRequestHandler implementations. Could you confirm if modifying only these two classes ( |
Thanks for volunteering, @yybmion! I've updated the description with some additional information. |
@andreilisa, I realize it's been quite some time; still I wanted to reach out and apologize for missing your original offer. If you are still interested in helping, please join me in the review process when the PR is ready. |
@jzheaux, all good. |
@jzheaux Thank you! I've checked the updated description. |
It would be helpful to have logging to show what logical path CsrfTokenRequestHandler implementations are taking to read from and write tokens to the request.
For example, in
resolveCsrfTokenValue
it would likely be helpful to know where it found the csrf token (header or parameter). Inhandle
it would be helpful to know the name of the request attribute used to write the token to the request.Following this pattern, it would additionally be helpful in
XorCsrfTokenRequestAttributeHandler
to log when the method fails to find a token value and thus returnsnull
. For example if decoding fails:It would be nice to log that we are returning
null
since decoding failed:try { actualBytes = Base64.getUrlDecoder().decode(actualToken); } catch (Exception ex) { + this.logger.trace("Failed to find CSRF token since Base64 decoding failed", ex); return null; }
The text was updated successfully, but these errors were encountered: