Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
fix(Logger): regex missing whitespace capture
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Feb 26, 2023
1 parent 0ed6976 commit 71376e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -150,7 +150,6 @@ class LoginViewModel(
}

private suspend fun finishLogin(token: String) {
println(cookies)
val stringCookies = cookies?.joinToString(",") {
renderSetCookieHeader(it).encodeBase64()
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/xinto/opencord/util/Logger.kt
Expand Up @@ -11,7 +11,7 @@ interface Logger {
}

class LoggerImpl : Logger {
private val fieldRegex = """"(login|password|email|phone|token)":"[^"]+"""".toRegex()
private val fieldRegex = """"(login|password|email|phone|token)"\s*:\s*"[^"]+"""".toRegex()

private fun clean(message: String): String {
return message.replace(fieldRegex) {
Expand Down

0 comments on commit 71376e1

Please sign in to comment.