Closed Bug 1210356 Opened 5 years ago Closed 5 years ago

Make WebCryptoTransformer safer

Categories

(Firefox OS Graveyard :: Sync, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S8 (02Oct)

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

Attachments

(1 file)

In https://github.com/mozilla-b2g/gaia/blob/master/apps/sync/js/sync-engine/syncengine.js#L112-L113 (and to some extent also in https://github.com/mozilla-b2g/gaia/blob/master/apps/sync/js/sync-engine/syncengine.js#L121-L122) we make the assumption that the record contains no other fields than `id` and `payload`. If a DataAdapter would add other fields than that, they would be uploaded unencrypted. Safer would be:

return {
  id: record.id,
  payload
};
Assignee: nobody → mbdejong
Blocks: 1195647
Attachment #8668437 - Flags: review?(ferjmoreno)
Blocks: fxos-sync
Target Milestone: --- → FxOS-S8 (02Oct)
Comment on attachment 8668437 [details] [review]
[gaia] michielbdejong:1210356-safer-WebCryptoTransformer > mozilla-b2g:master

Thank you Michiel. The PR needs to be rebased.
Attachment #8668437 - Flags: review?(ferjmoreno) → review+
Rebased. Thanks for all your review work today!! We're starting to get really close now to tying it all together. :)
Flags: needinfo?(ferjmoreno)
Yes, we're very close!

There's a failing test that needs to be fixed before merging.
Flags: needinfo?(ferjmoreno) → needinfo?(mbdejong)
(In reply to Fernando Jiménez Moreno [:ferjm] from comment #4)
> Yes, we're very close!
> 
> There's a failing test that needs to be fixed before merging.

Oops! Merge error, and I forgot to re-run tests before pushing. My bad, fixed now.
Flags: needinfo?(mbdejong)
Flags: needinfo?(ferjmoreno)
There is still one failing test (ESL)
Flags: needinfo?(ferjmoreno)
Flags: needinfo?(mbdejong)
Green now, after a rebase. Sorry, should have checked that myself before needinfo'ing you.
Flags: needinfo?(mbdejong) → needinfo?(ferjmoreno)
Blocks: 1207468
Awesome, thank you Michiel!

https://github.com/mozilla-b2g/gaia/commit/0c3249c06bddb174fa868e2dc1ea0ac0c1588bd8
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(ferjmoreno)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.