Closed
Bug 173069
Opened 22 years ago
Closed 22 years ago
Default Plug-ins receive relative URLS
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.3beta
People
(Reporter: TaylorToddK, Assigned: peterl-bugs)
References
()
Details
(Keywords: topembed+, Whiteboard: [PL2:NA])
Attachments
(1 file, 3 obsolete files)
|
3.03 KB,
patch
|
serhunt
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 Default plug-ins can receive relative URLS for PLUGINURL and PLUGINPAGE attributes. This means the plug-in would have to resolve the URL itself. Plug-ins are not initialized with the URL they are embedded in and can receive both absolute and relative URLS. It would beneficial if the plug-in manager resolved all relative URLs to absolute ones, so plug-ins only have to handle one scenario. Reproducible: Always Steps to Reproduce: 1. 2. 3.
| Reporter | ||
Updated•22 years ago
|
Summary: Default Plug-ins receive relative URLS → Default Plug-ins receive relative URLS
Comment 1•22 years ago
|
||
handing over to Serge for plug-in manager work
Assignee: beppe → serge
Priority: -- → P3
Whiteboard: [Plug-in Mgr]
Target Milestone: --- → mozilla1.3alpha
Comment 2•22 years ago
|
||
plug-in manager work??? The fix-up of relative URLs for PLUGINSPAGE/PLUGINURL can probably happen on the array we pass the default plugin right before we call NPP_New.
Comment 3•22 years ago
|
||
I think CODEBASE has the same problem with the ActiveX plugin.
Comment 4•22 years ago
|
||
-->taking bug to fix for ActiveX for 1.3
Assignee: serge → peterl
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•22 years ago
|
||
moving to 1.3 beta
Whiteboard: [Plug-in Mgr] → [PL2:NA]
Target Milestone: mozilla1.3alpha → mozilla1.3beta
Comment 7•22 years ago
|
||
patch to resolve relative URLS on PLUGINSPAGE or PLUGINSURL
Comment 8•22 years ago
|
||
better patch: resolves relative urls for PLUGINURL or PLUGINSPAGE if it's in either an attribute or PARAM tag.
Attachment #108761 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #109677 -
Flags: superreview?(darin)
Attachment #109677 -
Flags: review?(av)
Comment 9•22 years ago
|
||
Comment on attachment 109677 [details] [diff] [review] patch v.2 >Index: nsObjectFrame.cpp >+ nsCAutoString newURL, oldURL (ToNewUTF8String(value)); use: NS_ConvertUCS2toUTF8 oldURL(value); instead of ToNewUTF8String as it cuts out one buffer copy and potentially avoids a heap allocation. >+ if (NS_SUCCEEDED(baseURL->Resolve(oldURL, newURL))) { >+ value.AssignWithConversion(newURL.get()); do you really mean to truncate any non-ASCII characters? i.e., are you certain newURL is entirely ASCII? if not, then use value = NS_ConvertUTF8toUCS2(newURL); >Index: nsObjectFrame.h >+ void FixUpURLS(nsString &name, nsString &value); looks to me like |name| could be a |const| param, i.e.: void FixUpURLS(const nsString &name, nsString &value);
Attachment #109677 -
Flags: superreview?(darin) → superreview-
Comment 10•22 years ago
|
||
NS_MakeAbsoluteURI seems to do all of that
Attachment #109677 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #109683 -
Flags: superreview?(darin)
Attachment #109683 -
Flags: review?(av)
Comment 11•22 years ago
|
||
Comment on attachment 109683 [details] [diff] [review] patch v.3 hmm... a little wierd to use an input string as an output string in the same function call. fortunately, in this case NS_MakeAbsoluteURI doesn't do anything like truncate the output buffer before anything else. i fear that if NS_MakeAbsoluteURI ever changed its behavior in this regard that your code would simply break. that makes it fairly fragile, so maybe it would be better to not use NS_MakeAbsoluteURI here. make sense?
Attachment #109683 -
Flags: superreview?(darin) → superreview-
Comment 12•22 years ago
|
||
oops, I meant to use a temp var instead of the same one for in/out. Here's that patch.
Attachment #109683 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #109692 -
Flags: superreview?(darin)
Attachment #109692 -
Flags: review?(av)
Comment 13•22 years ago
|
||
Comment on attachment 109692 [details] [diff] [review] patch v.4 sr=darin (although i would use a nsAutoString for newURL... no need for a new patch if you agree.)
Attachment #109692 -
Flags: superreview?(darin) → superreview+
Comment 14•22 years ago
|
||
Comment on attachment 109692 [details] [diff] [review] patch v.4 r=av
Attachment #109692 -
Flags: review?(av) → review+
Comment 15•22 years ago
|
||
patch w/ AutoString in trunk, marking FIXED.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
Attachment #109677 -
Flags: review?(av)
Updated•22 years ago
|
Attachment #109683 -
Flags: review?(av)
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•