From f24609c143fde53a9bba8a3d82729407e9e7b2e9 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Wed, 13 Mar 2024 20:31:24 +0100 Subject: [PATCH] fix: Basic auth and password can have non whitspace characters. Fixes 142. --- .../amine/apps/readerforselfossv2/service/AppSettingsService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/service/AppSettingsService.kt b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/service/AppSettingsService.kt index 1b4a861..46c2475 100644 --- a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/service/AppSettingsService.kt +++ b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/service/AppSettingsService.kt @@ -441,7 +441,7 @@ class AppSettingsService(acraSenderServiceProcess: Boolean = false) { login: String, password: String, ) { - val regex = """\/\/(\D+):(\D+)@""".toRegex() + val regex = """\/\/(\S+):(\S+)@""".toRegex() val matchResult = regex.find(url) if (matchResult != null) { val (basicLogin, basicPassword) = matchResult.destructured