Page MenuHomePhabricator

Fix payloadSizeExceeded calculated incorrectly
AcceptedPublic

Authored by angelika on Tue, Oct 15, 5:05 AM.
Tags
None
Referenced Files
F2982168: D13712.diff
Wed, Oct 16, 1:54 AM
F2980785: D13712.id45194.diff
Tue, Oct 15, 8:58 PM
F2979753: D13712.id.diff
Tue, Oct 15, 4:55 PM
F2978464: D13712.diff
Tue, Oct 15, 1:17 PM
Subscribers

Details

Reviewers
ashoat
kamil
Summary

notificationSizeValidator returns true if notification size is less than maximum notification size (that is, the size is correct). However we set payloadSizeExceeded
to true if notificationSizeValidator returns true. That's obviously wrong and we need to negate it.
I think the bug was introduced in the first place by notificationSizeValidator being not obvious name. I renamed it in another diff (D13713).

Test Plan
  1. Create a new chat
  2. Verify that notification is verified correctly, that is payloadSizeExceeded is false.

Diff Detail

Repository
rCOMM Comm
Branch
@graszka22/ENG-9376
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat requested changes to this revision.Tue, Oct 15, 9:30 AM

Nice work! It looks like Android has the same issue, but the variable is named slightly differently. If you agree with my assessment, can you fix it for Android too?

lib/push/crypto.js
55

How about here?

98

How about here?

This revision now requires changes to proceed.Tue, Oct 15, 9:30 AM
This revision is now accepted and ready to land.Tue, Oct 15, 2:53 PM