Open markewallace opened 5 years ago
I've run into an issue where I need to change my applications behaviour so that it works with both the in memory service and the real API.
Here is the scenario:
http://localhost:4200/api/search?query=foo@bar.com
The problem seems to be in the parseUri method.
parseUri
Here's a single example I created to reproduce the issue: https://stackblitz.com/edit/angular-nckow7
This is how the URI get's parsed
{ "source": "http://localhost:4200/api/search?query=foo@bar.com", "protocol": "http", "authority": "localhost:4200/api/search?query=foo@bar.com", "userInfo": "localhost:4200/api/search?query=foo", "user": "localhost", "password": "4200/api/search?query=foo", "host": "bar.com", "port": "", "relative": "", "path": "", "directory": "", "file": "", "query": "", "anchor": "" }
According to the RFC 3986 the @ symbol is valid, see: https://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid/1547940#1547940
@
Is this a valid defect?
It is valid because it designates the start of the "password" param. Try encoding the @ as %40 if you want to use it in the "query" param.
I've run into an issue where I need to change my applications behaviour so that it works with both the in memory service and the real API.
Here is the scenario:
http://localhost:4200/api/search?query=foo@bar.com
The problem seems to be in the
parseUri
method.Here's a single example I created to reproduce the issue: https://stackblitz.com/edit/angular-nckow7
This is how the URI get's parsed
According to the RFC 3986 the
@
symbol is valid, see: https://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid/1547940#1547940Is this a valid defect?