Open Bug 1531335 Opened 2 years ago Updated 4 months ago

Awesomebar should not auto-complete "about:blank" to "about:blank/"

Categories

(Firefox :: Address Bar, defect, P2)

defect
Points:
3

Tracking

()

People

(Reporter: freddy, Unassigned)

References

Details

(Keywords: papercut, Whiteboard: [fxsearch])

As of a few weeks, the awesomebar autocompletes "about:blank" to "about:blank/", which gives me an error page instead of the blank page.

mak says, this is likely P1.

I actually thought this was a problem for all about autofills (thus P1), but it only affects blank, that is... funny. We should check what's up, maybe it's also affecting other cases.

Priority: P1 → P2
Whiteboard: [fxsearch]

I can reproduce easily if I have a bookmark to about:blank

This bug is present in Firefox 74.0 (Windows), but not anymore in Nightly 76.0a1 (2020-03-28).

Happens to me with about:config in 76.0b3

Steps to reproduce:

  1. Open about:config page and add it to bookmarks
  2. Open new tab and start typing "conf" (notice that "conf" is transformed by autocomplete to "config/")
  3. Press Enter to select "about:config" from suggestions

Actual result:
Unexisting page "about:config/" is opened

Expected result:
Should open "about:config"

When you visit about:foo, moz_origins ends up with a row where prefix="about" and host="foo". That's correct insofar as the scheme is "about" and the "host" is "foo".

The erroneous trailing slash is due to the fact that the origins query assumes all URIs have paths, in these two lines: https://searchfox.org/mozilla-central/rev/97cb0a90bd053de87cd1ab7646d5565809166bb1/toolkit/components/places/UnifiedComplete.jsm#175 When I remove those trailing slashes, about:config is actually autofilled correctly when I start typing "config".

So that's one problem.

The other problem is that we probably should not be autofilling "config" in the first place. We could either add a migration to remove all "about" URIs from moz_origins combined with stopping adding them in the first place, or we could just modify the query to exclude them.

See Also: → 1503293
Keywords: papercut
Points: --- → 3
You need to log in before you can comment on or make changes to this bug.