Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Illegal request, signed out

The "WCB: Java development" forum contains threads on issues that are related to Java while programming a WCB (WebManager Component Bundle). If you have questions that have impact on Java code, post them in this forum. Some example topics: authorization, the different component types, setting up component dependencies, data access, and so forth.

Answered
Not marked as answered yet

Forums  >  WCB: Java development  >  Illegal request, signed out


Author Illegal request, signed out
Cthulhu



Posts: 212

Posted: 29-10-2009 11:51

Hey guys,

I've got a bit of an odd problem. I have a simple element component that has a list of items that are added to it through Javascript, where each item to be stored is inserted as a hidden form field, that looks like this after processing:

<input class="hiddenplayer" type="hidden" name="FBOMap['f8939650-98f7-4824-8dd0-3281c5fc49e'].element.playersToArray" value="13064"/>



When attempting to save the element, however, I'm signed out. Looking at the logs, I get the following remark:

WARNING: Illegal request nl.gx.filter.signing.IllegalRequestException: invalid token 'FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].element.playersToArray' allowed are [697244_name, layers, allelements, FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].lineup, 697245_newassignment_800, insertAt, FBOMap[\'f8939650-98f7-4824-8dd0-b3281c5fc49e\'].element.playersToArray, #697245_update_803_0, 697244_update_782_0, closedelements, FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].text, addElementToId, 697244_newassignment_781, #697250_update_963_0, 697245_newassignment_805, element697397_uuid, actioncommand, lastEdited, _FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].voteEnabled, elementType, 697245_update_804_0, openpreview, FBOMap['0ceebdfe-043e-4bac-964b-7013f9c52050'].text, swfrmsig, comment, webid, addElementToType, 697242_name, delelements, FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].voteEnabled, sourcePageId, 695753_update_4821_0, #697247_update_969_0, id, #697249_update_963_0, pagemodelid, qs, hastables, 697244_setupdate_782_0, l_id, elementHolderElements.wmCreate, sourcePageVersionId, 697244_update_793_0, insertAfter, openelements, web, FBOMap['b4f69eda-4026-426e-8631-9afc07adf466'].text, pageVersion, #697245_newassignment_799, languageId, returnpageid, 697244_newassignment_791, mvc, contentTypeId, FBOMap['f8939650-98f7-4824-8dd0-b3281c5fc49e'].description, y, x]



And I have no idea what the problem is. Anyone have any clues to what the problem might be?

patricka



Posts: 280

Posted: 29-10-2009 13:08 Solved

Aaah, added with javascript, they are?

WebManager adds a form signature to the bottom of a form, to prevent tampering with the form. Adding extra fields afterwards with Javascript is considered a form of tampering with fields.

The error that you see is WebManager detecting new fields that did not exist at the time of signing the form.

What you can do is have the hidden fields already in the HTML, perhaps disabled, and enable them with Javascript.

That way, WebManager will see the fields when the HTML is generated, include them in the signature and allow them as they are submitted.

Greetings,

Patrick

P.S. Not sure why you are signed out though. That is a bit odd. Luckily it's not relevant.

Cthulhu



Posts: 212

Posted: 29-10-2009 14:31

Ah, that makes sense, yeah. I'll go and try that... although adding the form fields beforehand won't be exactly possible.

It's a bit of an odd setup (which I didn't make, just so you know and before I destroy my own reputation), there's a Javascript panel in which you can select values to be added, which is sent to the element through Javascript, which in turn adds the hidden form fields.

I'll try and add a hidden blank form field, see if that works, and fiddle around otherwise after that. Thanks!

Update (after fixing the other bugs that were unrelated to this): Yay it are teh working again. I hax-fixed it by adding a hidden form field with an empty value just before the location where the Javascript adds the hidden form fields, something like


<input class="hiddenplayer" type="hidden" value="" name="FBOMap['${element.UUID}'].element.playersToArray" />



Of course, it's nowhere near a final solution (which requires a rewrite of parts of the system, as well as me figuring out how to store lists in elements instead of merging IDs into a long string as it's done right now, :/ ), but at least it works again now, (y).

Thanks again for the swift reply.

Back to top

New message: "Illegal request, signed out"
Message:
bold boitalicd underline url quote code smile cool eek grin mad razz sad wink
 
© 2012 GX Software B.V.

Disclaimer

This website (Connect.gxsoftware.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.