Closed
Bug 54966
Opened 26 years ago
Closed 26 years ago
form doesn't submit if action is a file.
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: robertbw, Assigned: pollmann)
References
Details
(Keywords: regression, Whiteboard: [rtm++] fix in hand)
Attachments
(4 files)
|
5.57 KB,
patch
|
Details | Diff | Splinter Review | |
|
8.92 KB,
patch
|
Details | Diff | Splinter Review | |
|
9.08 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.84 KB,
patch
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001002
The following code should cause the 2nd file to be called when you click
continue in the form contained in the first. It also doesn't work if the
action is a full path url (file:///c:/.../hppiq2.htm). Works for IE, NS, all
versions.
If I change the action to be an http url, it works.
The files need to be in the same directory.
-robertw
============================================================
hppiq1.htm:
<html>
<BODY >
<FORM NAME="authorize" method=get
ACTION="hppiq2.htm" >
<P> Is it okay to send information about your printers to somebody?
<P>
     
Yes <INPUT TYPE=radio NAME=allow VALUE="true">
     
No <INPUT TYPE=radio NAME=allow VALUE="false" CHECKED>
<P>
<INPUT TYPE=submit VALUE="Continue" >
<P>
<SCRIPT LANGUAGE="JavaScript" >
document.write ("action is " + document.authorize.action);
</SCRIPT>
</FORM>
</BODY>
</html>
============================================================
The contents of the 2nd file are irrelevant since it isn't called, but I had:
hppiq2.htm:
<BODY>
<P> in q2
<script>
window.document.write ("<P>in javascript " + window.location.search);
</script>
</BODY>
Comment 2•26 years ago
|
||
Robert, I do not understand how to recreate this. Do I:
1) Got to http://hppew3.consonus.com/PItest/pi_gen.html
(This URL does not seem to work right now)
2) Click one of the links
3) Click continue
What should happen that is not happening?
| Reporter | ||
Comment 4•26 years ago
|
||
Bij,
The hppi plugin or website is not required for this defect. Just the
included files. A simple form with method=get and action="hppiq2.htm" fails.
And you're right, hppew3 caught a hardware disease. I moved the test pages to
hppew2, one of the production boxes.
Rods,
I'm sorry, what's the manual say about that? Where do you draw the line
between what the manual says and what other browsers do?
I just discovered this problem doesn't exist in
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m17) Gecko/20000807 Netscape6/6.0b2
-robertw
Comment 5•26 years ago
|
||
Nominating for RTM since this impacts the HP plugin that we are bundling.
Keywords: rtm
Comment 6•26 years ago
|
||
Is this a regression? Can Q/A test with an older version.
Comment 7•26 years ago
|
||
Yes, this is a recent regression. I tested on build 2000-08-07-12-M17 on
windows 98 and it works fine.
Comment 8•26 years ago
|
||
Same goes for Windows NT, PR2 doesnt have the bug, but latest build does.
| Assignee | ||
Comment 9•26 years ago
|
||
Accepting bug - will look into this at the earliest opportunity.
Status: NEW → ASSIGNED
Comment 10•26 years ago
|
||
I saved both file sinto a directory named "html" and then changed hppiq1.htm's
form submit to be as follows:
<FORM NAME="authorize" method=get ACTION="file:///S|/html/hppiq2.htm" >
and it worked fine on WinNT. So Either this is worksforme or I don't understand
the problem.
| Reporter | ||
Comment 11•26 years ago
|
||
Which browser?
I tried using a full pathname with Mozilla/5.0 (Windows; U; WinNT4.0; en-US;
m18) Gecko/20001002 and that didn't work either.
File needs to be relative, since I don't know where it will be installed.
Since NS PR3 is released I'll try that.
| Assignee | ||
Comment 13•26 years ago
|
||
With a daily build from Friday I can reproduce this bug. I saved the two files
unaltered into the same directory, then viewed the first. Clicking on the
submit did nothing.
Turns out the culprit is nsSecureBrowserUIImpl (psm-glue) returning a failure
code, which cancels form submission. It seems my decision to overload the
return value of the Notify() method and make it mean "cancel form submit" was
misguided. I'll change the api now (adding aCancelSubmission) before we ship
and people start depending on it and making these mistakes all over the place.
:)
| Assignee | ||
Comment 14•26 years ago
|
||
I have a fix for this in my tree, will attach the patch shortly...
Whiteboard: [rtm need info] → [rtm need info] fix in hand
| Assignee | ||
Updated•26 years ago
|
OS: Windows NT → All
Hardware: PC → All
| Assignee | ||
Comment 15•26 years ago
|
||
| Assignee | ||
Comment 16•26 years ago
|
||
| Assignee | ||
Comment 17•26 years ago
|
||
The latest fix for this bug is to clean up some of the return values from
psm-glue. It was returning NS_FAILURE codes in situations where the error was
non-fatal (could be handled by psm-glue code). This was being propagated back
to form submission and aborting the submit. I've made two changes:
1) In the three spots I've found that return NS_ERROR_FAILURE but apparently
shouldn't, I've changed the return value.
2) I've added an explicit "cancelSubmit" parameter to nsIFormSubmitObserver 's
Notify method. This makes it clear how submit is cancelled.
Because an NS_FAILURE result code potentially indicates a serious problem, such
as an out-of-memory condition, I've left the code in nsFormFrame::OnSubmit that
aborts submission immediately if an NS_FAILURE result code is returned.
I've gotten this code reviewed, but I'll need a super-review from someone in
security land with a more complete understanding of psm-glue.
Comment 18•26 years ago
|
||
Although I am not a super reviewer for this area, I the only problem that i have
with this patch is IF the psm component is not found, we are returning NS_OK. I
think that this is wrong. If we can't get this component, things are very
wrong. I think that we should be aborting the post in this case.
Comment 19•26 years ago
|
||
I see a problem here:
- return rv;
- psm->PassPrefs();
+ return NS_OK;
+ return psm->PassPrefs();
psm->PassPrefs(); never gets called anymore. This needs to happen so PSM
behaves properly when a pref has been modified.
| Assignee | ||
Comment 20•26 years ago
|
||
Doug, are we *guaranteed* to have the psm component if we get into :CheckPost?
What about a vanilla Mozilla install without psm installed?
I have one more final addition to this patch which fixes bug 55906 - same
problem, different place in IsURLfromPSM, attachment coming soon...
| Assignee | ||
Comment 21•26 years ago
|
||
| Assignee | ||
Comment 22•26 years ago
|
||
Javier, psm->PassPrefs will still be called if there is no error when getting
the psm component, just as before. The only change with that line is that now
we return the result code from PassPrefs in case there is an NS_FAILURE in that
routine.
Comment 23•26 years ago
|
||
Ah, white space diffs win again.
Everything in psm-glue code looks fine to me. If dougt's concern is closed, then
r=javi for psm-glue code.
Comment 24•26 years ago
|
||
Eric,
Yes, we should always have this component. The code that you modified exists
inside the psm-glue .so. also inside of this .so, is the nsIPSMComponent
implementation.... You have to wonder why I even check the result code.
Also, PSM-GLUE should not be shipped without the PSM Server. That is a bug
against the security group (which will be resolved as soon as they land their
psm server stuff in mozilla's cvs repository).
| Assignee | ||
Comment 25•26 years ago
|
||
| Assignee | ||
Comment 26•26 years ago
|
||
Thanks javi and jst for review, and scott for super-review, marking rtm+. Also
setting Priority, which was never set, to P1 as this fixes basic form submit
functionaity required by the hppi plugin.
| Assignee | ||
Comment 28•26 years ago
|
||
Checked this fix into the trunk, will check into the branch tomorrow.
| Assignee | ||
Comment 29•26 years ago
|
||
*** Bug 55906 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 30•26 years ago
|
||
I just checked the fix into the branch as well.
To verify:
-create the two files hppiq1.htm and hppiq2.htm in the same directory locally
on your machine. (contents of file are in original bug description)
- Open up hppiq1.htm using file://<path to file>/hppiq1.htm.
- Submitting the form should now load a new page, hppiq2.htm. thanks!
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 31•26 years ago
|
||
yep, it's fixed. hppi works on Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18)
Gecko/20001013.
Comment 32•26 years ago
|
||
Verifying on
-Windows 98 build 2000-10-20-08-MN6
-Linux RedHat6.2 build 2000-10-20-09-MN6
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•