Add Device.validateLocalId for migration#2134
Open
ferdnyc wants to merge 1 commit into
Open
Conversation
The `Device.validateId()` function was made more liberal just prior to the release of v61, breaking its use in `_migrateConfiguration()` to trigger resetting of invalid device IDs. (It accepts hyphenated UUIDs, which we no longer want to consider valid local device IDs.) KDE Connect 1.35 has stopped accepting hyphenated IDs, so we really need to force migration of those. To facilitate that, add a new `Device.validateLocalId()` that accepts only UUID strings without separators, or with underscore separators (no hyphens), and use that in `_migrateConfiguration()`. Fixes GSConnect#2133
andyholmes
approved these changes
Feb 22, 2026
andyholmes
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, sorry for the long delay.
daniellandau
requested changes
Feb 22, 2026
daniellandau
left a comment
Member
There was a problem hiding this comment.
The IDs with dashes are explicitly allowed by the protocol and the recent breakage reports seem to have been about IP address restrictions so I don't think doing this makes any sense.
Collaborator
|
I might have misunderstood, per my approval, but I think this is intended to only apply to device IDs generated by GSConnect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Device.validateId()function was made more liberal just prior to the release of v61 (or was it v66?), breaking its use in_migrateConfiguration()to trigger resetting of invalid device IDs. (It accepts hyphenated UUIDs, which we no longer want to consider valid local device IDs.)KDE Connect 1.35 has stopped accepting hyphenated IDs, so we really need to force migration of those. To facilitate that, add a new
Device.validateLocalId()that accepts only UUID strings without separators, or with underscore separators (no hyphens), and use that in_migrateConfiguration().Fixes #2133