From 99fbe96f5c8e3f34a148498e83494a28ed953b72 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 03:57:24 +0000 Subject: [PATCH] security: Remove unused vulnerable logging function in NostrClient Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- js/nostr/client.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/js/nostr/client.js b/js/nostr/client.js index f84ebe5c..b6f5eba9 100644 --- a/js/nostr/client.js +++ b/js/nostr/client.js @@ -297,24 +297,6 @@ const EVENTS_CACHE_DB_VERSION = 1; const DEFAULT_VIDEO_REQUEST_LIMIT = 150; const MAX_VIDEO_REQUEST_LIMIT = 500; -// To limit error spam -let errorLogCount = 0; -const MAX_ERROR_LOGS = 100; -function logErrorOnce(message, eventContent = null) { - if (errorLogCount < MAX_ERROR_LOGS) { - userLogger.error(message); - if (eventContent) { - devLogger.log(`Event Content: ${eventContent}`); - } - errorLogCount++; - } - if (errorLogCount === MAX_ERROR_LOGS) { - userLogger.error( - "Maximum error log limit reached. Further errors will be suppressed." - ); - } -} - export const __testExports = { runNip07WithRetry, DEFAULT_NIP07_ENCRYPTION_METHODS,