2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 09:58:08 +00:00

Allow hyphens in device ids

This commit is contained in:
Albert Vaca Cintora 2025-03-05 15:47:14 +01:00
parent 5aa6fae03b
commit 3eda9d4ef9
No known key found for this signature in database

View File

@ -110,7 +110,7 @@ class DeviceInfo(
isValidDeviceId(getString("deviceId", ""));
}
private val DEVICE_ID_REGEX = "^[a-zA-Z0-9_]{32,38}\$".toRegex()
private val DEVICE_ID_REGEX = "^[a-zA-Z0-9_-]{32,38}\$".toRegex()
@JvmStatic
fun isValidDeviceId(deviceId: String): Boolean = deviceId.matches(DEVICE_ID_REGEX)