From a2371370bc5795971347ba6d46be290cf9bb4862 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Mon, 16 Dec 2024 14:10:37 +0000 Subject: [PATCH] add a cap on the max retries to avoid any abuse --- src/services/Aquarius.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/services/Aquarius.ts b/src/services/Aquarius.ts index b84bdad62..6aa8c5dc5 100644 --- a/src/services/Aquarius.ts +++ b/src/services/Aquarius.ts @@ -64,6 +64,11 @@ export class Aquarius { maxRetries: number = 100 ): Promise { let tries = 0 + // lets have a cap to prevent possible abuse as well + if (maxRetries > 500) { + LoggerInstance.warn('Max Limit exceeded, defaulting to 500 retries.') + maxRetries = 500 + } do { try { const path = this.aquariusURL + '/api/aquarius/assets/ddo/' + did