Skip to content

Conversation

@PeakPy
Copy link

@PeakPy PeakPy commented Feb 11, 2026

Description

Replaces python-jose with PyJWT to address known security vulnerabilities (CVE-related to alg=none bypass and denial-of-service).

Partially addresses #248 (JWT security concern)

Changes

  • Removed python-jose>=3.3.0 dependency
  • Added PyJWT>=2.8.0 dependency
  • Updated JWT encoding/decoding in security.py to use PyJWT API
  • Updated exception handling in logout.py to catch jwt.PyJWTError
  • Converted exp claim to Unix timestamp for PyJWT compliance
  • Updated uv.lock with new dependency tree

Tests

All existing tests pass (11/11):

  • Authentication flow
  • Token creation and verification
  • User CRUD operations

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project (ruff, mypy pass)
  • I have added necessary documentation (if appropriate)
  • I have added tests that cover my changes (existing tests validate behavior)
  • All new and existing tests passed

Additional Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant