The C++ browsertest uses Base64Url whereas JS' window.atob() uses Base64.
20 lines
493 B
HTML
20 lines
493 B
HTML
<html>
|
|
<head>
|
|
</head>
|
|
<body>
|
|
<p><form id="form" method="post" action="">
|
|
<input type="submit">
|
|
</form></p>
|
|
<p>Waiting for JS form submission...</p>
|
|
<script>
|
|
function redirectToDestination() {
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const url = urlParams.get('url');
|
|
let form = document.getElementById("form");
|
|
form.action = atob(url.replace(/\-/g, '+').replace(/\_/g, '/'));
|
|
form.submit();
|
|
}
|
|
setTimeout(redirectToDestination, 100);
|
|
</script>
|
|
</html>
|