Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Login')
-rw-r--r--plugins/Login/Auth.php4
-rw-r--r--plugins/Login/Controller.php174
-rw-r--r--plugins/Login/Form.php9
-rw-r--r--plugins/Login/Login.php43
-rw-r--r--plugins/Login/PasswordForm.php4
-rw-r--r--plugins/Login/ResetPasswordForm.php6
-rw-r--r--plugins/Login/templates/header.tpl7
-rw-r--r--plugins/Login/templates/login.css2
-rw-r--r--plugins/Login/templates/login.tpl8
-rw-r--r--plugins/Login/templates/lostPassword.tpl3
-rw-r--r--plugins/Login/templates/passwordchanged.tpl2
-rw-r--r--plugins/Login/templates/passwordsent.tpl2
-rw-r--r--plugins/Login/templates/resetPassword.tpl3
13 files changed, 155 insertions, 112 deletions
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php
index 9bc4902831..c36254d64a 100644
--- a/plugins/Login/Auth.php
+++ b/plugins/Login/Auth.php
@@ -28,7 +28,7 @@ class Piwik_Login_Auth implements Piwik_Auth
{
$rootLogin = Zend_Registry::get('config')->superuser->login;
$rootPassword = Zend_Registry::get('config')->superuser->password;
- $rootToken = Piwik_UsersManager_API::getTokenAuth($rootLogin, $rootPassword);
+ $rootToken = Piwik_UsersManager_API::getInstance()->getTokenAuth($rootLogin, $rootPassword);
if($this->login == $rootLogin
&& $this->token_auth == $rootToken)
@@ -42,7 +42,7 @@ class Piwik_Login_Auth implements Piwik_Auth
}
$login = Piwik_FetchOne(
- 'SELECT login FROM '.Piwik::prefixTable('user').' WHERE token_auth = ?',
+ 'SELECT login FROM '.Piwik_Common::prefixTable('user').' WHERE token_auth = ?',
array($this->token_auth)
);
if($login !== false)
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 022c47bf01..02056be0bf 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -11,13 +11,47 @@
*/
/**
+ * Login controller
*
* @package Piwik_Login
*/
class Piwik_Login_Controller extends Piwik_Controller
{
/**
+ * Get referer to redirect to upon successful login.
+ * Remembers referer URL even if navigation is: login form -> reset password -> login form
+ *
+ * @returns string
+ */
+ static public function getRefererToRedirect()
+ {
+ // retrieve any previously saved referer
+ $ns = new Zend_Session_Namespace('Piwik_Login.referer');
+ $referer = $ns->referer;
+ if(empty($referer))
+ {
+ // if the referer contains module=Login, Installation, or CoreUpdater, we instead redirect to the doc root
+ $referer = Piwik_Url::getLocalReferer();
+ if(empty($referer) || preg_match('/module=(Login|Installation|CoreUpdater)/', $referer))
+ {
+ $referer = 'index.php';
+ }
+ $ns->referer = $referer;
+ $ns->setExpirationSeconds(300, 'referer');
+ }
+ else if(!Piwik_Url::isLocalUrl($referer))
+ {
+ $referer = 'index.php';
+ }
+
+ return $referer;
+ }
+
+ /**
* Default action
+ *
+ * @param none
+ * @return void
*/
function index()
{
@@ -26,34 +60,39 @@ class Piwik_Login_Controller extends Piwik_Controller
/**
* Login form
+ *
+ * @param string $messageNoAccess Access error message
+ * @param string $currentUrl Current URL
+ * @return void
*/
- function login()
+ function login($messageNoAccess = null)
{
- $messageNoAccess = null;
- $form = new Piwik_Login_Form();
-
- $currentUrl = Piwik_Url::getReferer();
- $urlToRedirect = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
- $urlToRedirect = htmlspecialchars_decode($urlToRedirect);
+ $urlToRedirect = self::getRefererToRedirect();
+ $form = new Piwik_Login_Form();
if($form->validate())
{
- // if the current url to redirect contains module=Login or Installation we instead redirect to the doc root
- if(preg_match('/module=(Login|Installation)/', $urlToRedirect))
+ $nonce = $form->getSubmitValue('form_nonce');
+ if(Piwik_Nonce::verifyNonce('Piwik_Login.login', $nonce))
{
- $urlToRedirect = 'index.php';
+ $login = $form->getSubmitValue('form_login');
+ $password = $form->getSubmitValue('form_password');
+ $md5Password = md5($password);
+ try {
+ $this->authenticateAndRedirect($login, $md5Password, $urlToRedirect);
+ } catch(Exception $e) {
+ $messageNoAccess = $e->getMessage();
+ }
+ }
+ else
+ {
+ $messageNoAccess = Piwik_Translate('Login_InvalidNonceOrReferer');
}
-
- $login = $form->getSubmitValue('form_login');
- $password = $form->getSubmitValue('form_password');
- $md5Password = md5($password);
- $messageNoAccess = $this->authenticateAndRedirect($login, $md5Password, $urlToRedirect);
}
$view = Piwik_View::factory('login');
- // make navigation login form -> reset password -> login form remember your first url
- $view->urlToRedirect = $urlToRedirect;
$view->AccessErrorString = $messageNoAccess;
+ $view->nonce = Piwik_Nonce::getNonce('Piwik_Login.login');
$view->linkTitle = Piwik::getRandomTitle();
$view->addForm( $form );
$view->subTemplate = 'genericForm.tpl';
@@ -62,28 +101,29 @@ class Piwik_Login_Controller extends Piwik_Controller
/**
* Form-less login
+ *
+ * @param none
+ * @return void
*/
function logme()
{
- $login = Piwik_Common::getRequestVar('login', null, 'string');
$password = Piwik_Common::getRequestVar('password', null, 'string');
- $currentUrl = 'index.php';
- $urlToRedirect = Piwik_Common::getRequestVar('url', $currentUrl, 'string');
- $urlToRedirect = htmlspecialchars_decode($urlToRedirect);
-
if(strlen($password) != 32)
{
- throw new Exception("The password parameter is expected to be a MD5 hash of the password.");
+ throw new Exception(Piwik_TranslateException('Login_ExceptionPasswordMD5HashExpected'));
}
+
+ $login = Piwik_Common::getRequestVar('login', null, 'string');
if($login == Zend_Registry::get('config')->superuser->login)
- {
- throw new Exception("The Super User cannot be authenticated using this URL.");
- }
- $authenticated = $this->authenticateAndRedirect($login, $password, $urlToRedirect);
- if($authenticated === false)
- {
- echo Piwik_Translate('Login_LoginPasswordNotCorrect');
+ {
+ throw new Exception(Piwik_TranslateException('Login_ExceptionInvalidSuperUserAuthenticationMethod', array("logme")));
}
+
+ $currentUrl = 'index.php';
+ $urlToRedirect = Piwik_Common::getRequestVar('url', $currentUrl, 'string');
+ $urlToRedirect = htmlspecialchars_decode($urlToRedirect);
+
+ $this->authenticateAndRedirect($login, $password, $urlToRedirect);
}
/**
@@ -96,51 +136,33 @@ class Piwik_Login_Controller extends Piwik_Controller
*/
protected function authenticateAndRedirect($login, $md5Password, $urlToRedirect)
{
- $tokenAuth = Piwik_UsersManager_API::getTokenAuth($login, $md5Password);
-
- $auth = Zend_Registry::get('auth');
- $auth->setLogin($login);
- $auth->setTokenAuth($tokenAuth);
-
- $authResult = $auth->authenticate();
- if(!$authResult->isValid())
- {
- return Piwik_Translate('Login_LoginPasswordNotCorrect');
- }
-
- $authCookieName = Zend_Registry::get('config')->General->login_cookie_name;
- $authCookieExpiry = time() + Zend_Registry::get('config')->General->login_cookie_expire;
- $cookie = new Piwik_Cookie($authCookieName, $authCookieExpiry);
- $cookie->set('login', $login);
- $cookie->set('token_auth', $authResult->getTokenAuth());
- $cookie->save();
-
- Zend_Session::regenerateId();
-
+ $info = array( 'login' => $login,
+ 'md5Password' => $md5Password,
+ );
+ Piwik_PostEvent('Login.initSession', $info);
Piwik_Url::redirectToUrl($urlToRedirect);
}
/**
* Lost password form. Email password reset information.
+ *
+ * @param none
+ * @return void
*/
function lostPassword()
{
$messageNoAccess = null;
- $form = new Piwik_Login_PasswordForm();
- $currentUrl = 'index.php';
- $urlToRedirect = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
- $urlToRedirect = htmlspecialchars_decode($urlToRedirect);
+ $urlToRedirect = self::getRefererToRedirect();
+ $form = new Piwik_Login_PasswordForm();
if($form->validate())
{
$loginMail = $form->getSubmitValue('form_login');
- $messageNoAccess = $this->lostPasswordFormValidated($loginMail, $urlToRedirect);
+ $messageNoAccess = $this->lostPasswordFormValidated($loginMail);
}
$view = Piwik_View::factory('lostPassword');
$view->AccessErrorString = $messageNoAccess;
- // make navigation login form -> reset password -> login form remember your first url
- $view->urlToRedirect = $urlToRedirect;
$view->linkTitle = Piwik::getRandomTitle();
$view->addForm( $form );
$view->subTemplate = 'genericForm.tpl';
@@ -154,7 +176,7 @@ class Piwik_Login_Controller extends Piwik_Controller
* @param string $urlToRedirect (URL to redirect to, if successfully validated)
* @return string (failure message if unable to validate)
*/
- protected function lostPasswordFormValidated($loginMail, $urlToRedirect)
+ protected function lostPasswordFormValidated($loginMail)
{
$user = self::getUserInformation($loginMail);
if( $user === null )
@@ -184,7 +206,7 @@ class Piwik_Login_Controller extends Piwik_Controller
'\n',
"\n",
sprintf(Piwik_Translate('Login_MailPasswordRecoveryBody'), $login, $ip, $url, $resetToken)
- )
+ ) . "\n"
);
$piwikHost = $_SERVER['HTTP_HOST'];
@@ -205,7 +227,6 @@ class Piwik_Login_Controller extends Piwik_Controller
}
$view->linkTitle = Piwik::getRandomTitle();
- $view->urlToRedirect = $urlToRedirect;
echo $view->render();
exit;
@@ -213,28 +234,26 @@ class Piwik_Login_Controller extends Piwik_Controller
/**
* Reset password form. Enter new password here.
+ *
+ * @param none
+ * @return void
*/
function resetPassword()
{
$messageNoAccess = null;
+ $urlToRedirect = self::getRefererToRedirect();
$form = new Piwik_Login_ResetPasswordForm();
- $currentUrl = 'index.php';
- $urlToRedirect = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
- $urlToRedirect = htmlspecialchars_decode($urlToRedirect);
-
if($form->validate())
{
$loginMail = $form->getSubmitValue('form_login');
$token = $form->getSubmitValue('form_token');
$password = $form->getSubmitValue('form_password');
- $messageNoAccess = $this->resetPasswordFormValidated($loginMail, $token, $password, $urlToRedirect);
+ $messageNoAccess = $this->resetPasswordFormValidated($loginMail, $token, $password);
}
$view = Piwik_View::factory('resetPassword');
$view->AccessErrorString = $messageNoAccess;
- // make navigation login form -> reset password -> login form remember your first url
- $view->urlToRedirect = $urlToRedirect;
$view->linkTitle = Piwik::getRandomTitle();
$view->addForm( $form );
$view->subTemplate = 'genericForm.tpl';
@@ -250,7 +269,7 @@ class Piwik_Login_Controller extends Piwik_Controller
* @param string $urlToRedirect (URL to redirect to, if successfully validated)
* @return string (failure message)
*/
- protected function resetPasswordFormValidated($loginMail, $token, $password, $urlToRedirect)
+ protected function resetPasswordFormValidated($loginMail, $token, $password)
{
$user = self::getUserInformation($loginMail);
if( $user === null )
@@ -272,7 +291,7 @@ class Piwik_Login_Controller extends Piwik_Controller
}
else
{
- Piwik_UsersManager_API::updateUser($user['login'], $password);
+ Piwik_UsersManager_API::getInstance()->updateUser($user['login'], $password);
}
}
catch(Exception $e)
@@ -282,7 +301,6 @@ class Piwik_Login_Controller extends Piwik_Controller
$view = Piwik_View::factory('passwordchanged');
$view->linkTitle = Piwik::getRandomTitle();
- $view->urlToRedirect = $urlToRedirect;
echo $view->render();
exit;
@@ -308,13 +326,13 @@ class Piwik_Login_Controller extends Piwik_Controller
'password' => Zend_Registry::get('config')->superuser->password,
);
}
- else if( Piwik_UsersManager_API::userExists($loginMail) )
+ else if( Piwik_UsersManager_API::getInstance()->userExists($loginMail) )
{
- $user = Piwik_UsersManager_API::getUser($loginMail);
+ $user = Piwik_UsersManager_API::getInstance()->getUser($loginMail);
}
- else if( Piwik_UsersManager_API::userEmailExists($loginMail) )
+ else if( Piwik_UsersManager_API::getInstance()->userEmailExists($loginMail) )
{
- $user = Piwik_UsersManager_API::getUserByEmail($loginMail);
+ $user = Piwik_UsersManager_API::getInstance()->getUserByEmail($loginMail);
}
return $user;
@@ -370,6 +388,9 @@ class Piwik_Login_Controller extends Piwik_Controller
/**
* Clear session information
+ *
+ * @param none
+ * @return void
*/
static public function clearSession()
{
@@ -382,6 +403,9 @@ class Piwik_Login_Controller extends Piwik_Controller
/**
* Logout current user
+ *
+ * @param none
+ * @return void
*/
public function logout()
{
diff --git a/plugins/Login/Form.php b/plugins/Login/Form.php
index 04176cd52d..88483c1fe6 100644
--- a/plugins/Login/Form.php
+++ b/plugins/Login/Form.php
@@ -25,20 +25,15 @@ class Piwik_Login_Form extends Piwik_Form
function init()
{
- // if form_url is not defined, go to referrer
- $currentUrl = Piwik_Url::getReferer();
- $urlToGoAfter = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
- $urlToGoAfter = htmlspecialchars_decode($urlToGoAfter);
-
$formElements = array(
array('text', 'form_login'),
array('password', 'form_password'),
- array('hidden', 'form_url', $urlToGoAfter),
+ array('hidden', 'form_nonce'),
);
$this->addElements( $formElements );
$formRules = array(
- array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Login')), 'required'),
+ array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('General_Username')), 'required'),
array('form_password', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Password')), 'required'),
);
$this->addRules( $formRules );
diff --git a/plugins/Login/Login.php b/plugins/Login/Login.php
index 3866cd7ba7..0002029d82 100644
--- a/plugins/Login/Login.php
+++ b/plugins/Login/Login.php
@@ -19,11 +19,10 @@ class Piwik_Login extends Piwik_Plugin
public function getInformation()
{
$info = array(
- 'name' => 'Login',
- 'description' => 'Login Authentication plugin, reading the credentials from the config/config.inc.php file for the Super User, and from the Database for the other users. Can be easily replaced to introduce a new Authentication mechanism (OpenID, htaccess, custom Auth, etc.).',
+ 'description' => Piwik_Translate('Login_PluginDescription'),
'author' => 'Piwik',
- 'homepage' => 'http://piwik.org/',
- 'version' => '0.1',
+ 'author_homepage' => 'http://piwik.org/',
+ 'version' => Piwik_Version::VERSION,
);
return $info;
}
@@ -34,6 +33,7 @@ class Piwik_Login extends Piwik_Plugin
'FrontController.initAuthenticationObject' => 'initAuthenticationObject',
'FrontController.NoAccessException' => 'noAccess',
'API.Request.authenticate' => 'ApiRequestAuthenticate',
+ 'Login.initSession' => 'initSession',
);
return $hooks;
}
@@ -68,7 +68,8 @@ class Piwik_Login extends Piwik_Plugin
$authCookieName = Zend_Registry::get('config')->General->login_cookie_name;
$authCookieExpiry = time() + Zend_Registry::get('config')->General->login_cookie_expire;
- $authCookie = new Piwik_Cookie($authCookieName, $authCookieExpiry);
+ $authCookiePath = Zend_Registry::get('config')->General->login_cookie_path;
+ $authCookie = new Piwik_Cookie($authCookieName, $authCookieExpiry, $authCookiePath);
$defaultLogin = 'anonymous';
$defaultTokenAuth = 'anonymous';
if($authCookie->isCookieFound())
@@ -79,4 +80,36 @@ class Piwik_Login extends Piwik_Plugin
$auth->setLogin($defaultLogin);
$auth->setTokenAuth($defaultTokenAuth);
}
+
+ function initSession($notification)
+ {
+ $info = $notification->getNotificationObject();
+ $login = $info['login'];
+ $md5Password = $info['md5Password'];
+
+ $tokenAuth = Piwik_UsersManager_API::getInstance()->getTokenAuth($login, $md5Password);
+
+ $auth = Zend_Registry::get('auth');
+ $auth->setLogin($login);
+ $auth->setTokenAuth($tokenAuth);
+
+ $authResult = $auth->authenticate();
+ if(!$authResult->isValid())
+ {
+ throw new Exception(Piwik_Translate('Login_LoginPasswordNotCorrect'));
+ }
+
+ $ns = new Zend_Session_Namespace('Piwik_Login.referer');
+ unset($ns->referer);
+
+ $authCookieName = Zend_Registry::get('config')->General->login_cookie_name;
+ $authCookieExpiry = time() + Zend_Registry::get('config')->General->login_cookie_expire;
+ $authCookiePath = Zend_Registry::get('config')->General->login_cookie_path;
+ $cookie = new Piwik_Cookie($authCookieName, $authCookieExpiry, $authCookiePath);
+ $cookie->set('login', $login);
+ $cookie->set('token_auth', $authResult->getTokenAuth());
+ $cookie->save();
+
+ Zend_Session::regenerateId();
+ }
}
diff --git a/plugins/Login/PasswordForm.php b/plugins/Login/PasswordForm.php
index 7bb39d454c..dac4192c6f 100644
--- a/plugins/Login/PasswordForm.php
+++ b/plugins/Login/PasswordForm.php
@@ -25,12 +25,8 @@ class Piwik_Login_PasswordForm extends Piwik_Form
function init()
{
- $currentUrl = 'index.php';
- $urlToGoAfter = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
-
$formElements = array(
array('text', 'form_login'),
- array('hidden', 'form_url', $urlToGoAfter),
);
$this->addElements( $formElements );
diff --git a/plugins/Login/ResetPasswordForm.php b/plugins/Login/ResetPasswordForm.php
index a62cf775d1..87470f6e18 100644
--- a/plugins/Login/ResetPasswordForm.php
+++ b/plugins/Login/ResetPasswordForm.php
@@ -25,9 +25,6 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form
function init()
{
- $currentUrl = 'index.php';
- $urlToGoAfter = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
-
$resetToken = Piwik_Common::getRequestVar('token', '', 'string');
$formElements = array(
@@ -35,7 +32,6 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form
array('password', 'form_password'),
array('password', 'form_password_bis'),
array('text', 'form_token'),
- array('hidden', 'form_url', $urlToGoAfter),
);
$this->addElements( $formElements );
@@ -45,7 +41,7 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form
$this->setDefaults($defaults);
$formRules = array(
- array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Login')), 'required'),
+ array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('General_Username')), 'required'),
array('form_password', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Password')), 'required'),
array('form_password_bis', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_PasswordRepeat')), 'required'),
array('form_token', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_PasswordResetToken')), 'required'),
diff --git a/plugins/Login/templates/header.tpl b/plugins/Login/templates/header.tpl
index 5b46dd7440..b1cb4b4ae7 100644
--- a/plugins/Login/templates/header.tpl
+++ b/plugins/Login/templates/header.tpl
@@ -2,11 +2,12 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
- <title>Piwik &rsaquo; Login</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Piwik &rsaquo; {'Login_LogIn'|translate}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="plugins/CoreHome/templates/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="plugins/Login/templates/login.css" media="screen" />
+ {postEvent name="template_css_import"}
{literal}
<script type="text/javascript">
@@ -20,6 +21,8 @@
window.onload = focusit;
</script>
{/literal}
+ <script type="text/javascript" src="libs/jquery/jquery.js"></script>
+ {postEvent name="template_js_import"}
</head>
<body class="login">
diff --git a/plugins/Login/templates/login.css b/plugins/Login/templates/login.css
index e80d7c4a19..af9a89aee7 100644
--- a/plugins/Login/templates/login.css
+++ b/plugins/Login/templates/login.css
@@ -14,7 +14,6 @@ form {
padding: 16px 16px 40px 16px;
font-weight: bold;
-moz-border-radius: 5px;
- -khtml-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
@@ -34,7 +33,6 @@ form .forgetmenot {
border-width: 1px;
border-style: solid;
-moz-border-radius: 3px;
- -khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: default;
diff --git a/plugins/Login/templates/login.tpl b/plugins/Login/templates/login.tpl
index 16d23a0a06..f837ada5c3 100644
--- a/plugins/Login/templates/login.tpl
+++ b/plugins/Login/templates/login.tpl
@@ -16,8 +16,9 @@
<form {$form_data.attributes}>
<p>
- <label>{'Login_Login'|translate}:<br />
- <input type="text" name="form_login" id="form_login" class="input" value="" size="20" tabindex="10" /></label>
+ <label>{'General_Username'|translate}:<br />
+ <input type="text" name="form_login" id="form_login" class="input" value="" size="20" tabindex="10" />
+ <input type="hidden" name="form_nonce" id="form_nonce" value="{$nonce}" /></label>
</p>
<p>
@@ -27,14 +28,13 @@
{*
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
*}
- {$form_data.form_url.html}
<p class="submit">
<input type="submit" value="{'Login_LogIn'|translate}" tabindex="100" />
</p>
</form>
<p id="nav">
-<a href="index.php?module=Login&amp;action=lostPassword&amp;form_url={$urlToRedirect|escape:url}" title="{'Login_LostYourPassword'|translate}">{'Login_LostYourPassword'|translate}</a>
+<a href="index.php?module=Login&amp;action=lostPassword" title="{'Login_LostYourPassword'|translate}">{'Login_LostYourPassword'|translate}</a>
</p>
</div>
diff --git a/plugins/Login/templates/lostPassword.tpl b/plugins/Login/templates/lostPassword.tpl
index 9f079f7ea4..7e3e8fbe66 100644
--- a/plugins/Login/templates/lostPassword.tpl
+++ b/plugins/Login/templates/lostPassword.tpl
@@ -23,14 +23,13 @@
<label>{'Login_LoginOrEmail'|translate}:<br />
<input type="text" name="form_login" id="form_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
- {$form_data.form_url.html}
<p class="submit">
<input type="submit" value="{'Login_RemindPassword'|translate}" tabindex="100" />
</p>
</form>
<p id="nav">
-<a href="index.php?module=Login&amp;form_url={$urlToRedirect|escape:url}" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
+<a href="index.php?module=Login" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
</p>
</div>
diff --git a/plugins/Login/templates/passwordchanged.tpl b/plugins/Login/templates/passwordchanged.tpl
index 9963a060d9..5337abc2c2 100644
--- a/plugins/Login/templates/passwordchanged.tpl
+++ b/plugins/Login/templates/passwordchanged.tpl
@@ -13,7 +13,7 @@
{/if}
<p id="nav">
-<a href="index.php?module=Login&amp;form_url={$urlToRedirect|escape:url}" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
+<a href="index.php?module=Login" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
</p>
</div>
diff --git a/plugins/Login/templates/passwordsent.tpl b/plugins/Login/templates/passwordsent.tpl
index 175498c1f8..7529c57f24 100644
--- a/plugins/Login/templates/passwordsent.tpl
+++ b/plugins/Login/templates/passwordsent.tpl
@@ -13,7 +13,7 @@
{/if}
<p id="nav">
-<a href="index.php?module=Login&amp;form_url={$urlToRedirect|escape:url}" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
+<a href="index.php?module=Login" title="{'Login_LogIn'|translate}">{'Login_LogIn'|translate}</a>
</p>
</div>
diff --git a/plugins/Login/templates/resetPassword.tpl b/plugins/Login/templates/resetPassword.tpl
index 2bb77b4ae9..49644b21b4 100644
--- a/plugins/Login/templates/resetPassword.tpl
+++ b/plugins/Login/templates/resetPassword.tpl
@@ -35,14 +35,13 @@
<input type="text" name="form_token" id="form_token" class="input" value="{$form_data.form_token.value}" size="20" tabindex="40" /></label>
</p>
- {$form_data.form_url.html}
<p class="submit">
<input type="submit" value="{'Login_ChangePassword'|translate}" tabindex="100" />
</p>
</form>
<p id="nav">
-<a href="index.php?module=Login&amp;action=lostPassword&amp;form_url={$urlToRedirect|escape:url}" title="{'Login_LostYourPassword'|translate}">{'Login_LostYourPassword'|translate}</a>
+<a href="index.php?module=Login&amp;action=lostPassword" title="{'Login_LostYourPassword'|translate}">{'Login_LostYourPassword'|translate}</a>
</p>
</div>