]> git.mxchange.org Git - friendica.git/blobdiff - mod/webfinger.php
Bump DB version
[friendica.git] / mod / webfinger.php
index 4024671b02f271c5a31956b58d54bb98afaf2259..d823bd2dc217b988c8f5d41839ee22f77bfde8a8 100644 (file)
@@ -1,7 +1,14 @@
 <?php
+require_once("include/Probe.php");
 
-if(! function_exists('webfinger_content')) {
-function webfinger_content(&$a) {
+function webfinger_content(App $a) {
+
+       if (!local_user()) {
+               http_status_exit(403,
+                               array("title" => t("Public access denied."),
+                                       "description" => t("Only logged in users are permitted to perform a probing.")));
+               killme();
+       }
 
        $o .= '<h3>Webfinger Diagnostic</h3>';
 
@@ -13,14 +20,10 @@ function webfinger_content(&$a) {
 
        if(x($_GET,'addr')) {
                $addr = trim($_GET['addr']);
-               if(strpos($addr,'@' !== false))
-                       $res = webfinger($addr);
-               else
-                       $res = lrdd($addr);
+               $res = Probe::lrdd($addr);
                $o .= '<pre>';
                $o .= str_replace("\n",'<br />',print_r($res,true));
                $o .= '</pre>';
        }
        return $o;
 }
-}