You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): refuse a Blob token that names no store, at boot
BLOB_READ_WRITE_TOKEN was typed as any non-empty string, so a truncated,
stale or wrong-kind value passed validation, satisfied the FILESTORE_DRIVER
derivation, and then threw from storeIdFrom on the first request that
touched an upload — a 500 on a live board, long after the deploy went green.
That is the boot-then-fail-on-first-upload shape this branch exists to
remove, reintroduced through the token path, and on a linked project it
turns a board that BLOB_STORE_ID alone would have served into a broken one.
The shape check the driver already applied now lives in the schema, so it
fires at boot next to every other configuration error and `community
env:check` reports it. Nothing new is being judged: storeIdFrom rejected
exactly these tokens already, and both callers now share one parser so the
two cannot drift.
Treating an unparseable token as absent whenever a store id is present was
the alternative. It loses on two counts: it cannot help a board with only a
bad token, where nothing else would ever catch it, and where it does apply
it silently ignores a credential the operator typed — while a stale token
for the right store and a garbage one are indistinguishable to us, so it
would quietly write to a store the operator may not have meant.
Four smaller things from the same review. A store id is trimmed before the
SDK or url() sees it, so a pasted value with whitespace cannot produce a
malformed host or fall to the token path on a mismatched comparison. The
intercepted no-credentials message is raised only on the store-id path,
since the token path never asked OIDC for anything. del hands the SDK a copy
of the auth options rather than the driver's own object. And the sentence
the driver matches on is now one exported constant, with a test asserting
the installed @vercel/blob still contains it, so a reword upstream fails
rather than silently costing a good error message.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015WBLHKvRatuUufybYpgER1
0 commit comments