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

Emoji caused URIError: URI malformed #312

Closed
umihico opened this issue Aug 28, 2023 · 1 comment
Closed

Emoji caused URIError: URI malformed #312

umihico opened this issue Aug 28, 2023 · 1 comment

Comments

@umihico
Copy link

umihico commented Aug 28, 2023

Someone visited my Next.js website with wrong emoji as url, and made me face this error. I could reproduce by just passing one emoji like this.

Should I sanitize params before, or do you think this awesome library is responsible for this?

export const getServerSideProps: GetServerSideProps = async (
  context,
): Promise<GetServerSidePropsResult<Props>> => {
  const path = context.query.path as string
  Routes.event_path(path) // it works usually if no emoji
  Routes.event_path("💗") // reproducing the error
}

スクリーンショット 2023-08-28 16 00 42

@bogdan bogdan closed this as completed in dca93b4 Sep 20, 2023
@umihico
Copy link
Author

umihico commented Sep 22, 2023

great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant