From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/http/lib/Auth/Bearer.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'vendor/sabre/http/lib/Auth/Bearer.php') diff --git a/vendor/sabre/http/lib/Auth/Bearer.php b/vendor/sabre/http/lib/Auth/Bearer.php index eefdf11ee..988bb29d2 100644 --- a/vendor/sabre/http/lib/Auth/Bearer.php +++ b/vendor/sabre/http/lib/Auth/Bearer.php @@ -1,5 +1,7 @@ request->getHeader('Authorization'); if (!$auth) { return null; } - if (strtolower(substr($auth, 0, 7)) !== 'bearer ') { + if ('bearer ' !== strtolower(substr($auth, 0, 7))) { return null; } return substr($auth, 7); - } /** * This method sends the needed HTTP header and statuscode (401) to force * authentication. - * - * @return void */ - function requireLogin() { - - $this->response->addHeader('WWW-Authenticate', 'Bearer realm="' . $this->realm . '"'); + public function requireLogin() + { + $this->response->addHeader('WWW-Authenticate', 'Bearer realm="'.$this->realm.'"'); $this->response->setStatus(401); - } - } -- cgit v1.2.3