Skip to content

Commit

Permalink
Send 401 header for OC_JSON::checkLoggedIn()
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasReschke committed Feb 16, 2016
1 parent dfc3536 commit b99c6f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static function checkAppEnabled($app) {
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();
}
Expand Down

0 comments on commit b99c6f1

Please sign in to comment.