lhotari commented on code in PR #25221:
URL: https://github.com/apache/pulsar/pull/25221#discussion_r2773479544
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java:
##########
@@ -60,9 +60,13 @@ public void doFilter(
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:
CodeQL flags a security issue here.
--
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]