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

Escaped characters in URL paths and query strings may not be delivered correctly? #20

Closed
simonw opened this issue Apr 19, 2020 · 5 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@simonw
Copy link
Owner

simonw commented Apr 19, 2020

Initially, I thought this bug was "Tables AND row primary keys with / in result in 404s"

Refs #5.

This is a page where the primary key value contains an encoded / - it 404s:
https://til.simonwillison.net/til/til/python%2Fconvert-to-utc-without-pytz.md

So does https://datasette-public.now.sh/fixtures/table%2Fwith%2Fslashes.csv

@simonw simonw added the bug Something isn't working label Apr 19, 2020
@simonw
Copy link
Owner Author

simonw commented Apr 19, 2020

My hunch is that this is a limitation of AWS lambda - it looks like it might be decoding those escaped paths before they reach the lambda function.

@styfle
Copy link
Contributor

styfle commented Apr 20, 2020

Perhaps the ASGI implementation is wrong here: https://github.com/zeit/now/blob/master/packages/now-python/now_init.py#L258

@simonw
Copy link
Owner Author

simonw commented Apr 22, 2020

Oh great spot! I'll have a look at that and maybe send a pull request.

@simonw simonw changed the title Tables AND row primary keys with / in result in 404s Escaped characters in URL paths and query strings may not be delivered correctly? Apr 27, 2020
@simonw
Copy link
Owner Author

simonw commented Apr 27, 2020

I'm suspicious that this goes beyond just / characters - see simonw/datasette#736 and simonw/datasette#735

@simonw
Copy link
Owner Author

simonw commented Mar 20, 2021

Dupe of #28

@simonw simonw closed this as completed Mar 20, 2021
@simonw simonw added the duplicate This issue or pull request already exists label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants