bypass XSS in redirection

Hello everyone, today i am going to show you how to bypass window.location.href from redirection,

so you may know that we can’t execute code in redirection like window.location.href or other type of redirection,

so how can we execute code in redirection?
to do that we need change the URL to invalid URL like only type http and stop the redirection to execute code,
ok but i can’t handle that URL, i can only change the path of URL.

well, i have found a way that you can change the valid URL to invalid URL in chrome and you can stop that redirection by adding %00 after the path of URL

for example:

so if you add window.loaction=”" in your code the page will not redirect you in chrome browser.



Note: Please if you can do that in other browsers comment down below