Last Comment Bug 389611 - Don't treat filetypes as protocol handlers on windows
: Don't treat filetypes as protocol handlers on windows
Status: RESOLVED FIXED
: fixed1.8.0.14, fixed1.8.1.8
Product: Core Graveyard
Classification: Graveyard
Component: File Handling (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Christian :Biesinger (don't email me, ping me on IRC)
:
Mentors:
Depends on: 389632
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-25 17:37 PDT by Daniel Veditz [:dveditz]
Modified: 2016-06-22 12:16 PDT (History)
6 users (show)
dveditz: blocking1.8.1.8+
dveditz: blocking1.8.0.14+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (1000 bytes, patch)
2007-07-26 16:41 PDT, Christian :Biesinger (don't email me, ping me on IRC)
bzbarsky: review+
bzbarsky: superreview+
dveditz: approval1.8.1.8+
dveditz: approval1.8.0.14+
Details | Diff | Review

Description Daniel Veditz [:dveditz] 2007-07-25 17:37:09 PDT
On Windows when we encounter an unknown protocol handler we look in the windows registry to see if it exists. However we just look for the existence of HKR/scheme and do not check to see if it has a "URL Protocol" value. Therefore we'll think any registered filetype is a protocol so we think we can load things like "giffile:blah" etc. and call ShellExecute() on them.

So far this appears harmless (at least on WinXP) because ShellExecute() won't load them, but I have not done extensive testing and haven't looked at anything but WinXP so far.
Comment 1 Daniel Veditz [:dveditz] 2007-07-25 17:38:51 PDT
This is the issue mentioned in the first part of http://larholm.com/2007/07/25/mozilla-protocol-abuse/
Comment 2 Christian :Biesinger (don't email me, ping me on IRC) 2007-07-26 16:40:12 PDT
a patch will require bug 389632's patch, because without it we show the dialog for any protocol no matter whether it exists
Comment 3 Christian :Biesinger (don't email me, ping me on IRC) 2007-07-26 16:41:44 PDT
Created attachment 274078 [details] [diff] [review]
patch
Comment 4 Boris Zbarsky [:bz] (Out June 25-July 6) 2007-07-26 16:48:52 PDT
Comment on attachment 274078 [details] [diff] [review]
patch

Looks good.
Comment 5 Christian :Biesinger (don't email me, ping me on IRC) 2007-07-26 17:05:39 PDT
Comment on attachment 274078 [details] [diff] [review]
patch

do we want this on 1.8.0.13 too?
Comment 6 Christian :Biesinger (don't email me, ping me on IRC) 2007-07-26 17:53:20 PDT
Checking in win/nsOSHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/win/nsOSHelperAppService.cpp,v  <--  nsOSHelperAppService.cpp
new revision: 1.73; previous revision: 1.72
done
Comment 7 Daniel Veditz [:dveditz] 2007-08-21 15:28:23 PDT
Comment on attachment 274078 [details] [diff] [review]
patch

approved for 1.8.1.7 and 1.8.0.14, a=dveditz for release-drivers
Comment 8 Christian :Biesinger (don't email me, ping me on IRC) 2007-08-22 10:30:44 PDT
MOZILLA_1_8_BRANCH:
Checking in nsOSHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/win/nsOSHelperAppService.cpp,v  <--  nsOSHelperAppService.cpp
new revision: 1.63.4.3; previous revision: 1.63.4.2
done

MOZILLA_1_8_0_BRANCH:
Checking in nsOSHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/win/nsOSHelperAppService.cpp,v  <--  nsOSHelperAppService.cpp
new revision: 1.63.4.1.4.1; previous revision: 1.63.4.1
done

Note You need to log in before you can comment on or make changes to this bug.