chiark / gitweb /
bundles: Reset the access key on clear
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 16:20:09 +0000 (17:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 16:22:09 +0000 (17:22 +0100)
This invalidates the old urls for the old bundles.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs

index fcb39f76c7cb34a6c5f0e9a6a37f6a4240f4d7a9..5aa3362e18fb4286d8e375a608658e6350996900 100644 (file)
@@ -967,9 +967,14 @@ impl InstanceBundles {
         }
       }
 
+      let new_asset_key = AssetUrlKey::new_random()?;
+
       // Right, everything is at most NEARLY-ASENT, make them ABSENT
       self.bundles.clear();
 
+      // Prevent old, removed, players from accessing any new bundles.
+      ig.asset_url_key = new_asset_key;
+
       Ok::<_,IE>(())
     })()?;
   }