[Mailman-Users] What does mailman do with a POST?

Bernie Cosell bernie at fantasyfarm.com
Tue Jul 31 21:15:53 EDT 2018


On 31 Jul 2018 at 15:53, Mark Sapiro wrote:

> On 07/30/2018 05:08 AM, Bernie Cosell wrote:

> > I'm trying to submit a form or two from a program and I can't quite 
> > understand Mailman's form handling, this with Mailman 2.1.23.

> > What does Mailman do to when receiving a POST to decide if there's 
> > something to do or not?  THANKS!
> 
> 
> It looks at the POST data. In the case of the admin CGI just returning
> the Mass Removals form with no errors and no changes, this means it
> got
> the right path to LISTNAME/members/remove and it got a good
> csrf_token.

That's a start... :o)  

> Given that, the only way it would return the form with no message is
> if
> it got no non-blank values for unsubscribees or unsubscribees_upload.
> 
> You refer to csrf_token as csrf_object. If you are really submitting
> the
> value as csrf_object, that wouldn't work, but you should get an error.

Right , I mistyped..  I still don't understand why I'm not getting anything.  
Here's the request I just sent:

'cookie2' => '$Version="1"',
'csrf-token' => 
'2802000000694a07615b7347000000746573746c6973742d66616e74617379666
1726d2e636f6d2b61646d696e3a31393763333633326633636638316533393631
656132313039623235383137343533386232366139',
'setmemberopts-btn' => 'Submit Your Changes',
 'cookie' => 
'testlist-fantasyfarm.com+admin=2802000000694a07615b7328000000313937
633336333266336366383165333936316561323130396232353831373435333862
32366139',
 'user-agent' => 'Mozilla/5.0',
 'unsubscribees' => 'bernie'
----------------------------------------
 '_method' => 'POST',
                                        '_uri' => 
http://lists.fantasyfarm.com/admin.cgi/testlist-fantasyfarm.com/member
s/remove')}, 'URI::http' ),

And the page I got back was the remove page -- no error no success [it 
should be an error, since I'm not subscribed to the list I'm playing with..:o)]
Do I have to do something special with the data for the 'unsubscribees' ?  I 
know it is a TEXTAREA -- but I just assumed I could pass it a string and 
that'd be OK.

Thanks for the help!
  /Bernie\
            Bernie Cosell
       bernie at fantasyfarm.com
-- Too many people; too few sheep --
   





More information about the Mailman-Users mailing list