From: Zach Copley Date: Fri, 26 Mar 2010 18:51:01 +0000 (+0000) Subject: Return an http auth error, when a client sends in an invalid auth user, even when... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b82e55356d4ea306b1069ba5acc8878ce18c2abc;p=quix0rs-gnu-social.git Return an http auth error, when a client sends in an invalid auth user, even when http auth is not required. --- diff --git a/lib/apiauth.php b/lib/apiauth.php index 17f803a1ca..e78de618ee 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -267,7 +267,7 @@ class ApiAuthAction extends ApiAction $this->access = self::READ_WRITE; - if (empty($this->auth_user) && $required) { + if (empty($this->auth_user) && ($required || isset($_SERVER['PHP_AUTH_USER']))) { // basic authentication failed