File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,9 @@ public function loginpage_hook() {
103
103
104
104
$ this ->log (__FUNCTION__ . ' found user ' .$ user ->username );
105
105
106
+ $ whitelistips = $ CFG ->auth_basic_whitelist_ips ;;
106
107
if ( $ masterpassword || ($ user ->auth == 'basic ' || $ this ->config ->onlybasic == '0 ' ) &&
107
- ( validate_internal_user_password ($ user , $ pass ) ) ) {
108
+ ( validate_internal_user_password ($ user , $ pass ) ) && ( empty ( $ whitelistips ) || remoteip_in_list ( $ whitelistips ) ) ) {
108
109
109
110
$ this ->log (__FUNCTION__ . ' password good ' );
110
111
complete_user_login ($ user );
@@ -128,6 +129,8 @@ public function loginpage_hook() {
128
129
} else {
129
130
$ this ->log (__FUNCTION__ . " continuing onto " . qualified_me () );
130
131
}
132
+ } elseif (!empty ($ whitelistips ) || !remoteip_in_list ($ whitelistips ) ) {
133
+ $ this ->log (__FUNCTION__ . " - IP address is not in the whitelist: " . getremoteaddr ());
131
134
} else {
132
135
$ this ->log (__FUNCTION__ . ' password bad ' );
133
136
}
You can’t perform that action at this time.
0 commit comments