bad request returned on certain searches #112

Closed
opened 2018-09-10 21:29:34 +02:00 by tzarebczan · 3 comments
tzarebczan commented 2018-09-10 21:29:34 +02:00 (Migrated from github.com)
Examples: https://lighthouse.lbry.io/search?s=Mar%20GamingYT%20%20%20Robux%20Simulator%20/%20REBIRTH!&size=20&from=0 https://lighthouse.lbry.io/search?s=Mar%20GamingYT%20%20%20Baldi%20Obby!%20/%20I%20got%20lost,%20but%20won!&size=20&from=0 Might be related to some special characters?
tzarebczan commented 2018-09-10 21:30:45 +02:00 (Migrated from github.com)
Another: https://lighthouse.lbry.io/search?s=Playing%20Robloxian%20Life%20%20w%20god39lol/%20Mar%20GamingYT&size=20&from=0
tiger5226 commented 2018-09-11 12:56:16 +02:00 (Migrated from github.com)

The problem is the url is not properly encoded. Forward slash when url encoded should be %2F. I think this is the right response when the api receive a malformed url.

https://lighthouse.lbry.io/search?s=Mar%20GamingYT%20%20%20RobuxSimulator%20%2F%20REBIRTH

The above is an example where it should work though and does not. The forward slash seems to cause problems somehow.

The problem is the url is not properly encoded. Forward slash when url encoded should be `%2F`. I think this is the right response when the api receive a malformed url. https://lighthouse.lbry.io/search?s=Mar%20GamingYT%20%20%20RobuxSimulator%20%2F%20REBIRTH The above is an example where it should work though and does not. The forward slash seems to cause problems somehow.
tiger5226 commented 2018-09-16 04:15:54 +02:00 (Migrated from github.com)

So I found some more documentation on the escaped characters. Some pages had different characters to escape. I found the official documentation on escaped characters. I noted it in the codebase for reference.

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters

Solved with https://github.com/lbryio/lighthouse/pull/115

So I found some more documentation on the escaped characters. Some pages had different characters to escape. I found the official documentation on escaped characters. I noted it in the codebase for reference. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters Solved with https://github.com/lbryio/lighthouse/pull/115
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lighthouse.js#112
No description provided.