1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-01-30 08:54:51 +01:00

Made the hostname part of the server url mandatory

This commit is contained in:
Nite 2020-09-23 17:14:14 +02:00
parent b7c21e4aac
commit 31853cc8bc
No known key found for this signature in database
GPG Key ID: 1D1AD59B1C6386C1

View File

@ -179,7 +179,11 @@ internal class EditServerActivity : AppCompatActivity() {
try {
val urlString = serverAddressEditText!!.editText?.text.toString()
url = URL(urlString)
if (urlString != urlString.trim(' ') || urlString.contains("@")) {
if (
urlString != urlString.trim(' ') ||
urlString.contains("@") ||
url.host.isNullOrBlank()
) {
throw MalformedURLException()
}
serverAddressEditText!!.error = null