]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/api.php
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
[quix0rs-gnu-social.git] / actions / api.php
index 8762b4bcd3efc974831252987f72b8bb33bd4041..b8da852b536d469682f6fcee277894247696695e 100644 (file)
@@ -67,6 +67,7 @@ class ApiAction extends Action
                     $this->process_command();
                 } else {
                     # basic authentication failed
+                    common_log(LOG_WARNING, "Failed API auth attempt, nickname: $nickname.");
                     $this->show_basic_auth_error();
                 }
             }
@@ -143,8 +144,8 @@ class ApiAction extends Action
         }
 
         if (in_array($fullname, $bareauth)) {
-            # bareauth: only needs auth if without an argument
-            if ($this->api_arg) {
+            # bareauth: only needs auth if without an argument or query param specifying user
+            if ($this->api_arg || $this->arg('id') || is_numeric($this->arg('user_id')) || $this->arg('screen_name')) {
                 return false;
             } else {
                 return true;