Skip to content

Commit 8fd173f

Browse files
committed
Allow hyphens in device ids, for compatibility with gsconnect
1 parent b8cc637 commit 8fd173f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

KDE Connect/KDE Connect/Swift Backend/DeviceInfo.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DeviceInfo: NSObject {
6161
}
6262

6363
// swiftlint:disable:next force_try
64-
private static let validDeviceIdRegex = try! NSRegularExpression(pattern: "^[a-zA-Z0-9_]{32,38}$")
64+
private static let validDeviceIdRegex = try! NSRegularExpression(pattern: "^[a-zA-Z0-9_-]{32,38}$")
6565

6666
static func isValidDeviceId(deviceId: String) -> Bool {
6767
let range = NSRange(location: 0, length: deviceId.utf16.count)

0 commit comments

Comments
 (0)