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(url-path,github): stop the guards rejecting and rewriting legal values
Three false rejections the guards introduced, all verified live before changing:
GitHub label names legitimately contain slashes -- area/apiserver, kind/bug --
and both the literal and encoded forms return 200 with the same label id, with
GitHub echoing the literal form as canonical. remove_label was using the
single-segment guard, so it hard-threw on a label GitHub accepts.
safeUrlPath trimmed each segment, so a Supabase key of 'folder/ report .csv'
was silently rewritten to a different object -- 404 or the wrong file, with no
error. Supabase's own server regex permits a literal space in both object keys
and bucket names. Now only the whole value is trimmed. This cannot re-open
traversal: the URL parser pops a segment only when it is exactly '..', and an
encoded space keeps it inert.
A trailing slash on a GitHub contents path used to work -- GitHub 302s to the
slash-free form and fetch follows it -- and get_tree's own description invites
a directory path. Stripped at the GitHub callsites via a local helper rather
than weakening safeUrlPath for its other ~700 callers.
Also: a number reaching a string param became '' and threw 'X is required'
even though it was supplied. That regressed the 53 sites whose baseline was a
bare interpolation. Now coerced with String(), with null and undefined
rejected before coercion so they still throw rather than becoming 'null'.
0 commit comments