Skip to content

block more encoded path traversals#3293

Merged
syphar merged 2 commits intorust-lang:mainfrom
syphar:sec
Apr 14, 2026
Merged

block more encoded path traversals#3293
syphar merged 2 commits intorust-lang:mainfrom
syphar:sec

Conversation

@syphar
Copy link
Copy Markdown
Member

@syphar syphar commented Apr 13, 2026

This fixes one of the cases, I'm not sure how to fix the others yet.

image

Notable:
in the URL we don't have any encoded chars, but in the path we try to get from storage, we have them.

Generally:
when I finished the repackage, and all is in archive storage, these errors won't happen any more, sqlite will just return 404.

@syphar syphar requested a review from a team as a code owner April 13, 2026 15:08
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Apr 13, 2026
Comment thread crates/bin/docs_rs_web/src/middleware/security.rs
Comment thread crates/bin/docs_rs_web/src/middleware/security.rs
@syphar syphar requested a review from GuillaumeGomez April 14, 2026 15:26
@syphar syphar merged commit f868061 into rust-lang:main Apr 14, 2026
20 of 21 checks passed
@syphar syphar deleted the sec branch April 14, 2026 16:31
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants