Skip to content
Snippets Groups Projects
Commit b99c6f1f authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Send 401 header for OC_JSON::checkLoggedIn()

parent dfc3536d
Branches
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment