Last Comment Bug 366878 - getting submission error using JS + xf:send
: getting submission error using JS + xf:send
: fixed1.8.0.12, fixed1.8.1.4
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: 1.8 Branch
: x86 All
-- normal (vote)
: ---
Assigned To: aaronr
: Stephen Pride
Depends on:
Blocks: 353738
  Show dependency treegraph
Reported: 2007-01-12 17:18 PST by aaronr
Modified: 2016-07-15 14:46 PDT (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

testcase (2.78 KB, application/xhtml+xml)
2007-01-12 17:18 PST, aaronr
no flags Details
patch1 for 1.8.x (2.78 KB, patch)
2007-01-12 17:33 PST, aaronr
doronr: review+
bugs: review+
Details | Diff | Splinter Review

Description User image aaronr 2007-01-12 17:18:18 PST
On the branches (FF 2 and FF we are running into a problem where we are getting a xforms-submit-error trying to do cross domain submission even though the user has whitelisted the site that is serving the XForms.

We run into this while using ImportNode to deep clone xf:submission's bound node into the document that we are building for submitting.  The document that contains the bound node has a different principal than the document that we are building.  Usually this doesn't matter.  However, in cases where the form runs JS during the action that causes the xf:send to do the submission, there will be a JS context on the stack when the security manager looks for it.  This causes extra principal testing to occur that will discover that the principals don't match.  This will cause the ImportNode to fail and the XForms extension to generate a xforms-submit-error.

This only occurs on the branches because the trunk (gecko 1.9) manages principals differently than the branches (gecko 1.8).
Comment 1 User image aaronr 2007-01-12 17:18:49 PST
Created attachment 251332 [details]
Comment 2 User image aaronr 2007-01-12 17:33:17 PST
Created attachment 251336 [details] [diff] [review]
patch1 for 1.8.x

fixing the problem by using setPrincipal to ensure the document that we are building for submission has the same principal as the instance document that contains the node that we are going to submit.
Comment 3 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2007-01-14 23:46:02 PST
Comment on attachment 251336 [details] [diff] [review]
patch1 for 1.8.x

So this is similar to Bug 338451.
Comment 4 User image aaronr 2007-01-17 10:09:12 PST
marking this resolved + fixed since we have a reviewed patch ready for checkin (this isn't a bug on trunk so nothing to check in there) and xf-to-branch so that we remember to check it in on the branches during our next sync.
Comment 5 User image aaronr 2007-04-23 16:32:46 PDT
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16

Note You need to log in before you can comment on or make changes to this bug.