Send 401 header for OC_JSON::checkLoggedIn()

This commit is contained in:
Lukas Reschke 2016-02-16 09:48:40 +01:00
parent dfc3536d2b
commit b99c6f1f67
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class OC_JSON{
public static function checkLoggedIn() {
if( !OC_User::isLoggedIn()) {
$l = \OC::$server->getL10N('lib');
http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED);
self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' )));
exit();
}