-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Hotfix: Ignore invalid expire timer sync resets #2086
Conversation
iOS inadvertently sends `null` `expireTimer` for groups during contact sync. Ignore these resets until we have fixed the issue. See: #2079
js/background.js
Outdated
// TODO: Remove once | ||
// https://github.com/signalapp/Signal-Desktop/issues/2079 | ||
// is resolved: | ||
const isInvalidIOSExpireTimerReset = expireTimer === null; |
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.
Does this work?
My understanding of the iOS bug was not that we set the field with a weird value, but that we just never set it.
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.
Here's a link to the diff:
In the future, we will use zero (`0`) to denote disabling of expire timer.
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.
Annotated PR.
source, | ||
receivedAt, | ||
{fromSync: true} | ||
); |
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.
We should dedupe the two identical code snippets above but I didn’t to reduce risk for the hotfix.
Tested this with Signal iOS 2.19.6 and Signal Android 4.15.5 and it ignores (and logs) all non-numeric |
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.
Looks good. Also testing locally.
Note: This release is equivalent to v1.5.2 Fixed: If interrupted in the middle of an import, next registration would leave that imported data in the database (#2072) Fixed: In some cases on OSX, View menu would not have Debug Log option (#2089) Fixed: In import/registration flow, choosing View -> Debug Log would do nothing (#2089) Fixed: In some cases contact/group syncs would turn off disappearing messages in all conversations (#2086) Fixed: On initial setup, conversations with disappearing messages enabled would be at the top of the conversation list (#2084)
iOS omits
expireTimer
protobuf property to denote disappearing messages have been turned off. However, that doesn’t allow us to distinguish it from old clients that are not aware of this property. This change ignores these invalid values until we consistently use0
to denote disabled disappearing messages.expireTimer
values during contact sync. Long-term, we’ll use0
to denote turning off expire timers.expireTimer
is set to.expireTimer
inhandleDataMessage
until it usesConversationController::updateExpirationTimer
.