Closed
Bug 280966
Opened 20 years ago
Closed 19 years ago
submit get terminated with extra separator
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: doronr)
References
()
Details
Attachments
(2 files, 2 obsolete files)
|
1.46 KB,
patch
|
aaronr
:
review+
|
Details | Diff | Splinter Review |
|
2.50 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Reported by beta1 tester: "It looks like in submission method="get" that the separator character is being used as a terminator. This is an erratum that should already have been issued. The goal is HTML 4 compatibility." I didn't find it in the erratum, but it makes sense. Using the testcase noted in the URL field, the actual result will look like: http://xformstest.org/cgi-bin/echo.sh?a=1&b=2& Using Novell's pluin, the result looks like: http://xformstest.org/cgi-bin/echo.sh?a=1&b=2
Updated•20 years ago
|
Summary: submit get terminates with extra seperator → submit get terminated with extra separator
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
Quick fix. Seems easier to just do this rathar than modify the submission recursion code.
Comment 3•20 years ago
|
||
Looks good but it needs to trim separator, instead ofa constant '&', because by default separator is ';' but can be set to '&'. See the enumeration of submission/@separator in the Schema. (While you're there you might want to verify that it doesn't add a '?' if one is already there.)
| Assignee | ||
Comment 4•20 years ago
|
||
so what should happen if the separator is "eeeeek" - should it fail or default to ";"?
Comment 5•20 years ago
|
||
If the separator is not ';' or '&', it is an authoring error, as the document is invalid by the XForms Schema (which is a normative part of the definition of XForms). The processor should act as if the error were caught by an XML Schema validation of the page, even if it's not using a validating XML parser. As an author, I would expect to see the XML error page with the pretty colored arrows pointing to the submission attribute value. If you do that, users will never see the error, as the page simply won't load for the authors. It's the same as if someone had put anything else illegal in the namespace, such as <xforms:fnord/> .
| Assignee | ||
Comment 6•20 years ago
|
||
Novell's plugin for IE does indeed follow this hidden errata, but it does allow any type of separator.
Comment 7•20 years ago
|
||
Here are normative references for the limitation to ; and &: [1] http://www.w3.org/TR/xforms/index-all.html#structure-abstract From the content model for the XForms Core Module: separator (';' | '&') [2] http://www.w3.org/TR/xforms/index-all.html#schema From the Schema: <xsd:attribute name="separator" use="optional" default=";"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value=";"/> <xsd:enumeration value="&"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute>
| Assignee | ||
Comment 8•20 years ago
|
||
I am aware Novell is wrong :) This patch will convert invalid separators to ';', since we don't have a way to say "invalid xforms, show a error page" yet. Once that works, we can switch this to not care abot invalid ones.
Comment 9•20 years ago
|
||
The erratum is now public: http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E62
| Assignee | ||
Comment 10•19 years ago
|
||
This patch does: - strip the separator from the end - if the separator is not ; or &, we abort submission and report the error (into the JS console for now).
Attachment #173773 -
Attachment is obsolete: true
Attachment #189101 -
Flags: review?(aaronr)
| Reporter | ||
Comment 11•19 years ago
|
||
Comment on attachment 189101 [details] [diff] [review] newer patch make sure when you check in that you don't have the alignment problems in SerializeData that this patch seems to show. Also this patch is missing the .properties file. with those, r=me
Attachment #189101 -
Flags: review?(aaronr) → review+
Comment 12•19 years ago
|
||
(In reply to comment #10) > - if the separator is not ; or &, we abort submission and report the error > (into the JS console for now). Great! One possible twiddle: if you can swing it, reporting this (and similar validation errors) in the various elements' OnCreated methods might be better, if possible, because it will show up as an authoring error (which it is) rather than a runtime error. I can understand if Mozilla policy prohibits this, but that would make it act as if the page were read with a validating schema parser, which would catch it when reading the page. DOM access would then be an open question though (what happens if someone gets the XHTML page's DOM and changes @submission?) so I can understand holding off on it for that point as well.
| Assignee | ||
Comment 13•19 years ago
|
||
(In reply to comment #12) > (In reply to comment #10) > > - if the separator is not ; or &, we abort submission and report the error > > (into the JS console for now). > Great! > > One possible twiddle: if you can swing it, reporting this (and similar > validation errors) in the various elements' OnCreated methods might be better, > if possible, because it will show up as an authoring error (which it is) rather > than a runtime error. I can understand if Mozilla policy prohibits this, but > that would make it act as if the page were read with a validating schema parser, > which would catch it when reading the page. > > DOM access would then be an open question though (what happens if someone gets > the XHTML page's DOM and changes @submission?) so I can understand holding off > on it for that point as well. > > > Should an xforms event be thrown when submission is aborted?
| Assignee | ||
Comment 14•19 years ago
|
||
Attachment #189186 -
Flags: review?(smaug)
Updated•19 years ago
|
Attachment #189186 -
Flags: review?(smaug) → review+
Comment 15•19 years ago
|
||
> Should an xforms event be thrown when submission is aborted?
xforms-submit-error would seem to fit, but it was designed for the server to
report errors back, for not reporting authoring errors, since presumably the
author should have taken care of those in authoring, not in error handling code.
As far as the spec is concerned, the page itself is invalid and shouldn't even
load, so there's no way for a user to get far enough to press the button. So,
if you want to minimize work on this bug and just move forward, it would be
"fatal error processing stops" as there is no chance of recovery anyway.
| Assignee | ||
Comment 16•19 years ago
|
||
checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•