Repository navigation
tests/release-upload: refuse dotted URLs, not a dotted scratch path - #593
Merged
derekross merged 1 commit intoNov 10, 2026
Merged
Conversation
The stand-in curl 404s any name with a dot component, as
tools/server/releases-nginx.sh's `location ~ /\. { deny all; }` does
for the upload's .<version>.partial staging. It tested the whole local
file path ($S/<url path>), though, so when $TMPDIR (and with it the
scratch "server") sat under a dot directory, such as a checkout under
~/.something with TMPDIR inside it, every file 404ed and the test
failed at "a good bundle uploads" with "the published files don't
match". tools/release-upload was never involved: its "/." check
(manifest.json's file paths) sees only bundle-relative paths.
The stand-in now applies the rule to the URL's path, as nginx matches
the request URI. The scratch directory always sits under a dot
directory, so every run covers this, and a new check confirms a dotted
URL (a staging directory) is still refused.
Asked on derekross#586.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 9 tasks
Owner
|
Thank you, this answers what I asked on #586 exactly, and it was the test's stand-in rather than the tool, as you say. I reproduced it here: with |
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
…erekross#593) The test's stand-in refused any path with a dot in it, so "a good bundle uploads" failed whenever TMPDIR sat under a dotted directory. It now refuses dotted URLs only, which is what the tool itself guards. Tests only.
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.
What and why
On #586 the maintainer asked whether
tests/release-uploadfails on main when the path contains/.. It does, but the cause is the test's stand-in server, nottools/release-upload.The stand-in curl (
tests/release-upload:118on main) 404s any name with a dot component, to matchtools/server/releases-nginx.sh'slocation ~ /\. { deny all; }, which keeps the upload's.<version>.partialstaging directory from being served. It tested the whole local file path ($S/<url path>), though, and$Slives under$(mktemp -d). So when$TMPDIRsits under a dot directory (for example a checkout'slogs/tmpin~/.something/), every file 404s and the test fails at "a good bundle uploads" with "the published files don't match". The checkout's own path doesn't matter;$TMPDIRdoes.tools/release-uploadis unchanged. Its/.check (line 159) refuses dotted paths inmanifest.json's file list, which are always relative to the bundle, and it stays as it is.The change:
$(mktemp -d)/.scratch, so every run (CI included) covers a dot path;releases/cheetah/.<version>.partial/junk.Evidence (
TMPDIRunder each checkout):not ok - a good bundle uploads; from a path without a dot: 8/8 oknot ok - a good bundle uploadsnot ok - a staging directory is never served …Device and build
uname -r): n/aChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpasses (492 ok, 0 not ok, run from a dot path and from a path without one)tests/packages: no package touchedversionbumped, and the new version is in the commit subject (no package changed)Co-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportNot applicable: a test-only change (CONTRIBUTING.md §6.5).
Generated with Claude Opus 5.5 in T3 Code Nightly