Skip to content

Commit b40cfb3

Browse files
committed
Maskert logging
1 parent 2a53f8e commit b40cfb3

File tree

1 file changed

+6
-3
lines changed
  • backend/src/main/kotlin/no/nais/cloud/testnais/sandbox/bachelorurlforkorter/common/config

1 file changed

+6
-3
lines changed

backend/src/main/kotlin/no/nais/cloud/testnais/sandbox/bachelorurlforkorter/common/config/Config.kt

+6-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ data class DbConfig(
4848

4949
private fun maskJdbcUrl(jdbcUrl: String): String {
5050
return jdbcUrl
51-
.replace(Regex("(?<=://)[^:/]+:[^@]+@"), "****:****@")
52-
.replace(Regex("(?<=password=)[^&]+"), "****")
53-
.replace(Regex("(?<=user=)[^&]+"), "****")
51+
.replace(Regex("(?<=://)[^:/]+:[^@]+@"), "*****:*****@")
52+
.replace(Regex("(?<=password=)[^&]+"), "*****")
53+
.replace(Regex("(?<=user=)[^&]+"), "*****")
54+
.replace(Regex("(?<=sslcert=)[^&]+"), "*****")
55+
.replace(Regex("(?<=sslkey=)[^&]+"), "*****")
56+
.replace(Regex("(?<=sslrootcert=)[^&]+"), "*****")
5457
}
5558
}
5659

0 commit comments

Comments
 (0)