Closed Bug 1647200 Opened 2 years ago Closed 2 years ago

Double schema to the pasteboard for non-standard domains

Categories

(Firefox :: Address Bar, defect, P2)

77 Branch
x86_64
Windows 10
defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 80
Iteration:
80.1 - June 29 - July 12
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- verified
firefox77 --- unaffected
firefox78 --- wontfix
firefox79 --- verified
firefox80 --- verified

People

(Reporter: mf20070535, Assigned: mak)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image bugz.jpg

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

Add ###.###.###.### some-name to hosts file, ensure there is a web server on it.
Access http://some-name/some/path
Click the address bar, instead of standard domains like example.com (which hides http://), it will explicitly add prefix http://
Select and copy the pahttp://some-name
Paste anywhere

Actual results:

http://http://some-name is pasted

Expected results:

http://some-name is pasted

Component: Untriaged → Address Bar
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

Hm, this may be due to us adding back the protocol for non-whitelisted hosts, I must check.

Flags: needinfo?(mak)
Assignee: nobody → mak
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mak)
Keywords: regression
Priority: -- → P2
Regressed by: 1398567
Has Regression Range: --- → yes

When focusing the urlbar after a non-whitelisted host is visited, we add the
trimmed protocol in front of it, because otherwise modifying the url and then
resubmitting may end up searching. Due to that, it's possible the value is not
trimmed when we build the clipboard string.

Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/398c202ed56e
Don't add the trimmed protocol on urlbar copy if it's already present. r=dao

it looks like linux64 fission only? Strange, I guess I'll have to check on Try.

Flags: needinfo?(mak)

The problem is apparently due to the fact we don't blur before focus so we don't get the focus event... I'm modernizing the test and checking on Try if the problem is solved.

Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/2b90c377a85a
Don't add the trimmed protocol on urlbar copy if it's already present. r=dao
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80

The patch landed in nightly and beta is affected.
:mak, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(mak)

Comment on attachment 9160080 [details]
Bug 1647200 - Don't add the trimmed protocol on urlbar copy if it's already present. r=dao

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This may actually be more interesting for enterprise than beta, because enterprise uses a lot more non-standard domains.
  • User impact if declined: Copying a partial url containing an unknown domain (maybe intranet) may end up doubling the protocol in the copied string.
  • Fix Landed on Version: 80
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch is a very simple if condition and has a test
  • String or UUID changes made by this patch:

Beta/Release Uplift Approval Request

  • User impact if declined: Copying a partial url containing an unknown domain (maybe intranet) may end up doubling the protocol in the copied string.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0.
    Add a custom domain to /etc/hosts that resolves to an http page, ensure the urlbar contains "yourdomain/something" when you visit it. When the urlbar gets focused http:// should be added in front of the trimmed url. Copying the urlbar value at this point should copy the right url and not duplicate the http protocol.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch is a very simple if condition and has a test
  • String changes made/needed:
Flags: needinfo?(mak)
Attachment #9160080 - Flags: approval-mozilla-esr78?
Attachment #9160080 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9160080 [details]
Bug 1647200 - Don't add the trimmed protocol on urlbar copy if it's already present. r=dao

Approved for 79.0b5 and 78.1esr. Thanks for including tests.

Attachment #9160080 - Flags: approval-mozilla-esr78?
Attachment #9160080 - Flags: approval-mozilla-esr78+
Attachment #9160080 - Flags: approval-mozilla-beta?
Attachment #9160080 - Flags: approval-mozilla-beta+
QA Whiteboard: [qa-triaged]
Iteration: --- → 80.1 - June 29 - July 12
Points: --- → 2

Reproduced the issue on 78.0.2 2020-07-08, then procedeed to verify the fix with:

80.0a1 2020-07-14
79.0b7 2020-07-10

using:
Window 10
Mac 10.13.6
Ubuntu 20

Leaving reminder to re-check this on 78.1esr when it is near release to reduce any risk from other uplifts regression.

Flags: needinfo?(adrian.florinescu)

Verified the fix with 78.1.0esr 2020-07-22 using Windows10 and Ubuntu20.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Flags: needinfo?(adrian.florinescu)
You need to log in before you can comment on or make changes to this bug.