It is possible to write over nsIUpdate and nsIUpdatePatch readonly attributes using setProperty since they also implement nsIWritablePropertyBag

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: rstrong, Assigned: rstrong)

Tracking

59 Branch
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted patch patch rev1 (obsolete) — Splinter Review

This is mainly for correctness and that it bothers me that the attributes (especially the read only attributes) can be over written by nsIWritablePropertyBag.

Posted patch patch rev2Splinter Review

Added another check to the constructors for safety

Attachment #9035444 - Attachment is obsolete: true
Attachment #9035444 - Flags: review?(mhowell)
Attachment #9035525 - Flags: review?(mhowell)
Attachment #9035525 - Flags: review?(mhowell) → review+

Comment 4

6 months ago
Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/df91f6e79753
Don't allow nsIWritablePropertyBag calls to overwrite nsIUpdate and nsIUpdatePatch attributes. r=mhowell

Comment 5

6 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.