Closed Bug 1407857 Opened 2 years ago Closed 2 years ago

Store record cleartexts instead of decrypting when writing uploaded records back to the buffer

Categories

(Firefox :: Sync, enhancement, P2)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1305563

People

(Reporter: Lina, Unassigned)

References

Details

In `_onRecordsWritten`, we currently need to decrypt the records we just uploaded, because encryption nulls out the cleartext. On IRC, Richard suggested stashing the cleartext before upload, and using that to update the buffer.

> rnewman> I think we originally didn't keep the cleartext around for two reasons: memory usage and the risk of leaking cleartext to the server
> so I'd be inclined to not add code that kept the cleartext in the same record object that we use for uploads
> tcsc> i think the risk of leaking it could be mitigated by throwing in PostQueue if the object returned by toJSON has a "cleartext" property
> http://searchfox.org/mozilla-central/source/services/sync/modules/record.js#958

As part of this, we'll also want to write weakly uploaded records back to the buffer. Currently, we only write back records in the strong changeset, and don't store references to weakly uploaded ones at all.
Priority: -- → P2
Fixed in the latest patch in bug 1305563.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1305563
You need to log in before you can comment on or make changes to this bug.