Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From article:

So I tried placing there continue=javascript:alert(document.domain), and… It works!

What do you think document.domain returns in this case?



document.domain returns the current domain used in the document because no redirect occurred. Similar to if you typed it in your address bar right now, it should show you the HN domain.

It's commonly used as a placeholder in an alert-box XSS PoC. Weaponising this into an actual exploit could have been a fetch(), css inclusion, or enumerating localstorage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: