mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
security: Remove unused vulnerable logging function in NostrClient
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
2e50c7a58f
commit
99fbe96f5c
1 file changed
-18
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user