bito-code-review[bot] commented on PR #39645:
URL: https://github.com/apache/superset/pull/39645#issuecomment-4787482843

   <!-- Bito Reply -->
   The flagged issue is correct. The current exception handler in 
`superset/mcp_service/jwt_verifier.py` does not catch `OverflowError`, which 
can be raised when casting a non-finite `exp` claim (like `inf`) to an integer. 
To resolve this, you should include `OverflowError` in the exception tuple at 
line 701.
   
   Here is the corrected code snippet:
   
   ```python
           except (ValueError, JoseError, KeyError, AttributeError, TypeError, 
OverflowError):
               reason = "Token validation failed"
               _jwt_failure_reason.set(reason)
               logger.debug("Token validation failed")
               return None
   ```
   
   Regarding other comments on this PR: there are no other review comments in 
the provided `pr_comments.csv` file. If you have additional concerns or 
comments you would like me to review, please provide them.
   
   **superset/mcp_service/jwt_verifier.py**
   ```
   except (ValueError, JoseError, KeyError, AttributeError, TypeError, 
OverflowError):
               reason = "Token validation failed"
               _jwt_failure_reason.set(reason)
               logger.debug("Token validation failed")
               return None
   ```


-- 
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]

Reply via email to