Closed Bug 1848715 Opened 11 months ago Closed 2 months ago

Editing and copying URL loses "https://" URL scheme when browser.urlbar.trimHttps = true

Categories

(Firefox :: Address Bar, defect, P3)

defect

Tracking

()

VERIFIED FIXED
127 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox117 --- unaffected
firefox118 --- disabled
firefox119 --- disabled
firefox120 --- disabled
firefox121 --- disabled
firefox122 --- disabled
firefox123 --- disabled
firefox124 --- disabled
firefox125 --- disabled
firefox126 --- disabled
firefox127 --- verified

People

(Reporter: cpeterson, Assigned: mak)

References

(Blocks 2 open bugs, Regressed 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [sng])

Attachments

(1 file, 3 obsolete files)

Steps to reproduce

  1. Set browser.urlbar.trimHttps = true.
  2. Open https://www.example.com/
  3. Click focus to the address bar. You will be editing the string www.example.com instead of https://www.example.com/. Expanding the edited string to the full URL, https://www.example.com/, like Chrome would fix this bug.
  4. Edit the URL, such as changing .com to .net.
  5. Ctrl+A and Ctrl+ C to select all and copy the URL text.
  6. Pass the copied URL in another tab or app.

Expected results

https://www.example.net/ like in Chrome.

Actual results

www.example.net

This behavior happens with http:// URLs when browser.urlbar.trimHttps = false, but when this behavior affects https:// URLs, it can happen on many more websites.

:mseibert, since you are the author of the regressor, bug 1067293, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(mseibert)
Blocks: 1850491

We're aware of this shortcoming but it's not currently considered a blocker. The HTTPS-first feature that's currently being worked on by the Security team would somewhat mitigate this.

Adopting Chrome's behavior would be an option, but the URL jumping around when editing it isn't great. :/

Severity: -- → S3
Flags: needinfo?(mseibert)
Priority: -- → P3
Whiteboard: [sng]
No longer blocks: 1853643
See Also: → 1853643
Duplicate of this bug: 1863958
Regressed by: 1853418
See Also: → 670531

I ran into this issue today when manually editing REST API URLs. The server did not listen on port 80 at all, so everytime I edited the URL the request simply stopped reaching the server, and even if I just remove a slash from the end of the URL, I had to manually add https:// back at the beginning.

I'd personally consider this more severe than it sounds in the comments here. Firefox completely unexpectedly sent my URL over an unencrypted connection, when I had a reasonable expectation that it would not do that. This might even leak private data.

It is sever yes, but this change is only enabled in Nightly exactly to identify and address these issues.

You can enable dom.security.https_first_schemeless if you wish the urlbar to try https first. That will be the default once we have addressed remaining issues.

Assignee: nobody → mseibert
Attachment #9364064 - Attachment description: WIP: Bug 1848715 - Always untrim on focus.r=mak → Bug 1848715 - Always untrim on focus.r=mak
Status: NEW → ASSIGNED
Duplicate of this bug: 1853643
Attachment #9363242 - Attachment is obsolete: true
See Also: → 1868605
Attachment #9363242 - Attachment is obsolete: false
Blocks: 1871349
Attachment #9364064 - Attachment is obsolete: true
Attachment #9369217 - Attachment is obsolete: true
Duplicate of this bug: 1873700
Blocks: 1870768
Duplicate of this bug: 1870768
Duplicate of this bug: 1872742
Attachment #9363242 - Attachment description: WIP: Bug 1848715 - Untrim on intearction with urlbar. → Bug 1848715 - Untrim on intearction with urlbar.r=mak
Attachment #9363242 - Attachment description: Bug 1848715 - Untrim on intearction with urlbar.r=mak → WIP: Bug 1848715 - Untrim on intearction with urlbar.r=mak
Attachment #9363242 - Attachment description: WIP: Bug 1848715 - Untrim on intearction with urlbar.r=mak → Bug 1848715 - Untrim on intearction with urlbar.r=mak
No longer duplicate of this bug: 1863958
Keywords: stalled
Keywords: stalled
Attachment #9363242 - Attachment description: Bug 1848715 - Untrim on intearction with urlbar.r=mak → WIP: Bug 1848715 - Untrim on intearction with urlbar.r=mak
Attachment #9363242 - Attachment description: WIP: Bug 1848715 - Untrim on intearction with urlbar.r=mak → Bug 1848715 - Untrim on intearction with urlbar.r=mak

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: mseibert → nobody
Status: ASSIGNED → NEW

I'll take this over soon.

Assignee: nobody → mak
Status: NEW → ASSIGNED
No longer blocks: 1870768
Depends on: 1888688

Untrim the address bar value when the user starts manipulating it.
This doesn't untrim on focus because that breaks double-click to select word,
and we'd need a way to simulate word boundaries selection. It's possible we'll
evaluate that in the future, once we have such method.
The behavior is currently behind the feature-gate preference:
browser.urlbar.untrimOnUserInteraction.featureGate

Original patch by Marc Seibert.

Blocks: 1868605
See Also: 1868605
Attachment #9363242 - Attachment is obsolete: true
Depends on: 1889894
Attachment #9394013 - Attachment description: WIP: Bug 1848715 - Untrim address value on user interaction → WIP: Bug 1848715 - Untrim address bar value on user interaction
Attachment #9394013 - Attachment description: WIP: Bug 1848715 - Untrim address bar value on user interaction → Bug 1848715 - Untrim address bar value on user interaction. r=dao
Blocks: 1891931
Attachment #9394013 - Attachment description: Bug 1848715 - Untrim address bar value on user interaction. r=dao → WIP: Bug 1848715 - Untrim address bar value on user interaction. r=dao
Attachment #9394013 - Attachment description: WIP: Bug 1848715 - Untrim address bar value on user interaction. r=dao → Bug 1848715 - Untrim address bar value on user interaction. r=dao
Blocks: 1893228
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/96d4e09e1242
Untrim address bar value on user interaction. r=dao,tabbrowser-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Regressions: 1893568
Regressions: 1893871

Issue is reproducible on a 2023-08-14 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 127.0a1 on Windows 10, Ubuntu 22, macOS 12.

Status: RESOLVED → VERIFIED
Blocks: 1869494
Blocks: 1863958
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: