Closed Bug 1995696 Opened 3 months ago Closed 3 months ago

Don't populate Places menus if they create a recursive structure

Categories

(Firefox :: Bookmarks & History, task, P1)

task

Tracking

()

VERIFIED FIXED
146 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- verified
firefox144 --- wontfix
firefox145 --- verified
firefox146 --- verified

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng])

Attachments

(3 files)

To avoid issues with software that navigates through menus (e.g. accessiblity or system search) it would be better to not have infinite hierarchies, that folder shortcuts can easily create. The user may inadvertently create these shortcuts with drag and drop.
In Bug 1631239 we'll introduce a maintenance task to remove recursive structures, but we can start avoiding to populate menus when they end up creating this infinite hierarchies.
Bug 1979283 will also implement a limit on the widget side.

Attachment #9521696 - Attachment description: WIP: Bug 1995696 - Don't populate Places menus if they create a recursive structure → Bug 1995696 - Don't populate Places menus if they create a recursive structure
Pushed by mak77@bonardo.net: https://github.com/mozilla-firefox/firefox/commit/9cbe62581b7f https://hg.mozilla.org/integration/autoland/rev/acef1c203ca9 Don't populate Places menus if they create a recursive structure r=places-reviewers,Standard8

firefox-beta Uplift Approval Request

  • User impact if declined: Infinite bookmarks hierarchies in menus may cause third party software scanning menus loop indefinitely
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Can create a bookmark with url "place:parent=toolbar_____" on the toolbar, or in a subfolder on the toolbar... Or similarly, "place:parent=menu________" in the bookmarks menu. Instead of creating an infinite loop it will instead show an (empty) panel with the patch.
  • Risk associated with taking this patch: low
  • Explanation of risk level: The patch concept is simple, walking up parentNodes and checking bookmark GUIDs.
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9522017 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Regressions: 1996078
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
Attachment #9522017 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift] [qa-ver-needed-c146/b145]

Hi, I have reproduced the issue using Beta 145.0b5 (20251022093404) and attempted to verify the fix using Nightly 146.0a1 (20251024094538).
Creating a bookmark on the toolbar or a subfolder on the toolbar with the URL "place:parent=toolbar_____" no longer creates an infinite loop of bookmarks, however, creating a bookmark with the URL "place:parent=menu________" in the bookmarks menu still does.

SS: https://imgur.com/PdXQTvZ

QA Contact: pmagyari

(In reply to Peter Magyari (Desktop QA) from comment #7)

however, creating a bookmark with the URL "place:parent=menu________" in the bookmarks menu still does.

That looks like the Sidebar, this fix is only for menu views. (e.g. the native menubar on MacOS, the menubar visible on Windows when pressing ALT)

Flags: needinfo?(pmagyari)

You are right, I have also verified it using Beta 145.0b7 (20251027114755) on Windows 10, MacOS 15 and Ubuntu 24.04, I'm setting the flags accordingly. Thanks!

Flags: needinfo?(pmagyari)

We probably want this on ESR140 also?

Flags: needinfo?(mak)
Flags: in-testsuite+

firefox-esr140 Uplift Approval Request

  • User impact if declined: Possible hang if a third party software walks the application native menus
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: See previous requests
  • Risk associated with taking this patch: low
  • Explanation of risk level: the patch is pretty simple and no issues reported so far.
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9524102 - Flags: approval-mozilla-esr140?
Attachment #9524102 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+

Verified fixed on 140.5.0esr (20251103105753)

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift] [qa-ver-needed-c146/b145] → [uplift] [qa-ver-done-c146/b145]
Flags: qe-verify+
Flags: needinfo?(mak)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: