mirror of
https://github.com/AChep/keyguard-app.git
synced 2025-01-23 19:00:59 +01:00
improvement(Autofill): Skip localhost-ed web page hint if it is not a browser
This commit is contained in:
parent
bb028c666e
commit
70a69d0ce9
@ -523,11 +523,22 @@ class AutofillStructureParser {
|
||||
)
|
||||
items += item
|
||||
}
|
||||
|
||||
// It it is a web view that renders localhost,
|
||||
// then ignore the webview hint -- a user is probably
|
||||
// not supposed to know that anyway.
|
||||
val isInSelfHostedServer = kotlin.run {
|
||||
val webDomain = autofillStructure?.webDomain
|
||||
val webView = autofillStructure?.webView == true
|
||||
webView &&
|
||||
(webDomain == "127.0.0.1" ||
|
||||
webDomain == "localhost")
|
||||
}
|
||||
return AutofillStructure2(
|
||||
applicationId = applicationId,
|
||||
webDomain = autofillStructure?.webDomain,
|
||||
webScheme = autofillStructure?.webScheme,
|
||||
webView = autofillStructure?.webView,
|
||||
webDomain = autofillStructure?.webDomain.takeUnless { isInSelfHostedServer },
|
||||
webScheme = autofillStructure?.webScheme.takeUnless { isInSelfHostedServer },
|
||||
webView = autofillStructure?.webView.takeUnless { isInSelfHostedServer },
|
||||
items = items,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user