summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichiel@unhosted <michiel@unhosted.org>2011-09-12 14:22:48 +0200
committerMichiel@unhosted <michiel@unhosted.org>2011-09-12 14:22:48 +0200
commit5685965fdb6462dc81755556c3baf0b03026970f (patch)
treef9c921bcb81c6ea8ed7f9609aed8aa002ed38de8
parentf93be510a358689d726bf50b5d6989159b05cda2 (diff)
downloadnextcloud-server-5685965fdb6462dc81755556c3baf0b03026970f.tar.gz
nextcloud-server-5685965fdb6462dc81755556c3baf0b03026970f.zip
improve uninstalled-protection
-rw-r--r--apps/user_webfinger/host-meta.php2
-rw-r--r--apps/user_webfinger/webfinger.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/user_webfinger/host-meta.php b/apps/user_webfinger/host-meta.php
index c37b7dd7769..ceb15f22da4 100644
--- a/apps/user_webfinger/host-meta.php
+++ b/apps/user_webfinger/host-meta.php
@@ -2,7 +2,7 @@
if($_SERVER['SCRIPT_NAME'] == '/.well-known/host-meta.php') {
header("Access-Control-Allow-Origin: *");
} else {
- header('Please visit /apps/user_webfinger/activate.php first');
+ header('Please-first: activate');
}
header("Content-Type: application/xml+xrd");
echo "<";
diff --git a/apps/user_webfinger/webfinger.php b/apps/user_webfinger/webfinger.php
index fdec9e8e563..4f94cc3c4fa 100644
--- a/apps/user_webfinger/webfinger.php
+++ b/apps/user_webfinger/webfinger.php
@@ -1,5 +1,9 @@
<?php
-header("Access-Control-Allow-Origin: *");
+if($_SERVER['SCRIPT_NAME'] == '/.well-known/host-meta.php') {
+ header("Access-Control-Allow-Origin: *");
+} else {
+ header('Please-first: activate');
+}
header("Content-Type: application/xml+xrd");
if($_GET['q']) {