Skip to content

Fix trailing-slash behavior with O_NOFOLLOW. - #419

Merged
sunfishcode merged 1 commit into
mainfrom
sunfishcode/path-resolution
Aug 20, 2026
Merged

Fix trailing-slash behavior with O_NOFOLLOW.#419
sunfishcode merged 1 commit into
mainfrom
sunfishcode/path-resolution

Conversation

@sunfishcode

Copy link
Copy Markdown
Member

When a path has a trailing slash, the path component just before the trailing slash is not considered a final path component for the purposes of the OS O_NOFOLLOW flag. Fix cap-primitives to avoid re-appending a trailing slash when resolving paths with a trailing slash so that it doesn't inadvertently disable O_NOFOLLOW.

This fixes GHSA-hp8f-xmx4-4qrg.

When a path has a trailing slash, the path component just before
the trailing slash is not considered a final path component for the
purposes of the OS `O_NOFOLLOW` flag. Fix cap-primitives to avoid
re-appending a trailing slash when resolving paths with a trailing
slash so that it doesn't inadvertently disable `O_NOFOLLOW`.

This fixes GHSA-hp8f-xmx4-4qrg.
@sunfishcode
sunfishcode merged commit a8c9321 into main Aug 20, 2026
8 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant