Repository navigation
Fix sweep findings: user deletion, column mapping, upload/test-send validation, hashed tokens - #12
Merged
Merged
Conversation
…hashed tokens
- Deleting a user who created templates or campaigns no longer fails with 409:
created_by (and invited_by) are set to NULL (V24).
- Column mapping works: an upload whose headers aren't email/first_name/last_name
keeps its file (pending_upload_files, cleaned up after a day) and reports
needsMapping with a first-row preview. POST /api/uploads/{id}/map imports it
with the mapping and returns the real counts; bad mappings get 400, an
imported upload 409, a full import pool 503.
- POST /api/templates/upload-html accepts only .html/.htm text files (else 400).
- Campaign test send validates testEmails (non-empty, valid addresses).
- Password reset and email verification tokens are stored as SHA-256 hashes;
existing tokens are cleared by V25.
- The mock email sender logs the email's text and links, so the invite's
temporary password is visible in mock mode.
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.
Fixes everything the last end-to-end sweep turned up.
Bugs
templates.created_by,campaigns.created_byandusers.invited_byON DELETE SET NULL, so their content stays and just loses its creator.POST /api/uploads/{id}/maponly stored the mapping. Now an upload whose headers aren'temail/first_name/last_namekeeps its file (newpending_upload_filestable, deleted after import or after a day), and its status showsneedsMapping: true, the columns and a first-row preview./mapimports the file with the mapping on the import pool and returns the real counts. The API contract is unchanged; both{"E-mail": "email"}and{"email": "E-mail"}are accepted, and"ignore"skips a column. Bad mappings get 400 (the upload can be mapped again), an already-imported upload 409, a full import pool 503. Works for CSV, XLSX and XLS. Documented in the README.POST /api/templates/upload-htmlaccepted any file. Now only.html/.htmtext files (read as UTF-8); anything else gets 400.testEmails. The constraints were on the record but@Validwas missing; now 400.Minor
mock-emailmode the log shows the email's text and links rather than the first 200 characters of HTML, so an invite's temporary password and reset links are visible.Testing
ColumnMappingIntegrationTest(CSV and XLSX, both mapping directions, bad mappings, re-mapping, 404/409),SweepFixesIntegrationTest(user deletion, HTML upload, test send),MockEmailSenderTextTest;AuthServiceTestchecks that only the hash is stored.