Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed placeholder text for imager used. #18
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
base: feature/removeImageJ
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changed placeholder text for imager used. #18
Changes from all commits
aa84a81File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning on line 59 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck
Check notice on line 61 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 62 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 64 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 65 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 66 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 67 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 69 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 71 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 72 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 73 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 74 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 75 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 76 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 77 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 78 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck
Check notice on line 80 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck
Check notice on line 80 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.sizes.MethodLengthCheck
Check notice on line 80 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck
Check warning on line 86 in src/main/java/com/scitequest/martin/view/ExportGui.java
EI_EXPOSE_REP2
Raw output
Check notice on line 132 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck
Check warning on line 144 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 144 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 144 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 144 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 146 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 154 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 154 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 154 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 154 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 157 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 157 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 159 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 161 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 164 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 172 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 181 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 181 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 188 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 188 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 198 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 200 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 200 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 208 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 215 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 225 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 227 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 227 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 233 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 235 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 239 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 241 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 252 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 254 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 254 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 260 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 262 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 265 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 267 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 273 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 275 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 275 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 282 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 284 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 289 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 291 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 301 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 303 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 303 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 309 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 311 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 311 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 314 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 314 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 319 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 321 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 321 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 324 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 332 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 334 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 334 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 340 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 342 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 350 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 352 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 355 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 363 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 365 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 370 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 370 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 370 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 370 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 374 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 376 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 384 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check notice on line 398 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck
Check warning on line 399 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 400 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 409 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 409 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 409 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 418 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 418 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 418 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 427 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 427 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 427 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 427 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 436 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 438 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 438 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 438 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 447 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 449 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 449 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 449 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 449 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 453 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check notice on line 485 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck
Check warning on line 505 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck
Check notice on line 569 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck
Check warning on line 576 in src/main/java/com/scitequest/martin/view/ExportGui.java
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
Check warning on line 501 in src/main/java/com/scitequest/martin/view/ProjectGui.java
UPM_UNCALLED_PRIVATE_METHOD
Raw output
Check warning on line 606 in src/main/java/com/scitequest/martin/view/ProjectGui.java
CRLF_INJECTION_LOGS
Raw output
When data from an untrusted source is put into a logger and not neutralized correctly, an attacker could forge log entries or include malicious content. Inserted false entries could be used to skew statistics, distract the administrator or even to implicate another party in the commission of a malicious act. If the log file is processed automatically, the attacker can render the file unusable by corrupting the format of the file or injecting unexpected characters. An attacker may also inject code or other commands into the log file and take advantage of a vulnerability in the log processing utility (e.g. command injection or XSS). Code at risk: String val = request.getParameter("user"); String metadata = request.getParameter("metadata"); [...] if(authenticated) { log.info("User " + val + " (" + metadata + ") was authenticated successfully"); } else { log.info("User " + val + " (" + metadata + ") was not authenticated"); } A malicious user could send the metadata parameter with the value: "Firefox) was authenticated successfully\r\n[INFO] User bbb (Internet Explorer". Solution: You can manually sanitize each parameter. log.info("User " + val.replaceAll("[\r\n]","") + " (" + userAgent.replaceAll("[\r\n]","") + ") was not authenticated"); You can also configure your logger service to replace new line for all message events. Here is sample configuration for LogBack using the replace function [https://logback.qos.ch/manual/layouts.html#replace]. <pattern>%-5level - %replace(%msg){'[\r\n]', ''}%n</pattern> Finally, you can use a logger implementation that replace new line by spaces. The project OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging] has an implementation for Logback and Log4j. References CWE-117: Improper Output Neutralization for Logs [https://cwe.mitre.org/data/definitions/117.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://cwe.mitre.org/data/definitions/93.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://logback.qos.ch/manual/layouts.html#replace] OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging]Check warning on line 616 in src/main/java/com/scitequest/martin/view/ProjectGui.java
CRLF_INJECTION_LOGS
Raw output
When data from an untrusted source is put into a logger and not neutralized correctly, an attacker could forge log entries or include malicious content. Inserted false entries could be used to skew statistics, distract the administrator or even to implicate another party in the commission of a malicious act. If the log file is processed automatically, the attacker can render the file unusable by corrupting the format of the file or injecting unexpected characters. An attacker may also inject code or other commands into the log file and take advantage of a vulnerability in the log processing utility (e.g. command injection or XSS). Code at risk: String val = request.getParameter("user"); String metadata = request.getParameter("metadata"); [...] if(authenticated) { log.info("User " + val + " (" + metadata + ") was authenticated successfully"); } else { log.info("User " + val + " (" + metadata + ") was not authenticated"); } A malicious user could send the metadata parameter with the value: "Firefox) was authenticated successfully\r\n[INFO] User bbb (Internet Explorer". Solution: You can manually sanitize each parameter. log.info("User " + val.replaceAll("[\r\n]","") + " (" + userAgent.replaceAll("[\r\n]","") + ") was not authenticated"); You can also configure your logger service to replace new line for all message events. Here is sample configuration for LogBack using the replace function [https://logback.qos.ch/manual/layouts.html#replace]. <pattern>%-5level - %replace(%msg){'[\r\n]', ''}%n</pattern> Finally, you can use a logger implementation that replace new line by spaces. The project OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging] has an implementation for Logback and Log4j. References CWE-117: Improper Output Neutralization for Logs [https://cwe.mitre.org/data/definitions/117.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://cwe.mitre.org/data/definitions/93.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://logback.qos.ch/manual/layouts.html#replace] OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging]Check warning on line 628 in src/main/java/com/scitequest/martin/view/ProjectGui.java
CRLF_INJECTION_LOGS
Raw output
When data from an untrusted source is put into a logger and not neutralized correctly, an attacker could forge log entries or include malicious content. Inserted false entries could be used to skew statistics, distract the administrator or even to implicate another party in the commission of a malicious act. If the log file is processed automatically, the attacker can render the file unusable by corrupting the format of the file or injecting unexpected characters. An attacker may also inject code or other commands into the log file and take advantage of a vulnerability in the log processing utility (e.g. command injection or XSS). Code at risk: String val = request.getParameter("user"); String metadata = request.getParameter("metadata"); [...] if(authenticated) { log.info("User " + val + " (" + metadata + ") was authenticated successfully"); } else { log.info("User " + val + " (" + metadata + ") was not authenticated"); } A malicious user could send the metadata parameter with the value: "Firefox) was authenticated successfully\r\n[INFO] User bbb (Internet Explorer". Solution: You can manually sanitize each parameter. log.info("User " + val.replaceAll("[\r\n]","") + " (" + userAgent.replaceAll("[\r\n]","") + ") was not authenticated"); You can also configure your logger service to replace new line for all message events. Here is sample configuration for LogBack using the replace function [https://logback.qos.ch/manual/layouts.html#replace]. <pattern>%-5level - %replace(%msg){'[\r\n]', ''}%n</pattern> Finally, you can use a logger implementation that replace new line by spaces. The project OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging] has an implementation for Logback and Log4j. References CWE-117: Improper Output Neutralization for Logs [https://cwe.mitre.org/data/definitions/117.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://cwe.mitre.org/data/definitions/93.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://logback.qos.ch/manual/layouts.html#replace] OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging]Check warning on line 645 in src/main/java/com/scitequest/martin/view/ProjectGui.java
CRLF_INJECTION_LOGS
Raw output
When data from an untrusted source is put into a logger and not neutralized correctly, an attacker could forge log entries or include malicious content. Inserted false entries could be used to skew statistics, distract the administrator or even to implicate another party in the commission of a malicious act. If the log file is processed automatically, the attacker can render the file unusable by corrupting the format of the file or injecting unexpected characters. An attacker may also inject code or other commands into the log file and take advantage of a vulnerability in the log processing utility (e.g. command injection or XSS). Code at risk: String val = request.getParameter("user"); String metadata = request.getParameter("metadata"); [...] if(authenticated) { log.info("User " + val + " (" + metadata + ") was authenticated successfully"); } else { log.info("User " + val + " (" + metadata + ") was not authenticated"); } A malicious user could send the metadata parameter with the value: "Firefox) was authenticated successfully\r\n[INFO] User bbb (Internet Explorer". Solution: You can manually sanitize each parameter. log.info("User " + val.replaceAll("[\r\n]","") + " (" + userAgent.replaceAll("[\r\n]","") + ") was not authenticated"); You can also configure your logger service to replace new line for all message events. Here is sample configuration for LogBack using the replace function [https://logback.qos.ch/manual/layouts.html#replace]. <pattern>%-5level - %replace(%msg){'[\r\n]', ''}%n</pattern> Finally, you can use a logger implementation that replace new line by spaces. The project OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging] has an implementation for Logback and Log4j. References CWE-117: Improper Output Neutralization for Logs [https://cwe.mitre.org/data/definitions/117.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://cwe.mitre.org/data/definitions/93.html] CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') [https://logback.qos.ch/manual/layouts.html#replace] OWASP Security Logging [https://github.com/javabeanz/owasp-security-logging]Uh oh!
There was an error while loading. Please reload this page.