aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_webfinger
diff options
context:
space:
mode:
authorMichiel de Jong <michiel@unhosted.org>2012-05-07 09:46:15 +0200
committerMichiel de Jong <michiel@unhosted.org>2012-05-07 09:46:15 +0200
commitc4e47953aca6fe8fb0294d194b8a354437388486 (patch)
tree073c101b08e6b5c7dc1e0907820c0d4dd15b8432 /apps/user_webfinger
parent5155f589fd93132fdeb39b04fc18e30a5643cbf6 (diff)
downloadnextcloud-server-c4e47953aca6fe8fb0294d194b8a354437388486.tar.gz
nextcloud-server-c4e47953aca6fe8fb0294d194b8a354437388486.zip
require base lib and deal with malformed user addresses in webfinger.php
Diffstat (limited to 'apps/user_webfinger')
-rwxr-xr-xapps/user_webfinger/webfinger.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php
index e702f27b56e..7c59c53afec 100755
--- a/apps/user_webfinger/webfinger.php
+++ b/apps/user_webfinger/webfinger.php
@@ -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);