diff --git a/classes/script_start.php b/classes/script_start.php
index e70d73a7..b06c6cf3 100644
--- a/classes/script_start.php
+++ b/classes/script_start.php
@@ -328,6 +328,20 @@ function logout() {
die();
}
+/**
+ * Logout all sessions
+ */
+function logout_all_sessions() {
+ $UserID = G::$LoggedUser['ID'];
+
+ G::$DB->query("
+ DELETE FROM users_sessions
+ WHERE UserID = '$UserID'");
+
+ G::$Cache->delete_value('users_sessions_' . $UserID);
+ logout();
+}
+
function enforce_login() {
global $SessionID;
if (!$SessionID || !G::$LoggedUser) {
diff --git a/sections/friends/index.php b/sections/friends/index.php
index 2dd51736..81662be7 100644
--- a/sections/friends/index.php
+++ b/sections/friends/index.php
@@ -18,9 +18,7 @@
authorize();
include(SERVER_ROOT.'/sections/friends/comment.php');
break;
- case 'whois':
- include(SERVER_ROOT.'/sections/friends/whois.php');
- break;
+
case 'Contact':
header('Location: inbox.php?action=compose&to='.$_POST['friendid']);
break;
diff --git a/sections/login/index.php b/sections/login/index.php
index 630324d5..a255f702 100644
--- a/sections/login/index.php
+++ b/sections/login/index.php
@@ -46,7 +46,7 @@
if ($UserID && strtotime($Expires) > time()) {
// If the user has requested a password change, and his key has not expired
- $Validate->SetFields('password', '1', 'regex', 'You entered an invalid password. A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, contains at least a number or symbol', array('regex' => '/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/'));
+ $Validate->SetFields('password', '1', 'regex', 'You entered an invalid password. A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol, or is 20 characters or longer', array('regex' => '/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$|.{20,}/'));
$Validate->SetFields('verifypassword', '1', 'compare', 'Your passwords did not match.', array('comparefield' => 'password'));
if (!empty($_REQUEST['password'])) {
@@ -65,6 +65,7 @@
i.ResetExpires = '0000-00-00 00:00:00'
WHERE m.ID = '$UserID'
AND i.UserID = m.ID");
+
$DB->query("
INSERT INTO users_history_passwords
(UserID, ChangerIP, ChangeTime)
diff --git a/sections/login/recover_step2.php b/sections/login/recover_step2.php
index 21f9a3fa..02f0e8bf 100644
--- a/sections/login/recover_step2.php
+++ b/sections/login/recover_step2.php
@@ -13,7 +13,7 @@
if (!empty($Err)) {
?>
=display_str($Err)?>
- } ?> A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol.
+ } ?> A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol, or is 20 characters or longer.
Password | diff --git a/sections/register/index.php b/sections/register/index.php index 80696742..dd810c3a 100644 --- a/sections/register/index.php +++ b/sections/register/index.php @@ -34,7 +34,7 @@ } elseif (OPEN_REGISTRATION || !empty($_REQUEST['invite'])) { $Val->SetFields('username', true, 'regex', 'You did not enter a valid username.', array('regex' => USERNAME_REGEX)); $Val->SetFields('email', true, 'email', 'You did not enter a valid email address.'); - $Val->SetFields('password', true, 'regex', 'A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol', array('regex'=>'/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/')); + $Val->SetFields('password', true, 'regex', 'A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol, or is 20 characters or longer', array('regex'=>'/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$|.{20,}/')); $Val->SetFields('confirm_password', true, 'compare', 'Your passwords do not match.', array('comparefield' => 'password')); $Val->SetFields('readrules', true, 'checkbox', 'You did not select the box that says you will read the rules.'); $Val->SetFields('readwiki', true, 'checkbox', 'You did not select the box that says you will read the wiki.'); diff --git a/sections/register/step1.php b/sections/register/step1.php index 4c370f74..53ce0be0 100644 --- a/sections/register/step1.php +++ b/sections/register/step1.php @@ -41,7 +41,7 @@Verify password |
- A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or a symbol. +A strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or a symbol, or is 20 characters or longer. |