-
-
Notifications
You must be signed in to change notification settings - Fork 615
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(validator): Add double quotation marks to multipart checker regex #3195
Conversation
Other relevant issue: #3194 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3195 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 151 151
Lines 15074 15074
Branches 2630 2610 -20
=======================================
Hits 14502 14502
Misses 572 572 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
HI @CPlusPatch ! Thank you for the PR. I don't know if we should add a test, but this should be fixed. I'll merge it now and fix #3194 with another PR. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [hono](https://hono.dev/) ([source](https://github.com/honojs/hono)) | [`4.5.1` -> `4.5.4`](https://renovatebot.com/diffs/npm/hono/4.5.1/4.5.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/hono/4.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/hono/4.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/hono/4.5.1/4.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/hono/4.5.1/4.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>honojs/hono (hono)</summary> ### [`v4.5.4`](https://github.com/honojs/hono/releases/tag/v4.5.4) [Compare Source](https://github.com/honojs/hono/compare/v4.5.3...v4.5.4) ##### What's Changed - fix(jsx): corrects the type of 'draggable' attribute in intrinsic-elements.ts by [@​yasuaki640](https://github.com/yasuaki640) in [https://github.com/honojs/hono/pull/3224](https://github.com/honojs/hono/pull/3224) - feat(jsx): allow to merge CSSProperties declaration by [@​jonasnobile](https://github.com/jonasnobile) in [https://github.com/honojs/hono/pull/3228](https://github.com/honojs/hono/pull/3228) - feat(client): Add WebSocket Provider Integration Tests and Enhance WebSocket Initialization by [@​naporin0624](https://github.com/naporin0624) in [https://github.com/honojs/hono/pull/3213](https://github.com/honojs/hono/pull/3213) - fix(types): `param` in `ValidationTargets` supports optional param by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/3229](https://github.com/honojs/hono/pull/3229) ##### New Contributors - [@​jonasnobile](https://github.com/jonasnobile) made their first contribution in [https://github.com/honojs/hono/pull/3228](https://github.com/honojs/hono/pull/3228) **Full Changelog**: honojs/hono@v4.5.3...v4.5.4 ### [`v4.5.3`](https://github.com/honojs/hono/releases/tag/v4.5.3) [Compare Source](https://github.com/honojs/hono/compare/v4.5.2...v4.5.3) #### What's Changed - fix(validator): Add double quotation marks to multipart checker regex by [@​CPlusPatch](https://github.com/CPlusPatch) in [https://github.com/honojs/hono/pull/3195](https://github.com/honojs/hono/pull/3195) - fix(validator): support `application/json` with a charset as JSON by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/3199](https://github.com/honojs/hono/pull/3199) - fix(jsx): fix handling of SVG elements in JSX. by [@​usualoma](https://github.com/usualoma) in [https://github.com/honojs/hono/pull/3204](https://github.com/honojs/hono/pull/3204) - fix(jsx/dom): fix performance issue with adding many new node listings by [@​usualoma](https://github.com/usualoma) in [https://github.com/honojs/hono/pull/3205](https://github.com/honojs/hono/pull/3205) - fix(service-worker): refer to `self.fetch` correctly by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/3200](https://github.com/honojs/hono/pull/3200) #### New Contributors - [@​CPlusPatch](https://github.com/CPlusPatch) made their first contribution in [https://github.com/honojs/hono/pull/3195](https://github.com/honojs/hono/pull/3195) **Full Changelog**: honojs/hono@v4.5.2...v4.5.3 ### [`v4.5.2`](https://github.com/honojs/hono/releases/tag/v4.5.2) [Compare Source](https://github.com/honojs/hono/compare/v4.5.1...v4.5.2) #### What's Changed - fix(helper/adapter): don't check `navigator` is `undefined` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/3171](https://github.com/honojs/hono/pull/3171) - fix(types): handle readonly array correctly by [@​m-shaka](https://github.com/m-shaka) in [https://github.com/honojs/hono/pull/3172](https://github.com/honojs/hono/pull/3172) - Revert "fix(helper/adapter): don't check `navigator` is `undefined` by [@​yusukebe](https://github.com/yusukebe) in [https://github.com/honojs/hono/pull/3173](https://github.com/honojs/hono/pull/3173) - fix(type): degradation of generic type handling by [@​m-shaka](https://github.com/m-shaka) in [https://github.com/honojs/hono/pull/3138](https://github.com/honojs/hono/pull/3138) - fix:(csrf) fix typo of csrf middleware by [@​yasuaki640](https://github.com/yasuaki640) in [https://github.com/honojs/hono/pull/3178](https://github.com/honojs/hono/pull/3178) - feat(secure-headers): remove "X-Powered-By" should be an option by [@​EdamAme-x](https://github.com/EdamAme-x) in [https://github.com/honojs/hono/pull/3177](https://github.com/honojs/hono/pull/3177) **Full Changelog**: honojs/hono@v4.5.1...v4.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone America/Chicago, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/autoblocksai/cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM4LjE4LjE3IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Some runtimes, like Bun (and I assume WebKit based stuff) use double quotes for the
boundary
part ofContent-Type
headers.Here's a real value from my app:
multipart/form-data; boundary="-WebkitFormBoundary6210507107db483aa49299da6f4298bd
.Currently, the regex does not include double quotes. This PR fixes this issue by adding double quotes. Patch tested working in my app for Hono 4.5.2.