You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(security): add pre-decode payload size check and key_type validation
Security improvements from code review:
1. Pre-decode payload size check:
- Check base64 string length BEFORE decoding to prevent memory exhaustion
- Quick rejection if base64 > 13.3MB (would decode to > 10MB)
- Prevents attacker from forcing server to decode large payloads into memory
2. Input validation for key_type:
- Validate key_type is 'legacy' or 'modern' at API layer
- Prevents potential issues from unexpected values
Addresses code review security findings.
Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
0 commit comments