This question treats about javascript code running in a browser (client-side).
Say I know I am in an iframe, can I trust window.parent.location
or document.referrer
to actually be the true url of the parent of my iframe?
In other words, assuming that the user's browser does a correct job of following CORS specifications, could evil.com
iframe my page in such a way that window.parent.location
or document.referrer
is not evil.com
?