Skip to content

Commit

Permalink
HDFS-13636. Cross-Site Scripting vulnerability in HttpServer2
Browse files Browse the repository at this point in the history
(Contributed by Haibo Yan via Daniel Templeton)

Change-Id: I28edde8125dd20d8d270f0e609d1c04d8173c8b7
  • Loading branch information
templedf committed Jun 1, 2018
1 parent 1be05a3 commit cba3194
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1420,8 +1420,11 @@ public static boolean hasAdministratorAccess(

if (servletContext.getAttribute(ADMINS_ACL) != null &&
!userHasAdministratorAccess(servletContext, remoteUser)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "User "
+ remoteUser + " is unauthorized to access this page.");
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Unauthenticated users are not " +
"authorized to access this page.");
LOG.warn("User " + remoteUser + " is unauthorized to access the page "
+ request.getRequestURI() + ".");
return false;
}

Expand Down

0 comments on commit cba3194

Please sign in to comment.