mirror of
https://github.com/grocy/grocy.git
synced 2026-06-09 03:35:05 +00:00
Check for empty usernames in ReverseProxyAuthMiddleware (references #2843)
This commit is contained in:
@@ -40,7 +40,7 @@ class ReverseProxyAuthMiddleware extends AuthMiddleware
|
||||
else
|
||||
{
|
||||
$username = $request->getHeader(GROCY_REVERSE_PROXY_AUTH_HEADER);
|
||||
if (count($username) !== 1)
|
||||
if (count($username) !== 1 || (count($username) === 1 && strlen($username[0]) === 0))
|
||||
{
|
||||
// Invalid configuration of Proxy
|
||||
throw new \Exception('ReverseProxyAuthMiddleware: ' . GROCY_REVERSE_PROXY_AUTH_HEADER . ' header is missing or invalid');
|
||||
|
||||
Reference in New Issue
Block a user