[pull] master from postalsys:master#175
Merged
pull[bot] merged 7 commits intoweiyilai:masterfrom Feb 5, 2026
Merged
Conversation
- Disable export resume to prevent corrupted files from append-mode writes with new gzip/encrypt stream headers - Revert notifyFrom default from null to now so new accounts do not emit webhooks for all existing messages during first sync - Use nullish coalescing for queueKeep so that 0 is not replaced by true - Validate exportId in UI routes with strict pattern instead of loose string max - Guard Export.fail() against deleted keys to prevent zombie Redis entries - Clean up stale active-set entries whose export hashes have expired - Call Export.cleanup() on worker startup to remove orphaned files - Cap Gmail export batch size at 50 to match Outlook behavior - Capture indexing start time once to ensure deterministic endDate filtering across folders - Remove swallowed mkdir error so failures propagate properly - Move NON_RETRYABLE_CODES Set to module scope to avoid per-error allocation - Use unsigned right shift for score tiebreaker to prevent negative values when hash byte >= 128 - Validate DecryptStream chunk length to prevent memory exhaustion from malformed files - Destroy file read stream on decrypt error to prevent resource leaks
Revert jQuery 4.0.0 to 3.7.1 for Bootstrap 4.6.2 compatibility. Add unsigned right shift to export test score calculation to match production logic. Wrap Gmail getLabels() in try-catch so label fetch failures degrade gracefully during exports. Reconcile missing Outlook batch responses so silently dropped requests produce explicit errors.
ETIMEDOUT and similar network errors are expected for long-polling connections to Google Pub/Sub. Downgrade these to warn level so they no longer appear in Bugsnag, and return instead of throwing so the poll loop restarts immediately without the 3s error delay.
- Strip clientState secret from Outlook subscription in account API response - Replace blocking scryptSync with async scrypt in stream encryption - Fix duplicate ExportFolders Joi label causing Swagger conflicts - Fix export ID examples to match 24-hex-char validation pattern - Remove dead resume endpoint, Export.resume() stub, and isResumable field
- Guard toTimestamp() against NaN to prevent invalid dates propagating - Replace manual .pipe() with stream.pipeline() in export worker for proper error propagation and stream cleanup - Add id field to virtual "All Mail" folders in Gmail and Outlook clients - Add isEncrypted to exportStatusSchema for API documentation accuracy - Remove dead listActive() method from Export class - Remove nonexistent resume endpoint from documentation - Fix nullish coalescing for queueKeep setting (|| -> ??) - Fix Redis .expire() missing key arg and missing .exec() in Gmail client - Wrap outlookSubscription JSON.parse in try/catch
Outlook client fixes: - Fix feedbackKey Redis multi chain: add missing key arg to .expire() and append .exec() - Remove wrong /v1.0/ prefix from getMessages batch URL - Replace requestWithRetry with request in batch loop to eliminate double retry amplification Export worker: - Add export QueueEvents init and close on shutdown - Make exportMaxMessages and exportMaxSize settings-driven and disabled by default (0 = unlimited), allowing large mailbox exports - Enforce limits only when explicitly set via settings API Other fixes: - Fix validUidValidity to reject NaN, Infinity, 0, and negative values - Fix typo in account.hbs that locked flush button after error Tests: add 10 tests for export limit enforcement logic
Use exportIdSchema for the UI export status route instead of a loose string validator, matching the delete and download routes. Apply the defined DEFAULT_EXPORT_MAX_MESSAGES (500k) and DEFAULT_EXPORT_MAX_SIZE (10GB) constants as actual fallback defaults instead of allowing unlimited exports when settings are unconfigured.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )