mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Fix/logging user sensitive config data in cleartext (#1634)
* Redact username and passwords from config log * Redact empty username and password * Make regex Username/Password case-insensitive in config redaction
This commit is contained in:
@@ -223,8 +223,8 @@ fun applicationSetup() {
|
||||
.root()
|
||||
.render(ConfigRenderOptions.concise().setFormatted(true))
|
||||
.replace(
|
||||
Regex("(\"(?:basicAuth|auth)(?:Username|Password)\"\\s:\\s)(?!\"\")\".*\""),
|
||||
"$1\"******\"",
|
||||
Regex("(\".*(?i:username|password).*\"\\s:\\s)\".*\""),
|
||||
"$1\"[REDACTED]\"",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user