Closed
Bug 1443835
Opened 6 years ago
Closed 6 years ago
Prevent modifications to the root folder via PlacesUtils.bookmarks.insert and PlacesUtils.bookmarks.update
Categories
(Toolkit :: Places, enhancement, P1)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Whiteboard: [fxsearch])
Attachments
(2 files)
Currently PlacesUtils.bookmarks.insert/update allow insert bookmarks into the root folder, or moving them there. We are attempting to prevent this, so that the only roots we have are the places routes, which will help sync to work correctly. Additionally in bug 1310295 we are removing all non-Places built-in items from the root, so we need to make sure we don't add any more.
Updated•6 years ago
|
Whiteboard: [fxsearch]
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•6 years ago
|
||
Note: some of the removals here, I've moved across from bug 1310295. I'm planning on landing both of these together, soon after 61 starts on nightly.
Comment hidden (mozreview-request) |
Updated•6 years ago
|
Status: NEW → ASSIGNED
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8957198 [details] Bug 1443835 - Stop using Netutil.newURI everywhere in test_async_transactions.js. https://reviewboard.mozilla.org/r/226148/#review232320 ::: toolkit/components/places/tests/unit/test_async_transactions.js:1222 (Diff revision 1) > newValue: aCurrentKeyword > }); > } > > - await PlacesUtils.keywords.insert({ keyword: "kw1", url: bm_info.url.spec, postData: "postData1" }); > - await PlacesUtils.keywords.insert({ keyword: "kw2", url: bm_info.url.spec, postData: "postData2" }); > + await PlacesUtils.keywords.insert({ keyword: "kw1", url: bm_info.url, postData: "postData1" }); > + await PlacesUtils.keywords.insert({ keyword: "kw2", url: bm_info.url, postData: "postData2" }); these may get some re-indentation
Attachment #8957198 -
Flags: review?(mak77) → review+
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8957196 [details] Bug 1443835 - Prevent modifications to the root folder via PlacesUtils.bookmarks.insert and PlacesUtils.bookmarks.update. https://reviewboard.mozilla.org/r/226146/#review232324 It looks great, I'm really happy to see this happening ::: toolkit/components/places/tests/bookmarks/test_bookmarks_update.js:313 (Diff revision 1) > + let folder = await PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid, > + type: PlacesUtils.bookmarks.TYPE_FOLDER }) ; > + let bm = await PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid, > + url: "http://example.com/", > + type: PlacesUtils.bookmarks.TYPE_BOOKMARK }) ; > + both could be reindented ::: toolkit/components/places/tests/unit/test_async_transactions.js:1608 (Diff revision 1) > await PT.clearTransactionsHistory(); > }); > > add_task(async function test_copy() { > async function duplicate_and_test(aOriginalGuid) { > - let txn = PT.Copy({ guid: aOriginalGuid, newParentGuid: rootGuid }); > + let txn = PT.Copy({ guid: aOriginalGuid, newParentGuid: PlacesUtils.bookmarks.unfiledGuid }); reindent
Attachment #8957196 -
Flags: review?(mak77) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b66a34b972d Prevent modifications to the root folder via PlacesUtils.bookmarks.insert and PlacesUtils.bookmarks.update. r=mak https://hg.mozilla.org/integration/autoland/rev/2079fe4a3c8f Stop using Netutil.newURI everywhere in test_async_transactions.js. r=mak
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8b66a34b972d https://hg.mozilla.org/mozilla-central/rev/2079fe4a3c8f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•