2 ms·
I feel like Google is not the only company parsing domains to check security origins... If a backslash can end a security origin, I am going to guess there are
by londons_explore 7y ago
I feel like Google is not the only company parsing domains to check security origins...
If a backslash can end a security origin, I am going to guess there are a lot of other vulnerable bits of code...
One more reason joining and splitting strings with security impact is a bad idea.
- Someone1234 7y ago> One more reason joining and splitting strings with security impact is a bad idea. Doing it in a standard/shared library is more secure than bespoke code on each page, since at the very least as we witness here it can all be updated together as needed. You can add additional abstraction, but someone eventually has to do this work. Even web browsers themselves aren't immune from bugs in "joining and splitting strings with security impact" for URL comprehension. All you can really do is try not to re-write known secure code. Plus this buggy RegX was from the standard on URL parsing: https://tools.ietf.org/html/rfc3986#appendix-B https://tools.ietf.org/html/rfc3986#appendix-B