Skip to content

Commit

Permalink
make ip obfuscation lower case
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
eirsep committed Aug 18, 2023
1 parent a3823a3 commit 728f384
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ data class AlertError(val timestamp: Instant, var message: String) : Writeable,

fun obfuscateIPAddresses(exceptionMessage: String): String {
val ipAddressPattern = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
val obfuscatedMessage = exceptionMessage.replace(ipAddressPattern.toRegex(), "X.X.X.X")
val obfuscatedMessage = exceptionMessage.replace(ipAddressPattern.toRegex(), "x.x.x.x")
return obfuscatedMessage
}
}
Expand Down

0 comments on commit 728f384

Please sign in to comment.