Fix security vulnerabilities
This commit is contained in:
+2
-8
@@ -9,14 +9,8 @@ export default async function trimAllCache() {
|
||||
const cached_item = cached_items[i];
|
||||
if (!cached_item.endsWith(`.meta.json`))
|
||||
continue;
|
||||
const cache_key = decodeURIComponent(cached_item.replace(/\.meta\.json/, ""));
|
||||
const trim_key = await trimCacheKey({
|
||||
key: cache_key,
|
||||
});
|
||||
if (trim_key.success) {
|
||||
cached_items.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
const cache_id = cached_item.replace(/\.meta\.json$/, "");
|
||||
await trimCacheKey({ cache_id });
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user