Repository navigation
fix(#581,#582,#583,#584): SQL sanitization, query retries, CDN cache, compression - #591
Merged
ritaifeoluwa merged 3 commits intoOct 19, 2026
Merged
Conversation
Detects SQL injection patterns (SELECT/INSERT/UPDATE/DROP/UNION, comment markers, time-based attacks) and rejects malicious inputs with 400. Sanitizes string inputs by escaping quotes and removing null bytes.
queryWithRetry() wraps database queries with automatic retry on transient errors (connection issues, timeouts, deadlocks). Uses exponential backoff with jitter and bounded attempts. Integrates with existing transaction.js deadlock retry logic.
…esponse compression config - SmartDropLabs#583: Surrogate-Control and CDN-Cache-Control headers for CDN edge caching. Cacheable routes (prices, airdrops, metrics) get max-age. Sensitive routes (auth, keys, webhooks) get no-store. - SmartDropLabs#584: Vary: Accept-Encoding header for proper compression negotiation. Response compression already enabled via compression() middleware.
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 #581
Closes #582
Closes #583
Closes #584
What changed
[security] No input sanitization for SQL #581: SQL input sanitization middleware — detects injection patterns (SELECT/DROP/UNION, comments, time-based attacks), rejects with 400, sanitizes string inputs.
[bug] Transaction retries not implemented #582: Database query retry wrapper —
queryWithRetry()with exponential backoff + jitter for transient errors (connection, timeout, deadlock). Integrates with existing transaction.js.[performance] No CDN for API responses #583: CDN cache headers —
Surrogate-ControlandCDN-Cache-Controlfor edge caching. Cacheable routes get max-age, sensitive routes get no-store.[enhancement] Add API response compression #584: Response compression config —
Vary: Accept-Encodingheader for proper compression negotiation alongside existingcompression()middleware.