Repository navigation
Conversation
… trap
Two more pieces of hard-won detail that existed only in an uncommitted working
tree. Documentation only, 40 insertions, no code touched.
**User service `/verify/`.** The resend-verification-email call, whose only
caller is `UserProfileForm.js:86` (`onResendEmail`). Two curl pitfalls that
both produce the same unhelpful `406 "Missing User ID"`: the body must carry
`Content-Type: application/json` (curl -d defaults to form-encoded, so the
server's JSON parser never populates `id`), and the id is the **bare**
username (`olson`), not the full `olson@patricbrc.org`. Also warns against
confusing it with the Express `/verify_refresh` and `/verify_failure` landing
pages, which are a different thing entirely.
**Email routes and formidable.** `reportProblem.js` and
`notifySubmitSequence.js` parse multipart via **express-formidable**, and
`formidable` is never imported directly — the root-level dep exists only to
pin what the unmaintained wrapper resolves. formidable v2 renamed
`file.name`->`file.originalFilename` and `file.path`->`file.filepath`, so v1-era
code silently gets `undefined` and attachments break with
`fs.createReadStream(undefined)`. Includes the forward-looking warning that v3
is ESM and turns every field value into an array.
Verified against the tree rather than transcribed:
- UserProfileForm.js:86 is the sole /verify/ caller; the request really does
send {id: localStorage.userid} with an explicit JSON content-type
- neither route requires formidable directly; both read
`f.originalFilename || f.name` and `f.filepath || f.path`
- express-formidable ^1.2.0 with formidable ^2.1.2 pinned at root, 2.1.5
installed
- formidable latest is 3.5.4 with "type": "module", confirming the ESM
warning is current rather than speculative
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
Two pieces of hard-won detail that existed only in an uncommitted working tree.
Documentation only — 40 insertions, 0 deletions, no code touched.
User service
/verify/endpointThe resend-verification-email call. Its only caller is
UserProfileForm.js:86(
onResendEmail), shown when a logged-in user's account email is unverified.Two curl pitfalls, both of which produce the same unhelpful
406 "Missing User ID":Content-Type: application/json—curl -ddefaults toform-encoded, so the server's JSON parser never populates
idolson), not the fullolson@patricbrc.orgAlso warns against confusing it with the Express
/verify_refreshand/verify_failureroutes, which are web-app landing pages for the email round-trip, not the user-service API.
Email routes and the formidable v2 rename
routes/reportProblem.jsandroutes/notifySubmitSequence.jsparse multipart posts viaexpress-formidable.
formidableis never imported directly — the root-level dependencyexists only to pin what the unmaintained wrapper resolves.
formidable v2 renamed
file.name→file.originalFilenameandfile.path→file.filepath. Code written against v1 silently getsundefined, which had brokenproblem-report attachments with
fs.createReadStream(undefined). Includes theforward-looking note that v3 is ESM and turns every
req.fieldsvalue into an array.Verified, not transcribed
Every claim checked against the current tree:
UserProfileForm.js:86is the sole/verify/callerpublic/js/p3/{id: localStorage.userid}with explicit JSON content-typeformidabledirectlyf.originalFilename || f.name,f.filepath || f.pathreportProblem.js:55-56express-formidable ^1.2.0,formidable ^2.1.2pinned at root"type": "module"That last one matters: the ESM warning is a live hazard, not speculation — the same
CJS/ESM trap that took prod down via sanitize-html on Node 22.
🤖 Generated with Claude Code