Skip to content

Commit

Permalink
android: make custom url check case-insensitive
Browse files Browse the repository at this point in the history
Fixes tailscale/corp#23210

Signed-off-by: kari-ts <kari@tailscale.com>
  • Loading branch information
barnstar committed Sep 18, 2024
1 parent 0b2a04b commit a6f4c44
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class LoginWithCustomControlURLViewModel : CustomLoginViewModel() {
// localAPIClient will use the default server if we give it a broken URL,
// but we can make sure we can construct a URL from the input string and
// ensure it has an http/https scheme
when (urlStr.startsWith("http") && urlStr.contains("://") && urlStr.length > 7) {
when (urlStr.startsWith("http", ignoreCase = true) &&
urlStr.contains("://") &&
urlStr.length > 7) {
false -> {
errorDialog.set(ErrorDialogType.INVALID_CUSTOM_URL)
return
Expand Down

0 comments on commit a6f4c44

Please sign in to comment.