Skip to content
Snippets Groups Projects
Commit c4e47953 authored by Michiel de Jong's avatar Michiel de Jong
Browse files

require base lib and deal with malformed user addresses in webfinger.php

parent 5155f589
Branches
No related tags found
No related merge requests found
...@@ -25,15 +25,17 @@ $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT)); ...@@ -25,15 +25,17 @@ $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
$WEBROOT=substr($SUBURI,0,-34); $WEBROOT=substr($SUBURI,0,-34);
*/ */
require_once('../../lib/base.php');
$userName = '';
$hostName = '';
$request = strip_tags(urldecode($_GET['q'])); $request = strip_tags(urldecode($_GET['q']));
if($_GET['q']) { if($_GET['q']) {
$reqParts = explode('@', $request); $reqParts = explode('@', $request);
if(count($reqParts)==2) {
$userName = $reqParts[0]; $userName = $reqParts[0];
$hostName = $reqParts[1]; $hostName = $reqParts[1];
} else { }
$userName = '';
$hostName = '';
} }
if(substr($userName, 0, 5) == 'acct:') { if(substr($userName, 0, 5) == 'acct:') {
$userName = substr($userName, 5); $userName = substr($userName, 5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment