Commit 6c122be7 authored by Bart Vullings's avatar Bart Vullings

ZP-1273 Bugfix missing warnings for autodiscover. Released under the Affero...

ZP-1273 Bugfix missing warnings for autodiscover. Released under the Affero GNU General Public License (AGPL) version 3.
parent 09493d72
...@@ -83,6 +83,8 @@ class ZPushAutodiscover { ...@@ -83,6 +83,8 @@ class ZPushAutodiscover {
if ($incomingXml->Request->AcceptableResponseSchema == ZPushAutodiscover::ACCEPTABLERESPONSESCHEMAMOBILESYNC) { if ($incomingXml->Request->AcceptableResponseSchema == ZPushAutodiscover::ACCEPTABLERESPONSESCHEMAMOBILESYNC) {
$response = $this->createResponse($email, $userFullname); $response = $this->createResponse($email, $userFullname);
setcookie("membername", $username); setcookie("membername", $username);
}else {
ZLog::Write(LOGLEVEL_ERROR, "Request for outlook response schema, this is not supported");
} }
} }
...@@ -135,7 +137,9 @@ class ZPushAutodiscover { ...@@ -135,7 +137,9 @@ class ZPushAutodiscover {
* @return SimpleXMLElement * @return SimpleXMLElement
*/ */
private function getIncomingXml() { private function getIncomingXml() {
if ($_SERVER['CONTENT_LENGTH'] > ZPushAutodiscover::MAXINPUTSIZE) { if (!isset($_SERVER['CONTENT_LENGTH'])) {
ZLog::Write(LOGLEVEL_WARN, sprintf("ZPushAutodiscover->getIncomingXml() client did not provide content length header, can not check request input size"));
} elseif ($_SERVER['CONTENT_LENGTH'] > ZPushAutodiscover::MAXINPUTSIZE) {
throw new ZPushException('The request input size exceeds 8kb.'); throw new ZPushException('The request input size exceeds 8kb.');
} }
......
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