Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update java/ql/src/experimental/Security/CWE/CWE-117/LogInjection.help
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
  • Loading branch information
dellalibera and Marcono1234 authored Jul 3, 2020
commit e4a5154b3db286634c0cb906dd8b6de1188d5706
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ other forms of HTML injection.
<p>In the example, a username, provided by the user, is logged using `logger.warn` (from `org.slf4j.Logger`).
In the first case (`/bad` endpoint), the username is logged without any sanitization.
If a malicious user provides `Guest'%0AUser:'Admin` as a username parameter,
the log entry will be splitted in two different lines, where the first line will be `User:'Guest', while the second one will be `User:'Admin'`.
the log entry will be splitted in two different lines, where the first line will be `User:'Guest'`, while the second one will be `User:'Admin'`.
</p>
<p> In the second case (`/good` endpoint), <code>replace</code> is used to ensure no line endings are present in the user input.
If a malicious user provides `Guest'%0AUser:'Admin` as a username parameter,
Expand Down