summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-18 14:50:54 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-18 14:50:54 +0200
commitf727a1383639d5bdc762f73dfe93b9a5d577cb41 (patch)
tree923dcb725ca264ff09d05968ab71adf341af5037 /app
parent23609ad858552c54fc3fe8d9f8e2f7d966fd28a1 (diff)
Improve reset auth system
- Add bcrypt.js in resetAuthAction() - Rename init_loginForm() in init_crypto_form() - Load init_crypto_form() everytime (if no #crypto-form, do nothing)
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/indexController.php3
-rw-r--r--app/views/index/formLogin.phtml2
-rw-r--r--app/views/index/resetAuth.phtml2
3 files changed, 5 insertions, 2 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index fccf16ecf..86863cc84 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -423,6 +423,9 @@ class FreshRSS_index_Controller extends Minz_ActionController {
public function resetAuthAction() {
Minz_View::prependTitle(_t('reset_auth') . ' ยท ');
+ Minz_View::appendScript(Minz_Url::display(
+ '/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')
+ ));
$this->view->no_form = false;
// Enable changement of auth only if Persona!
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
index b79c1b614..34f10de4a 100644
--- a/app/views/index/formLogin.phtml
+++ b/app/views/index/formLogin.phtml
@@ -3,7 +3,7 @@
switch (Minz_Configuration::authType()) {
case 'form':
- ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
+ ?><form id="crypto-form" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
<div>
<label for="username"><?php echo _t('username'); ?></label>
<input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
diff --git a/app/views/index/resetAuth.phtml b/app/views/index/resetAuth.phtml
index 7f3b54bdb..78cc527b3 100644
--- a/app/views/index/resetAuth.phtml
+++ b/app/views/index/resetAuth.phtml
@@ -9,7 +9,7 @@
<?php } ?>
<?php if (!$this->no_form) { ?>
- <form id="loginForm" method="post" action="<?php echo _url('index', 'resetAuth'); ?>">
+ <form id="crypto-form" method="post" action="<?php echo _url('index', 'resetAuth'); ?>">
<p class="alert alert-warn">
<span class="alert-head"><?php echo _t('attention'); ?></span>
<?php echo _t('auth_will_reset'); ?>