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

fix: sanitize statusMessage of disallowed chars #1057

Merged
merged 2 commits into from
Mar 15, 2023
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

It will break the response if we set any of these characters by accident (e.g. if a user includes in an error message).

Related: nuxt/nuxt#14688

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #1057 (26be702) into main (1dcf5c4) will increase coverage by 0.07%.
The diff coverage is n/a.

❗ Current head 26be702 differs from pull request most recent head 88cf764. Consider uploading reports for the commit 88cf764 to get more accurate results

@@            Coverage Diff             @@
##             main    #1057      +/-   ##
==========================================
+ Coverage   67.32%   67.40%   +0.07%     
==========================================
  Files          62       62              
  Lines        6283     6283              
  Branches      706      707       +1     
==========================================
+ Hits         4230     4235       +5     
+ Misses       2038     2034       -4     
+ Partials       15       14       -1     

see 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0
Copy link
Member

pi0 commented Mar 15, 2023

(same for nitr, i think we could move it to low-level h3)

@danielroe
Copy link
Member Author

linking upstream PR: unjs/h3#357

@danielroe
Copy link
Member Author

okay, I'll update nitro in this PR to use setResponseStatus from h3. Then the fix will flow downstream once merged and released in upstream PR.

@pi0 pi0 merged commit b708e14 into main Mar 15, 2023
@pi0 pi0 deleted the fix/sanitise-status branch March 15, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants