-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support new device ID format #1911
base: main
Are you sure you want to change the base?
Conversation
6fae25a
to
3613d85
Compare
_migrateConfiguration() { | ||
if (Device.validateId(this.settings.get_string('id'))) | ||
return; | ||
|
||
// Remove the old certificate, serving as the single source of truth | ||
// for the device ID | ||
try { | ||
Gio.File.new_build_filenamev([Config.CONFIGDIR, 'certificate.pem']) | ||
.delete(null); | ||
Gio.File.new_build_filenamev([Config.CONFIGDIR, 'private.pem']) | ||
.delete(null); | ||
} catch { | ||
// Silence errors | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks sensible, but I wonder if we need some sort of notification to the user, when the migration process triggers? ("Hey, we had to re-generate your local device ID, so all of your devices need to be re-paired. Lusciously sorry!")
I hate this test suite so much, so much. |
I don't mind admitting, it scares the bejesus out of me. I managed to wrap my brain around JUnit1 in a day or two, a while back, at least well enough so that I could accomplish what I needed to. But jasmine? Uh-uh. (And the friction increased by a factor of about 5, once the tests could no longer be run un-installed after the move to ESM.)
|
9384e5b
to
de04c0f
Compare
9bd75d9
to
48d0e80
Compare
Add support for the planned changes in protocol version 8. See: https://invent.kde.org/network/kdeconnect-android/-/commit/454b2fd5d7b3162443fbec4a6f0b7cafa1b554ee
Update the certificate generation to produce EC-based certificates with the required device ID format.
Check incoming device IDs and reject connections from those with an ID not matching `/[a-zA-Z0-9_]{32,38}/`.
Migrate installations to new certificates, with device IDs following the protocol v8 constraints.
Add a brief notification, explaining that GSConnect has been updated and some devices may require re-pairing.
48d0e80
to
59be25a
Compare
There's still some bits left to do for protocol v8, so I'm probably going to split this up before review. |
Update the certificate generation to produce EC-based certificates
with the required device ID format and reject connections from those
with an ID not matching
/[a-zA-Z0-9_]{32,38}/
.Migrate installations to new certificates, with device IDs
following the protocol v8 constraints.
closes #1910