Closed
Bug 273978
Opened 20 years ago
Closed 20 years ago
Plugin Finder dialog hangs with mime type including plus
Categories
(Toolkit Graveyard :: Plugin Finder Service, defect)
Toolkit Graveyard
Plugin Finder Service
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8final
People
(Reporter: philor, Assigned: doronr)
References
Details
Attachments
(2 files)
109 bytes,
text/html
|
Details | |
1.01 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
Split off from bug 273950 where the real mime type was image/svg+xml - with a
mime type that includes a plus (or just type="+"), the pfs wizard sends
something, receives some reply, but then just hangs. Offhand, seems likely to be
a confusion between +, space, and maybe %2B somewhere along the line.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Comment 2•20 years ago
|
||
JS Console:
Error: aPluginInfo has no properties
Source File: chrome://mozapps/content/plugins/pluginInstallerWizard.js
Line: 102
102: this.mPluginNotFoundArray[aPluginInfo.requestedMimetype] = new
PluginInfo(aPluginInfo);
Doesn't that if/else need to handle three cases?
aPluginInfo.pid != -1 // found
aPluginInfo.pid == -1 // not found
aPluginInfo == null // hosed
Assignee | ||
Comment 3•20 years ago
|
||
The code that passes in aPluginInfo should make sure its not null, the bug lies
there.
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox1.1
Comment 4•20 years ago
|
||
Even if it's true that the caller shouldn't pass null, the code in
pluginInfoReceived is clearly wrong: it null-checks the parameter but
immediately "dereferences" it in both branches. The null check should either be
fixed or removed.
onDatasourceError at
http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js#104
contains the line gPluginInstaller.pluginInfoReceived(null). If Doron is right,
that line is completely wrong.
Why does a "+" in the mime type result in onDatasourceError being called?
Assignee | ||
Comment 5•20 years ago
|
||
The code is a bit of a mess due to last minute aviary changes that went in. You
are right, the null check should be in both branches.
Reporter | ||
Comment 6•20 years ago
|
||
Ah, Firefox requests
https://pfs.mozilla.org/plugins/PluginFinderService.php?mimetype=foo/bar+baz&appID=(yadda-yadda)
and PHP helpfully sets $_GET["mimetype"] to "foo/bar baz" assuming it's a query
string with spaces encoded as plusses. Too late to have 1.0 send
mimetype=foo/bar%2Bbaz, but can the PHP just str_replace(" ", "+",
$_GET["mimetype"])? Surely any incoming mimetype with an actual space in it has
more trouble already than we'll cause by replacing it with a plus.
Assignee | ||
Comment 7•20 years ago
|
||
the code at
http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js#27
should be urlencoding the mimetype before appending it to the URL.
Assignee | ||
Comment 8•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #173630 -
Flags: review?(mconnor)
Updated•20 years ago
|
Attachment #173630 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 9•20 years ago
|
||
checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•20 years ago
|
||
*** Bug 271093 has been marked as a duplicate of this bug. ***
Updated•16 years ago
|
Product: Firefox → Toolkit
Updated•10 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•