forked from SasanLabs/VulnerableApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue SasanLabs#316: Reformat code with spotless apply
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ | |
* This class contains XSS vulnerabilities which are present in Image Tag attribute. | ||
* | ||
* @author KSASAN [email protected] | ||
* @author jpralle [email protected] | ||
* @author t0bel1x [email protected] | ||
* @author pdelmonego [email protected] | ||
*/ | ||
@VulnerableAppRestController(descriptionLabel = "XSS_VULNERABILITY", value = "XSSInImgTagAttribute") | ||
public class XSSInImgTagAttribute { | ||
|
@@ -179,8 +182,10 @@ public ResponseEntity<String> getVulnerablePayloadLevelSecure( | |
@RequestParam(PARAMETER_NAME) String imageLocation) { | ||
String vulnerablePayloadWithPlaceHolder = "<img src=\"%s\" width=\"400\" height=\"300\"/>"; | ||
|
||
if ((imageLocation.startsWith(IMAGE_RESOURCE_PATH) && imageLocation.endsWith(FILE_EXTENSION)) | ||
|| (imageLocation.contains(Constants.NULL_BYTE_CHARACTER) && allowedValues.contains(imageLocation))) { | ||
if ((imageLocation.startsWith(IMAGE_RESOURCE_PATH) | ||
&& imageLocation.endsWith(FILE_EXTENSION)) | ||
|| (imageLocation.contains(Constants.NULL_BYTE_CHARACTER) | ||
&& allowedValues.contains(imageLocation))) { | ||
|
||
String payload = | ||
String.format( | ||
|