[albatross-users] Form Field Value Storage Changed?

Andrew McNamara andrewm at object-craft.com.au
Mon Jan 6 13:00:54 EST 2003


>    Pretty much, I have a form and before when I hit submit on that form it
>    would submit to the same page.  The values that were put into the fields
>    of the form would be accessible in the ctx.locals object.  For example,
>    I had an input field (button) named 'query' which you would click when you
>    were finished with the form.  Before I could just look at ctx.locals.query
>    for the value.  Now however I no longer get any value in that variable.
>
>    Has the way that form values are saved been changed?  As far as which
>    context I'm using, it's the SessionFileAppContext.  I'm also using my own
>    module to maintain the session data called RandomModularSessionFileApp,
>    something I created back in .6 to bridge the gap that I had found.

The merging of fields back into the local context was tightened slightly
in the name of security, although I'm not sure how this would be effecting
your application.

Are you able to post a minimal application that demonstrates the problem
you are seeing?

Another technique I find useful in these cases is to add debugging to
albatross itself - basically, just sys.stderr.write() at strategic
places to see what's being passed in. The logical place to start is
albatross/context.py, specifically the NameRecorderMixin class and the
merge_request method.

"merge_request" looks a little scary - essentially, if the request
doesn't have an __albform__ field, it is merged straight in. If it
does have an __albform__ (which is a md5 signed, gziped base64 pickle),
then this drives the merging back into ctx.locals.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list