Ver código fonte

Merge pull request #1205 from owncloud/ocs_api

Return 401 headers when trying to access a restricted api call
tags/v5.0.0alpha1
Thomas Müller 11 anos atrás
pai
commit
0ed635240a
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2
    0
      lib/api.php

+ 2
- 0
lib/api.php Ver arquivo

@@ -94,6 +94,8 @@ class OC_API {
$response = new OC_OCS_Result(null, 998, 'Api method not found');
}
} else {
header('WWW-Authenticate: Basic realm="Authorization Required"');
header('HTTP/1.0 401 Unauthorized');
$response = new OC_OCS_Result(null, 997, 'Unauthorised');
}
// Send the response

Carregando…
Cancelar
Salvar