[albatross-users] Form Field Value Storage Changed?

Michael Barrett mike at daboyz.org
Sat Jan 11 19:48:02 EST 2003


Ok, after doing a little troubleshooting based on what you told me below I've   found that it seems to be the fault of the <al-form> tags.  IE: what you said
below seems to be the culprit.  When there's an __albform__ field in the req
then it does a whole lot of stuff that I haven't even started to try to 
understand.

Does anyone know why this is?  Is there supposed to be a time and a place (such
as mine) when you shouldn't be using <al-form> instead of just <form> calls?

On Mon, Jan 06, 2003 at 01:00:54PM +1100, Andrew McNamara wrote:
> >    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/
> _______________________________________________
> Albatross-users mailing list
> Albatross-users at object-craft.com.au
> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users

-- 
     ________________________________________________________________________
                Mike Barrett | "I used to read, now I go to raves."
             mike at daboyz.org | -- Random MUNI Rider, speaking
              www.daboyz.org |    to my friend Allison.
     ------------------------+-----------------------------------------------



More information about the Albatross-users mailing list