Skip to content

Commit

Permalink
Fix for XSS vulnerability Bug 546816
Browse files Browse the repository at this point in the history
Reflected XSS vulnerability in the __format URL parameter
It should also take care of the other parameters.

tested with associate unit test.


Signed-off-by: shiheng guan <guans@opentext.com>
  • Loading branch information
shiheng guan committed Jul 24, 2019
1 parent d56caca commit 91ef718
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ public static String getParameter( HttpServletRequest request,
{
}
}
return request.getParameter( parameterName );
return htmlEncode( request.getParameter( parameterName ) );
}

/**
Expand Down Expand Up @@ -2258,7 +2258,7 @@ public static String decodeFilePath( HttpServletRequest request,
{
return null;
}

filePath = htmlDecode( filePath );
if ( isEncodedPaths( request ) )
{
return decodeBase64( filePath );
Expand Down

0 comments on commit 91ef718

Please sign in to comment.