-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Broken query params handling behavier on escaped character "%2B" (the "+" symbol) in 1.1.26 #943
Comments
Thanks for reporting this finding. @SaltyAom, it's not just Stuff like this seems to be the cause: Lines 794 to 798 in 9ab72e8
|
I've encountered an issue while developing a URL Shortener that accepts a URL via the query string. Example long URL
When no guard is applied or the example long URL would be truncated to My Example Codeimport { Elysia, t } from "elysia";
const app = new Elysia().get("/", ({ query }) => {
return `url is ${query.url}`
}, {
query: t.Object({
url: t.String({ format: 'uri'})
})
}).listen(3000);
console.log(
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
); |
What version of Elysia is running?
1.1.26
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
I found this issue when I tried parsing the ISO8601 string with a positive timezone.
The following reproduce code is a little bit diffrent from the test-case which is at
elysia/test/validator/query.test.ts
Line 684 in 9ab72e8
What is the expected behavior?
When sending the "%2B", should return "+"
What do you see instead?
As downgrading to 1.1.25, the behavier is as expected, which returns a "+".
Additional information
No response
Have you try removing the
node_modules
andbun.lockb
and try again yet?No response
The text was updated successfully, but these errors were encountered: