Commit 0e4a1a39 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #534 in ZP/z-push from...

Merge pull request #534 in ZP/z-push from bugfix/ZP-1221-unable-to-create-ol2013-profile-when to develop

* commit 'df7b6b94':
  ZP-1221 Make sure authentication during OPTIONS request is done after processing all headers and converting charset encodings.
parents c4850443 df7b6b94
......@@ -55,17 +55,17 @@ include_once(ZPUSH_CONFIG);
if (! Request::HasAuthenticationInfo() || !Request::GetGETUser())
throw new AuthenticationRequiredException("Access denied. Please send authorisation information");
ZPush::CheckAdvancedConfig();
// Process request headers and look for AS headers
Request::ProcessHeaders();
// Stop here if this is an OPTIONS request
if (Request::IsMethodOPTIONS()) {
RequestProcessor::Authenticate();
throw new NoPostRequestException("Options request", NoPostRequestException::OPTIONS_REQUEST);
}
ZPush::CheckAdvancedConfig();
// Process request headers and look for AS headers
Request::ProcessHeaders();
// Check required GET parameters
if(Request::IsMethodPOST() && (Request::GetCommandCode() === false || !Request::GetDeviceID() || !Request::GetDeviceType()))
throw new FatalException("Requested the Z-Push URL without the required GET parameters");
......
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