Clipboard source url no longer contains full url
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | affected |
| firefox161 | --- | wontfix |
| firefox162 | --- | wontfix |
| firefox163 | --- | fixed |
People
(Reporter: qipnyolf3, Assigned: tschuster, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 external file)
|
50.31 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:157.0) Gecko/20100101 Firefox/157.0
Steps to reproduce
- Copy text from a web page
- View the clipboard metadata that was set on the system clipboard via an app (eg, Free Clipboard Viewer 4.0)
I frequently take web clippings, and I use the source url to record where I copied the text from, but I noticed that recently I no longer am getting the full source url, just the domain.
Actual results
The "SourceURL:" part of the HTML format metadata now only contains the root domain (eg, "https://en.wikipedia.org" ) instead of the full url of the web page that text was copied from.
The text/x-moz-url-priv also only contains the root domain instead of the full url.
Expected results
The source URL should contain the full url ("https://en.wikipedia.org/wiki/Milwaukee_Art_Museum") of the web page instead of just the domain ("https://en.wikipedia.org" ).
This is the behavior that used to happen when I copied text from Firefox.
| Assignee | ||
Updated•2 months ago
|
Comment 1•2 months ago
•
|
||
This seems to be regressed by the bug 2067254 and you seem to be on top of it :tschuster?
These changes seem to do exactly what is described in this bug, that seem to be the issue?
Updated•2 months ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
Interesting, I actually didn't really realize that we embedded the SourceURL like that on windows. Anyway, this was an intentional change, because we don't want to leak this information now that we provide it more widely.
Interesting, I actually didn't really realize that we embedded the SourceURL like that on windows. Anyway, this was an intentional change, because we don't want to leak this information now that we provide it more widely.
Sorry, just to clarify, when you say this was an intentional change, do you mean it was intended for some other contexts where the url was newly shared, or do you mean that clipboard source url will never contain the full url any more and that you don't intend to fix this bug?
The source url is really useful for things like OneNote, where I can copy part of a web page, paste it, and onenote will automatically add the source link. The domain-only version of the source link isn't very useful to me if I want to look at the original context again because I have to search for the full link all over again. If I copy paste information from Chrome or Edge, they all attach the full source url.
If this was an intentional change made for privacy reasons, I would love to have an option to disable this and revert back to the old behavior as I actually want to be able to share the full url.
| Assignee | ||
Updated•1 month ago
|
Comment 5•1 month ago
|
||
(In reply to Tom Schuster from comment #2)
Interesting, I actually didn't really realize that we embedded the SourceURL like that on windows. Anyway, this was an intentional change, because we don't want to leak this information now that we provide it more widely.
Hi Tom,
Regarding “provide it more widely,” the change brings script-based copying into parity with Ctrl+C and the right click context-menu Copy command. Firefox already provided the full source URL to native clipboard consumers.
We are making that existing provenance consistent across copy methods in 2067254, without introducing a new web-readable interface or a new type of source information.
The regression comes from a separate change in GetDocumentSourceURL():
nsAutoCString origin;
MOZ_ALWAYS_SUCCEEDS(
aDocument.NodePrincipal()->GetOriginNoSuffix(origin));
return NS_ConvertUTF8toUTF16(origin);
This replaces the previous GetDocumentURI() → GetSpec() behavior with an origin-only value. Because the helper is also used for normal copying, it removes page-level information from copy operations that previously supplied the full URL.
My initial patch, D321964, preserved the full URL in both paths; it did not introduce this reduction. The origin-only behavior was added in the subsequent implementation.
As the reports here demonstrate, an origin alone cannot identify the page needed for citations and web clippings. It also removes information useful for distinguishing malicious and legitimate pages on the same origin.
Could we revert the origin-only reduction while retaining the improved provenance coverage? Bringing copy methods into parity should preserve the useful source information that existing consumers already relied on.
Comment 6•17 days ago
|
||
Would it be possible to accommodate users' different preferences for convenience and privacy with a preference like the following:
clipboard.sourceUrl.privacy
- 0 => principal only (private windows: about:internet) (default)
- 1 => full URL {pre-Fx157 behavior} (private windows: about:internet)
| Assignee | ||
Updated•2 days ago
|
| Assignee | ||
Comment 7•2 days ago
|
||
| Assignee | ||
Comment 8•2 days ago
|
||
clipboard.copyFullSourceURL
Whether the source URL attached to copied content (text/x-moz-url-priv, SourceURL in CF_HTML on Windows) is the full document URL instead of only its origin. (We still remove the username@password auth though)
clipboard.copyFullSourceURL.pbmode
Same as clipboard.copyFullSourceURL, but for private browsing, where about:internet is used otherwise.
Updated•2 days ago
|
Comment 10•1 day ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 day ago
|
Comment 11•1 day ago
|
||
The patch landed in nightly and ESR is affected.
:tschuster, please make an uplift decision for ESR:
- For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to
wontfixif an uplift isn't needed. Each affected ESR release needs a decision.
The bugbug regressor model rates the patch as medium risk: about 7% of the patches with this rating cause a regression.
Uplift requests can be submitted from Lando: D347428.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
Description
•