diff options
Diffstat (limited to 'apps/user_webfinger')
-rwxr-xr-x | apps/user_webfinger/webfinger.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php index bb7bb68f776..307a1630019 100755 --- a/apps/user_webfinger/webfinger.php +++ b/apps/user_webfinger/webfinger.php @@ -51,12 +51,16 @@ if(isset($_SERVER['HTTPS'])) { $baseAddress = 'http://'; } $baseAddress .= $_SERVER['SERVER_NAME'].OC::$WEBROOT; +if(empty($id)) { + header("HTTP/1.0 400 Bad Request"); +} define('WF_USER', $userName); define('WF_ID', $id); define('WF_BASEURL', $baseAddress); echo "<"; ?> ?xml version="1.0" encoding="UTF-8"?> +<?php if(empty($id)) echo '<!-- Invalid URI: ' . str_replace('>', '/>', $request) . " -->\n"; ?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0"> <hm:Host xmlns="http://host-meta.net/xrd/1.0"><?php echo $_SERVER['SERVER_NAME']; ?></hm:Host> <Subject>acct:<?php echo $id ?></Subject> |