mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 17:16:59 +02:00
Hotfix for password update
This commit is contained in:
parent
955dd6ffe0
commit
c923aaceb0
2 changed files with 10 additions and 6 deletions
|
@ -657,9 +657,11 @@ class RegistrarsController extends Controller
|
||||||
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkPasswordComplexity($data['panelPassword'])) {
|
if (isset($data['panelPassword']) && $data['panelPassword']) {
|
||||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
if (!checkPasswordComplexity($data['panelPassword'])) {
|
||||||
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||||
|
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_SESSION['registrars_user_email'])) {
|
if (!empty($_SESSION['registrars_user_email'])) {
|
||||||
|
|
|
@ -312,9 +312,11 @@ class UsersController extends Controller
|
||||||
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkPasswordComplexity($password)) {
|
if (!empty($password)) {
|
||||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
if (!checkPasswordComplexity($password)) {
|
||||||
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||||
|
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if username already exists (excluding the current user)
|
// Check if username already exists (excluding the current user)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue