Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: avoid using format when building asset paths and double-check path #228

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

Angelmmiguel
Copy link
Contributor

The handle_assets handler relies on uri.path(), which it's already sanitized by actix. We introduced a new set of checks to confirm the filepath is valid before trying to read it, to avoid future issues.

@Angelmmiguel Angelmmiguel added the 🚀 enhancement New feature or request label Oct 4, 2023
@Angelmmiguel Angelmmiguel requested a review from a team October 4, 2023 12:03
@Angelmmiguel Angelmmiguel self-assigned this Oct 4, 2023
Copy link
Contributor

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏

crates/server/src/handlers/assets.rs Show resolved Hide resolved
@Angelmmiguel Angelmmiguel merged commit 253b727 into main Oct 4, 2023
5 checks passed
Angelmmiguel added a commit that referenced this pull request Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants