fix: resolve 5 critical vulnerabilities from L3 security audit
fix: resolve 5 critical vulnerabilities from L3 security audit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Session cleanup configuration
|
||||
*/
|
||||
export interface SessionCleanupConfig {
|
||||
enabled: boolean
|
||||
intervalMs: number
|
||||
cleanupHour: number
|
||||
secondaryDeviceInactiveDays: number
|
||||
primaryDeviceInactiveDays: number
|
||||
lidOrphanHours: number
|
||||
cleanupOnStartup: boolean
|
||||
autoCleanCorrupted: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Session cleanup statistics
|
||||
*/
|
||||
export interface SessionCleanupStats {
|
||||
totalScanned: number
|
||||
secondaryDevicesDeleted: number
|
||||
primaryDevicesDeleted: number
|
||||
lidOrphansDeleted: number
|
||||
totalDeleted: number
|
||||
durationMs: number
|
||||
errors: number
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import type { URL } from 'url'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
import type { ILogger } from '../Utils/logger'
|
||||
import type { CircuitBreakerOptions } from '../Utils/circuit-breaker'
|
||||
import type { SessionCleanupConfig } from './SessionCleanup'
|
||||
import type { AuthenticationState, LIDMapping, SignalAuthState, TransactionCapabilityOptions } from './Auth'
|
||||
import type { GroupMetadata } from './GroupMetadata'
|
||||
import { type MediaConnInfo, type WAMessageKey } from './Message'
|
||||
@@ -252,4 +253,7 @@ export type SocketConfig = {
|
||||
* @see https://github.com/WhiskeySockets/Baileys/pull/2294
|
||||
*/
|
||||
enableUnifiedSession?: boolean
|
||||
|
||||
/** Session cleanup configuration (optional, partial overrides merged with defaults) */
|
||||
sessionCleanupConfig?: Partial<SessionCleanupConfig>
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ export * from './Product'
|
||||
export * from './Call'
|
||||
export * from './Signal'
|
||||
export * from './Newsletter'
|
||||
export * from './SessionCleanup'
|
||||
|
||||
import type { AuthenticationState } from './Auth'
|
||||
import type { SocketConfig } from './Socket'
|
||||
|
||||
Reference in New Issue
Block a user