Skip to content

Commit 054a161

Browse files
author
Jordan Hall
committed
Fix globalUsername being set to true and thus not being checked correctly during authentication
1 parent 811d9dc commit 054a161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Middleware/BasicAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function validate($request, $user, $password, $routeUsername = null, $
8686
}
8787
}
8888
// Check if global username and password are set
89-
elseif ($globalUsername = config('laravel-route-restrictor.global.username') && $globalPassword = config('laravel-route-restrictor.global.password')) {
89+
elseif (($globalUsername = config('laravel-route-restrictor.global.username')) && ($globalPassword = config('laravel-route-restrictor.global.password'))) {
9090

9191
// Check against global password
9292
if (trim($user) == $globalUsername && trim($password) == $globalPassword) {

0 commit comments

Comments
 (0)