aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-06-24 19:32:22 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-06-24 19:32:22 +0200
commitf6fca3818a5f5e32afd02280c04fdbe77972075f (patch)
treeba142e939295ff49d994521e8d1aee286bd63ada /planetwars-server
parent381ce040fda929f65c681d4134a03e3143659243 (diff)
downloadplanetwars.dev-f6fca3818a5f5e32afd02280c04fdbe77972075f.tar.xz
planetwars.dev-f6fca3818a5f5e32afd02280c04fdbe77972075f.zip
don't allow accessing non-existing repositories
Diffstat (limited to 'planetwars-server')
-rw-r--r--planetwars-server/src/modules/registry.rs2
1 files changed, 1 insertions, 1 deletions
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) {