From f6fca3818a5f5e32afd02280c04fdbe77972075f Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Fri, 24 Jun 2022 19:32:22 +0200 Subject: don't allow accessing non-existing repositories --- planetwars-server/src/modules/registry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'planetwars-server/src/modules/registry.rs') diff --git a/planetwars-server/src/modules/registry.rs b/planetwars-server/src/modules/registry.rs index 8bc3a7d..c0e12d0 100644 --- a/planetwars-server/src/modules/registry.rs +++ b/planetwars-server/src/modules/registry.rs @@ -360,7 +360,7 @@ fn check_access( .expect("could not run query"); match res { - None => Ok(()), // name has not been claimed yet (TODO: verify its validity) + None => Err(StatusCode::FORBIDDEN), Some(existing_bot) => { let RegistryAuth::User(user) = auth; if existing_bot.owner_id == Some(user.id) { -- cgit v1.2.3