Skip to content
Permalink
Browse files

Bug: 13894 Avoid returning invalid strings in HTTP response.

Really no need to return the error message here anyway, just log it.
  • Loading branch information...
mrubinsk committed Mar 3, 2015
1 parent cf62fc5 commit bb52fdb413cc9abba46cf85789779a9fbd165817
Showing with 7 additions and 4 deletions.
  1. +7 −4 framework/Rpc/lib/Horde/Rpc/ActiveSync.php
@@ -149,18 +149,21 @@ public function getResponse($request)
}
} catch (Horde_ActiveSync_Exception_InvalidRequest $e) {
$this->_logger->err(sprintf(
'Returning HTTP 400 while handling %s command', $this->_get['Cmd']));
'Returning HTTP 400 while handling %s command. Error is: %s',
$this->_get['Cmd'], $e->getMessage()));
$this->_handleError($e);
header('HTTP/1.1 400 Invalid Request ' . $e->getMessage());
header('HTTP/1.1 400 Invalid Request');
exit;
} catch (Horde_Exception_AuthenticationFailure $e) {
$this->_sendAuthenticationFailedHeaders();
exit;
} catch (Horde_Exception $e) {
$this->_logger->err(sprintf(
'Returning HTTP 500 while handling %s command.', $this->_get['Cmd']));
'Returning HTTP 500 while handling %s command. Error is: %s',
$this->_get['Cmd'],
$e->getMessage()));
$this->_handleError($e);
header('HTTP/1.1 500 ' . $e->getMessage());
header('HTTP/1.1 500');
exit;
}
break;

0 comments on commit bb52fdb

Please sign in to comment.
You can’t perform that action at this time.