mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
nexus guard use ip
This commit is contained in:
@@ -77,7 +77,7 @@ class NexusWebUserProvider implements UserProvider
|
||||
public function validateCredentials(Authenticatable $user, array $credentials)
|
||||
{
|
||||
if ($credentials["c_secure_login"] == base64("yeah")) {
|
||||
if ($credentials["c_secure_pass"] != md5($user->passhash . $_SERVER["REMOTE_ADDR"])) {
|
||||
if ($credentials["c_secure_pass"] != md5($user->passhash . getip())) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -58,7 +58,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||
return null;
|
||||
}
|
||||
if ($cookie["c_secure_login"] == base64("yeah")) {
|
||||
if ($cookie["c_secure_pass"] != md5($user->passhash . $_SERVER["REMOTE_ADDR"])) {
|
||||
if ($cookie["c_secure_pass"] != md5($user->passhash . getip())) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user