diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-06-24 19:32:22 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-06-24 19:32:22 +0200 |
commit | f6fca3818a5f5e32afd02280c04fdbe77972075f (patch) | |
tree | ba142e939295ff49d994521e8d1aee286bd63ada /planetwars-server/src | |
parent | 381ce040fda929f65c681d4134a03e3143659243 (diff) | |
download | planetwars.dev-f6fca3818a5f5e32afd02280c04fdbe77972075f.tar.xz planetwars.dev-f6fca3818a5f5e32afd02280c04fdbe77972075f.zip |
don't allow accessing non-existing repositories
Diffstat (limited to 'planetwars-server/src')
-rw-r--r-- | planetwars-server/src/modules/registry.rs | 2 |
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) { |