require base lib and deal with malformed user addresses in webfinger.php
This commit is contained in:
parent
5155f589fd
commit
c4e47953ac
|
@ -25,15 +25,17 @@ $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
|
|||
$WEBROOT=substr($SUBURI,0,-34);
|
||||
*/
|
||||
|
||||
require_once('../../lib/base.php');
|
||||
|
||||
$userName = '';
|
||||
$hostName = '';
|
||||
$request = strip_tags(urldecode($_GET['q']));
|
||||
if($_GET['q']) {
|
||||
$reqParts = explode('@', $request);
|
||||
$userName = $reqParts[0];
|
||||
$hostName = $reqParts[1];
|
||||
} else {
|
||||
$userName = '';
|
||||
$hostName = '';
|
||||
if(count($reqParts)==2) {
|
||||
$userName = $reqParts[0];
|
||||
$hostName = $reqParts[1];
|
||||
}
|
||||
}
|
||||
if(substr($userName, 0, 5) == 'acct:') {
|
||||
$userName = substr($userName, 5);
|
||||
|
|
Loading…
Reference in New Issue