[Bug 1160331] New: Firefox treats '#' as comment in file path
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 Bug ID: 1160331 Summary: Firefox treats '#' as comment in file path Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Factory Status: NEW Severity: Normal Priority: P5 - None Component: Firefox Assignee: bnc-team-mozilla@forge.provo.novell.com Reporter: opensuse@trummer.xyz QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Firefox 71.0 treats the '#' character (number symbol) as a comment in file paths. This means that saving something as /home/user/#file.jpg won't work. Saving a file to a folder containing '#' doesn't work either, like /home/user/#folder/file.jpg Saving as /home/user/test#file.jpg will result in a file called /home/user/test (no extension). '#' in the path is fine on Firefox 71.0 on Windows. I don't have any other Linux distros to test it with unfortunately. Operating System: openSUSE Tumbleweed 20200105 KDE Plasma Version: 5.17.4 KDE Frameworks Version: 5.65.0 Qt Version: 5.13.1 Kernel Version: 5.3.12-2-default OS Type: 64-bit Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor Memory: 31,3 GiB -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c1 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |wolfgang@rosenauer.org Resolution|--- |UPSTREAM --- Comment #1 from Wolfgang Rosenauer <wolfgang@rosenauer.org> --- Could you please report this to upstream bugzilla? I do not see this openSUSE specific. In case you have problems doing so, please report back. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c2 Maximilian Trummer <opensuse@trummer.xyz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|UPSTREAM |--- --- Comment #2 from Maximilian Trummer <opensuse@trummer.xyz> --- https://build.opensuse.org/package/show/openSUSE%3AFactory/MozillaFirefox I've tested it with a Ubuntu 19.10 live DVD now, and both Firefox 71.0 (snap package) and 69.0.3 (native program) work fine with '#' in file names. Therefore I suspect the culprit is openSUSE's KDE file dialog patch for Firefox. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c3 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fvogt@suse.com --- Comment #3 from Wolfgang Rosenauer <wolfgang@rosenauer.org> --- Sorry, I missed the KDE part. So it could be the KDE integration patches or the kmozillahelper itself. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Firefox treats '#' as |Firefox with KDE |comment in file path |integration treats '#' as | |comment in file path -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c4 Fabian Vogt <fabian@ritter-vogt.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CONFIRMED CC| |fabian@ritter-vogt.de --- Comment #4 from Fabian Vogt <fabian@ritter-vogt.de> --- The issue does not seem to be on the helper side: COMMAND: GETSAVEFILENAME OUTPUT: 0 OUTPUT: /tmp/openSUSE#search.html OUTPUT: \1 I think it's this: https://www.rosenauer.org/hg/mozilla/file/tip/mozilla-kde.patch#l1583 Just prepending "file://" is not enough to make it a proper URL, it needs something like QUrl::fromLocalFile/g_filename_to_uri or whatever there is inside FF code. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c5 --- Comment #5 from Maximilian Trummer <opensuse@trummer.xyz> --- Something I didn't realize at first: this bug can also lead to data loss. 1. create a testfile e.g. "importantnotes.txt" 2. save any file from firefox under "importantnotes.txt#treatedascomment.png" 3. "importantnotes.txt" is overwritten And no error is shown in this case, the user has no idea unless they are aware of this bug. And another variant that would happen more often: 1. save any file from firefox in the folder /home/user/Documents/#notes/, where "Documents" is a symlink to somewhere else 2. Firefox treats everything after # as a comment and will overwrite it, replacing the link with the downloaded file. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c6 --- Comment #6 from Fabian Vogt <fabian@ritter-vogt.de> --- Instead of mFileURL = nsCString( "file://" ); mFileURL.Append( output[ 0 ] ); it should look like this (untested): nsCOMPtr<nsIFile> localfile; nsresult rv = NS_NewNativeLocalFile( output[ 0 ], PR_FALSE, getter_AddRefs(localfile)); if (NS_FAILED(rv)) return v; rv = net_GetURLSpecFromActualFile(localfile, mFileURL); if (NS_FAILED(rv)) return v; -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c7 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS --- Comment #7 from Wolfgang Rosenauer <wolfgang@rosenauer.org> --- The Firefox 76 package I'm preparing has an updated KDE patch which should fix this issue. A quick smoketest (I'm not a KDE user) was working for me. In case someone wants to test before it's released upstream the mozilla repo already has an unpublished package for registered users to fetch manually. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bnc-team-mozilla@forge.prov |wolfgang@rosenauer.org |o.novell.com | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c8 --- Comment #8 from Fabian Vogt <fabian@ritter-vogt.de> --- Wasn't built for TW yet, but the Leap package worked as well... Confirmed to work as expected! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c9 --- Comment #9 from Maximilian Trummer <opensuse@trummer.xyz> --- I tested it on TW 20200520 and saving now works as it should, both with '#' in the file name as well as the path. Perhaps this could be closed? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c10 --- Comment #10 from Wolfgang Rosenauer <wolfgang@rosenauer.org> --- Wondering if this needs to be backported to Firefox 68 as by default in Leap. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1160331 http://bugzilla.opensuse.org/show_bug.cgi?id=1160331#c11 Wolfgang Rosenauer <wolfgang@rosenauer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED OS|openSUSE Factory |All --- Comment #11 from Wolfgang Rosenauer <wolfgang@rosenauer.org> --- As Leap has switched to 78esr it should include the fix. -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com