github-code-scanning[bot] commented on code in PR #4428:
URL: https://github.com/apache/hive/pull/4428#discussion_r1232862939
##########
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java:
##########
@@ -153,16 +156,12 @@
String clientUserName = null;
String clientIpAddress;
boolean requireNewCookie = false;
-
logTrackingHeaderIfAny(request);
try {
- if
(hiveConf.getBoolean(ConfVars.HIVE_SERVER2_XSRF_FILTER_ENABLED.varname,false)){
- boolean continueProcessing =
Utils.doXsrfFilter(request,response,null,null);
- if (!continueProcessing){
- LOG.warn("Request did not have valid XSRF header, rejecting.");
- return;
- }
+ if (!approveOnFilter(request, response)) {
Review Comment:
## Exceptions should not be thrown from servlet methods
<!--SONAR_ISSUE_KEY:AYjGZ7upWDNuxNnb69FR-->Handle the following exceptions
that could be thrown by "approveOnFilter": ServletException, IOException.
<p>See more on <a
href="https://sonarcloud.io/project/issues?id=apache_hive&issues=AYjGZ7upWDNuxNnb69FR&open=AYjGZ7upWDNuxNnb69FR&pullRequest=4428">SonarCloud</a></p>
[Show more
details](https://github.com/apache/hive/security/code-scanning/110)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]