Browse Source

Return NotFound for denied collection access

pull/7951/head
tom27052006 3 days ago
parent
commit
b6fc4a6bde
  1. 4
      src/auth.rs

4
src/auth.rs

@ -961,7 +961,9 @@ async fn collection_headers(request: &Request<'_>, action: CollectionAction) ->
Collection::is_coll_manageable_by_user(&col_id, &headers.membership.user_uuid, &conn).await Collection::is_coll_manageable_by_user(&col_id, &headers.membership.user_uuid, &conn).await
}; };
if !allowed { if !allowed {
err_handler!("The current user isn't a manager for this collection") // NotFound as in Bitwarden, the web vault logs the user out on a 401
error!(target: "auth", "Collection not found. The current user isn't a manager for this collection");
return Outcome::Error((rocket::http::Status::NotFound, "Collection not found"));
} }
Outcome::Success(headers) Outcome::Success(headers)
} }

Loading…
Cancel
Save