From: Mikael Nordfeldth Date: Wed, 4 Jun 2014 10:46:06 +0000 (+0200) Subject: Return 404 on resource-not-found for WebFinger X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6d0ac21185f8827d530f5f55c49aeebd833e4602;p=quix0rs-gnu-social.git Return 404 on resource-not-found for WebFinger --- diff --git a/plugins/WebFinger/actions/webfinger.php b/plugins/WebFinger/actions/webfinger.php index 92ab124147..d02eaa46d9 100644 --- a/plugins/WebFinger/actions/webfinger.php +++ b/plugins/WebFinger/actions/webfinger.php @@ -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) {