X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSecurity%2FBasicAuth.php;h=fc31d34b0717507f3dce391bef656b2785ed8b0a;hb=e56a53647bd5469551bf4f9ef2df50a5dd16b943;hp=52657057e9078bedd34af0a2e5d75a700b18fa8d;hpb=42bd7918ad7172cdd3d2134d9be1478cd88a694d;p=friendica.git diff --git a/src/Security/BasicAuth.php b/src/Security/BasicAuth.php index 52657057e9..fc31d34b07 100644 --- a/src/Security/BasicAuth.php +++ b/src/Security/BasicAuth.php @@ -1,6 +1,6 @@ $_SERVER]); - header('WWW-Authenticate: Basic realm="Friendica"'); + // Checking for commandline for the tests, we have to avoid to send a header + if (php_sapi_name() !== 'cli') { + header('WWW-Authenticate: Basic realm="Friendica"'); + } throw new UnauthorizedException("This API requires login"); }