Repository navigation
fix(#523,#524,#525,#526): input validation, logging config, cache headers, MFA - #585
Merged
ritaifeoluwa merged 5 commits intoOct 19, 2026
Merged
Conversation
Validates string fields in request body/query/params against per-field maximum lengths (address: 56, memo: 28, name: 200, etc.). Rejects oversized inputs with 400 and detailed error messages. Prevents buffer overflow and database issues.
Added setLogLevel() and getCurrentLogLevel() functions with validation. Log level can now be changed at runtime via API, not just at startup via LOG_LEVEL env var. Valid levels: debug, info, warn, error.
Sets appropriate Cache-Control headers: no-store for auth/keys/webhooks, public with max-age for prices/airdrops/metrics, private for everything else. Includes stale-while-revalidate for cacheable paths.
RFC 6238 TOTP implementation with secret generation, code verification (clock drift tolerance ±30s), otpauth:// URI for QR codes, and requireMfa middleware for sensitive operations. Uses timing-safe comparison.
|
@franciscodes-ops Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #523
Closes #524
Closes #525
Closes #526
What changed
[security] No input length validation #523: Input length validation middleware with per-field max lengths (address: 56, memo: 28, name: 200, etc.). Rejects oversized inputs with 400.
[bug] Logging level not configurable #524: Runtime log level configuration via
setLogLevel()/getCurrentLogLevel(). Valid levels: debug, info, warn, error.[performance] No response caching headers #525: Cache-Control headers middleware — no-store for auth/keys/webhooks, public with max-age for prices/airdrops/metrics, private default.
[security] No multi-factor authentication #526: TOTP-based MFA (RFC 6238) with secret generation, verification (±30s drift), otpauth:// URI, and
requireMfamiddleware.