rusackas commented on PR #40653:
URL: https://github.com/apache/superset/pull/40653#issuecomment-4661881365

   @aminghadersohi Thanks for the thorough security review โ€” addressed all 
three findings:
   
   - **MEDIUM (nbf not validated):** Confirmed and fixed. `decode()` reads 
claims individually here rather than calling `JWTClaims.validate()`, so it does 
not enforce temporal claims โ€” which is exactly why `exp` is re-checked 
manually. Added a symmetric Step 4b `nbf` check (RFC 7519 ยง4.1.5): a token 
whose `nbf` is in the future is rejected with reason `"Token not yet valid"`, 
mirroring the `exp` path (generic WARNING reason, sanitized DEBUG). Added 
`test_token_with_future_nbf_rejected`.
   - **LOW (alg: null untested + undocumented invariant):** Added 
`test_algorithm_null_rejected` (header `"alg": null` โ†’ rejected via the 
mismatch guard) and `test_algorithm_invariant_is_pinned_after_construction` 
asserting `verifier.algorithm is not None` post-construction, pinning the 
load-bearing invariant.
   - **LOW (warning test exercises helper, not constructor):** Added 
`test_warns_when_algorithm_not_configured_via_constructor`, which constructs 
the verifier with `algorithm=None` and asserts the weak-config WARNING fires 
through the `config_algorithm or explicit_algorithm` fallback in `__init__`.
   
   Pushed in a68342c.


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