Fix 8 bugs found in code review
- auth/login.py: guard against missing JSON body (get_json silent=True, empty-string check) - app.py: replace infinite redirect with 404 for unknown /api/* and /setup/* paths - tools/jwtdecoder.py: add algorithms list to jwt.decode() for PyJWT 2.x compatibility - util/setup_routes.py: call reset_pool() after save_config() so pool re-initialises with new DB credentials - util/logger.py: set ERROR level on error.log handler so it no longer receives INFO/WARNING messages - LoginForm.jsx: remove dead navigate() call that was immediately overridden by window.location.href - main.jsx: remove base.css, dark.css, light.css that were already imported in App.jsx (duplicate imports) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ def decode_jwt():
|
||||
data = request.get_json()
|
||||
token = data.get("token", "").strip()
|
||||
header = jwt.get_unverified_header(token)
|
||||
payload = jwt.decode(token, options={"verify_signature": False})
|
||||
payload = jwt.decode(token, options={"verify_signature": False}, algorithms=["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES512"])
|
||||
|
||||
expired = False
|
||||
if "exp" in payload:
|
||||
|
||||
Reference in New Issue
Block a user