mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05: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()
|
.root()
|
||||||
.render(ConfigRenderOptions.concise().setFormatted(true))
|
.render(ConfigRenderOptions.concise().setFormatted(true))
|
||||||
.replace(
|
.replace(
|
||||||
Regex("(\"(?:basicAuth|auth)(?:Username|Password)\"\\s:\\s)(?!\"\")\".*\""),
|
Regex("(\".*(?i:username|password).*\"\\s:\\s)\".*\""),
|
||||||
"$1\"******\"",
|
"$1\"[REDACTED]\"",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user