Commit 1084dea0 authored by mku's avatar mku

ZP-519 #comment show Z-Push legal page when accessing the autodiscover location in browser

git-svn-id: https://z-push.org/svn/z-push/trunk@1899 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 1950e34f
......@@ -52,6 +52,7 @@ include_once('../lib/interface/iexportchanges.php');
include_once('../lib/interface/iimportchanges.php');
include_once('../lib/interface/isearchprovider.php');
include_once('../lib/interface/istatemachine.php');
include_once('../version.php');
include_once('config.php');
class ZPushAutodiscover {
......@@ -69,6 +70,15 @@ class ZPushAutodiscover {
*/
public static function DoZPushAutodiscover() {
ZLog::Write(LOGLEVEL_DEBUG, '-------- Start ZPushAutodiscover');
// TODO use filterevilinput?
if (stripos($_SERVER["REQUEST_METHOD"], "GET") !== false) {
ZLog::Write(LOGLEVEL_WARN, "GET request for autodiscover. Exiting.");
if (!headers_sent()) {
ZPush::PrintZPushLegal('GET not supported');
}
ZLog::Write(LOGLEVEL_DEBUG, '-------- End ZPushAutodiscover');
exit(1);
}
if (!isset(self::$instance)) {
self::$instance = new ZPushAutodiscover();
}
......
......@@ -80,7 +80,7 @@
define('LOGFILE', LOGFILEDIR . 'autodiscover.log');
define('LOGERRORFILE', LOGFILEDIR . 'autodiscover-error.log');
define('LOGLEVEL', LOGLEVEL_INFO);
define('LOGUSERLEVEL', LOGLEVEL);
/**********************************************************************************
* Backend settings
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment