]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Return 404 on resource-not-found for WebFinger
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 4 Jun 2014 10:46:06 +0000 (12:46 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 4 Jun 2014 10:46:06 +0000 (12:46 +0200)
plugins/WebFinger/actions/webfinger.php

index 92ab1241473d6c4709a4fb535ed04f2c5d4cdb17..d02eaa46d992693057202ddaba9c1fd27efc6d29 100644 (file)
@@ -40,15 +40,15 @@ class WebfingerAction extends XrdAction
             Event::handle('EndGetWebFingerResource', array($this->resource, &$this->target, $this->args));
         }
 
+        if (!$this->target instanceof WebFingerResource) {
+            throw new ServerException('Resource not found in local database.', 404);
+        }
+
         return true;
     }
 
     protected function setXRD()
     {
-        if (!($this->target instanceof WebFingerResource)) {
-            throw new Exception(_('Target not set for resource descriptor'));
-        }
-
         $this->xrd->subject = $this->resource;
 
         foreach ($this->target->getAliases() as $alias) {