SECURITY: Fix console logging vulnerabilities in production mode
- Replace unsafe console.error/warn calls with secure logging system - Implement production-safe logging that masks sensitive data - Add automatic sanitization for cryptographic keys and sensitive information - Create secure logging infrastructure for EnhancedSecureWebRTCManager and EnhancedSecureCryptoUtils - Prevent data leakage of internal logic and error details in production - Add production/development mode detection for appropriate logging levels - Implement server-side error logging for production environments
This commit is contained in:
@@ -2,10 +2,7 @@ class EnhancedSecureCryptoUtils {
|
||||
|
||||
static _keyMetadata = new WeakMap();
|
||||
|
||||
// Initialize secure logging system
|
||||
static {
|
||||
EnhancedSecureCryptoUtils.secureLog.init();
|
||||
}
|
||||
// Initialize secure logging system after class definition
|
||||
|
||||
// Utility to sort object keys for deterministic serialization
|
||||
static sortObjectKeys(obj) {
|
||||
@@ -2419,6 +2416,13 @@ class EnhancedSecureCryptoUtils {
|
||||
|
||||
return result === 0;
|
||||
}
|
||||
|
||||
// Initialize secure logging system after class definition
|
||||
static {
|
||||
if (EnhancedSecureCryptoUtils.secureLog && typeof EnhancedSecureCryptoUtils.secureLog.init === 'function') {
|
||||
EnhancedSecureCryptoUtils.secureLog.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { EnhancedSecureCryptoUtils };
|
||||
Reference in New Issue
Block a user