From 2938b3e96072d21bac5c01dc54a79cf74c4bdf70 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 8 Feb 2016 12:14:35 +0100 Subject: [PATCH] Don't return true on requiresAuth if screen_name==='0' --- lib/apibareauthaction.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/apibareauthaction.php b/lib/apibareauthaction.php index 2b1e13cca0..d5bcb59f10 100644 --- a/lib/apibareauthaction.php +++ b/lib/apibareauthaction.php @@ -74,11 +74,8 @@ class ApiBareAuthAction extends ApiAuthAction } // check whether a user has been specified somehow - $id = $this->arg('id'); - $user_id = $this->arg('user_id'); - $screen_name = $this->arg('screen_name'); - - if (empty($id) && empty($user_id) && empty($screen_name)) { + if (!$this->arg('id') && !$this->arg('user_id') + && mb_strlen($this->arg('screen_name'))===0) { return true; }