Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
commit
4ae8cc2e7d
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
//validate the token
|
//validate the token
|
||||||
$token = new token;
|
$token = new token;
|
||||||
if (!$token->validate('/app/devices/device_dashboard.php')) {
|
if (!$token->validate('/app/devices/device_dashboard.php') && !$token->validate('login')) {
|
||||||
message::add($text['message-invalid_token'],'negative');
|
message::add($text['message-invalid_token'],'negative');
|
||||||
header('Location: '.PROJECT_PATH."/core/user_settings/user_dashboard.php");
|
header('Location: '.PROJECT_PATH."/core/user_settings/user_dashboard.php");
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,10 @@
|
||||||
|
|
||||||
if (!$password_reset) {
|
if (!$password_reset) {
|
||||||
|
|
||||||
|
//create token
|
||||||
|
$object = new token;
|
||||||
|
$token = $object->create('login');
|
||||||
|
|
||||||
echo "<div id='login_form'>\n";
|
echo "<div id='login_form'>\n";
|
||||||
echo "<form name='login' method='post' action='".$_SESSION['login']['destination']['url']."'>\n";
|
echo "<form name='login' method='post' action='".$_SESSION['login']['destination']['url']."'>\n";
|
||||||
echo "<input type='text' class='txt login' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='username' id='username' placeholder=\"".$text['label-username']."\"><br />\n";
|
echo "<input type='text' class='txt login' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='username' id='username' placeholder=\"".$text['label-username']."\"><br />\n";
|
||||||
|
|
@ -262,6 +266,7 @@
|
||||||
) {
|
) {
|
||||||
echo "<br><br><a class='login_link' onclick=\"toggle_password_reset('login_form','request_form','email');\">".$text['label-reset_password']."</a>";
|
echo "<br><br><a class='login_link' onclick=\"toggle_password_reset('login_form','request_form','email');\">".$text['label-reset_password']."</a>";
|
||||||
}
|
}
|
||||||
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo "<script>$('#username').trigger('focus');</script>";
|
echo "<script>$('#username').trigger('focus');</script>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
||||||
Loading…
Reference in New Issue