Skip to content

Commit 37b90d6

Browse files
committed
404 instead of 500 error on bad groupID or userID
Applies to endpoints like /groups/BAD_NAME/items or /users/BAD_NAME/items Fixes: zotero#96
1 parent 2cf66c3 commit 37b90d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/ItemsController.php

+4
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ public function items() {
269269
else {
270270
$this->allowMethods(array('HEAD', 'GET', 'POST', 'DELETE'));
271271

272+
if (!$this->objectLibraryID){
273+
$this->e404();
274+
}
275+
272276
// Check for general library access
273277
if (!$this->publications && !$this->permissions->canAccess($this->objectLibraryID)) {
274278
$this->e403();

0 commit comments

Comments
 (0)