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)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: robertbw, Assigned: pollmann)

References

Details

(Keywords: regression, Whiteboard: [rtm++] fix in hand)

Attachments

(4 files)

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> &nbsp&nbsp &nbsp&nbsp Yes <INPUT TYPE=radio NAME=allow VALUE="true"> &nbsp&nbsp &nbsp&nbsp 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>
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
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?
possible rtm
Assignee: rods → pollmann
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
Nominating for RTM since this impacts the HP plugin that we are bundling.
Keywords: rtm
Is this a regression? Can Q/A test with an older version.
Yes, this is a recent regression. I tested on build 2000-08-07-12-M17 on windows 98 and it works fine.
Same goes for Windows NT, PR2 doesnt have the bug, but latest build does.
Accepting bug - will look into this at the earliest opportunity.
Status: NEW → ASSIGNED
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.
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.
Marking [rtm need info].
Whiteboard: [rtm need info]
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. :)
I have a fix for this in my tree, will attach the patch shortly...
Whiteboard: [rtm need info] → [rtm need info] fix in hand
OS: Windows NT → All
Hardware: PC → All
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.
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.
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.
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...
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.
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.
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).
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.
Keywords: regression
Priority: P3 → P1
Whiteboard: [rtm need info] fix in hand → [rtm+] fix in hand
Blocks: 54845
Blocks: 55906
marking rtm++
Whiteboard: [rtm+] fix in hand → [rtm++] fix in hand
Checked this fix into the trunk, will check into the branch tomorrow.
*** Bug 55906 has been marked as a duplicate of this bug. ***
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
yep, it's fixed. hppi works on Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001013.
Verifying on -Windows 98 build 2000-10-20-08-MN6 -Linux RedHat6.2 build 2000-10-20-09-MN6
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: