mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-12-02 13:32:43 -05:00
Regression from https://github.com/FreshRSS/FreshRSS/pull/9358 (PR not present in current release, stopped sending 403 on failed logins). This PR fixes the Minz bug mentioned in https://github.com/FreshRSS/FreshRSS/pull/9358#discussion_r4382254359 which occurred with `redirect: false` redirects. But it also takes a different approach for redirecting, by using HTML instead of the `Location` header (to address one additional issue with a resubmit prompt appearing when refreshing the login page after a failed login). 403 is now returned during failed reauthentication as well.
33 lines
1.2 KiB
PHTML
33 lines
1.2 KiB
PHTML
<?php
|
|
declare(strict_types=1);
|
|
/** @var FreshRSS_View $this */
|
|
?>
|
|
|
|
<main class="prompt">
|
|
<h1><?= _t('gen.auth.reauth.header') ?></h1>
|
|
|
|
<form method="post">
|
|
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
|
|
<input type="hidden" name="original_request" value="<?= Minz_Request::paramString('r') ?>" />
|
|
<input type="hidden" id="username" value="<?= Minz_User::name() ?>" />
|
|
<div class="form-group">
|
|
<label for="passwordPlain"><?= _t('gen.auth.password') ?></label>
|
|
<div class="stick">
|
|
<input type="password"<?= $this->auth_autofills['password'] !== '' ? ' value="' . $this->auth_autofills['password'] . '"' : '' ?>
|
|
id="passwordPlain" name="passwordPlain" class="passwordPlain" required="required" />
|
|
<button type="button" class="btn toggle-password"><?= _i('key') ?></button>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$reauth_time = FreshRSS_Context::systemConf()->reauth_time;
|
|
?>
|
|
<p class="help"><?= _i('help') ?> <?= _t('gen.auth.reauth.tip', intval($reauth_time / 60)) ?></p>
|
|
<div class="form-group form-group-actions">
|
|
<button type="submit" class="btn btn-important">
|
|
<?= _t('gen.auth.login') ?>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</main>
|
|
|