Merge pull request #6293 from nextcloud/less-user-enumeration
Return the user id in case of an error
This commit is contained in:
commit
79a7b7f192
|
@ -143,7 +143,7 @@ class AvatarController extends Controller {
|
|||
} catch (\Exception $e) {
|
||||
$resp = new JSONResponse([
|
||||
'data' => [
|
||||
'displayname' => '',
|
||||
'displayname' => $userId,
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ class AvatarControllerTest extends \Test\TestCase {
|
|||
//Comment out until JS is fixed
|
||||
//$this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus());
|
||||
$this->assertEquals(Http::STATUS_OK, $response->getStatus());
|
||||
$this->assertEquals('', $response->getData()['data']['displayname']);
|
||||
$this->assertEquals('userDoesNotExist', $response->getData()['data']['displayname']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue