Skip to content
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

Add support for log encoding #162

Open
niceone548 opened this issue May 7, 2020 · 1 comment
Open

Add support for log encoding #162

niceone548 opened this issue May 7, 2020 · 1 comment
Labels
P4 type=addition A new feature

Comments

@niceone548
Copy link

It would be a nice if we had the option to encode / escape our log output.
Something like:
logger.atInfo().withCause(exception).encode().log("Log message with: %s", argument);
logger.atInfo().withCause(exception)..log("Log message with: %s", argument).encode();
logger.atInfo().withCause(exception).logEncoded("Log message with: %s", argument);
This way developers would become more security aware, and log forging would become allot harder overall.
Owasp already has an encoder for this:
https://mvnrepository.com/artifact/org.owasp.encoder/encoder/1.2.2
If you don't know what log forging is give this a read:
http://www.jtmelton.com/2010/09/21/preventing-log-forging-in-java/

@hagbard
Copy link
Contributor

hagbard commented May 7, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 type=addition A new feature
Projects
None yet
Development

No branches or pull requests

3 participants