Skip to content

Commit

Permalink
Issue SasanLabs#316: Reformat code with spotless apply
Browse files Browse the repository at this point in the history
  • Loading branch information
jpralle committed Apr 19, 2022
1 parent 209573a commit ff1ca10
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ff1ca10

Please sign in to comment.