github-advanced-security[bot] commented on code in PR #25221:
URL: https://github.com/apache/pulsar/pull/25221#discussion_r2773155560


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java:
##########
@@ -60,9 +60,13 @@
         try {
             doFilter = 
authenticationService.authenticateHttpRequest(httpRequest, httpResponse);
         } catch (Exception e) {
-            httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, 
"Authentication required");
+            String msg = e.getMessage();
+            if (msg == null) {
+                msg = "Authentication required";
+            }
+            httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, msg);

Review Comment:
   ## Information exposure through an error message
   
   [Error information](1) can be exposed to an external user.
   
   [Show more 
details](https://github.com/apache/pulsar/security/code-scanning/184)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to