Encodes correctly the login regirect URL parameters
parent
b239b73689
commit
a272294fc0
|
|
@ -300,6 +300,6 @@ function handleSuccessfulLogin($userId, $username, $rememberMe, $config, $app_ro
|
||||||
) {
|
) {
|
||||||
$redirect = $candidate;
|
$redirect = $candidate;
|
||||||
}
|
}
|
||||||
header('Location: ' . htmlspecialchars($redirect));
|
header('Location: ' . $redirect);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,10 @@
|
||||||
<i class="fas fa-sign-in-alt me-2"></i>Sign in
|
<i class="fas fa-sign-in-alt me-2"></i>Sign in
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<?php if (isset($_GET['redirect'])): ?>
|
<?php if (isset($_GET['redirect'])):
|
||||||
<input type="hidden" name="redirect" value="<?php echo htmlspecialchars($_GET['redirect']); ?>">
|
$loginRawRedirect = $_GET['redirect'];
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="redirect" value="<?= htmlspecialchars($loginRawRedirect, ENT_QUOTES, 'UTF-8'); ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue