Non-string in msgdata breaks pending requests

Bug #1031391 reported by Robert Niederreiter
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Barry Warsaw

Bug Description

msgdata['received_time'] in mailman.app.moderator.hold_message contains datetime.datetime object when being called.

this causes hold_request to fail -> it expects only strings as additional data.

so either remove received_time like so:

http://bazaar.launchpad.net/~rnix/mailman/anon-subscribe/revision/7159

before calling hold_request,

convert received_time to string before calling hold_request,

or improve mailman.model.request.ListRequests.hold_request as already commented in source code (maybe to also accept datetime instances?)

cheers,

robert

Tags: mailman3
description: updated
Changed in mailman:
assignee: nobody → Bernard Keimel (sladev5976)
assignee: Bernard Keimel (sladev5976) → nobody
assignee: nobody → Bernard Keimel (sladev5976)
Revision history for this message
Barry Warsaw (barry) wrote :

Bernard, are you actually going to try to fix this?

tags: added: mailman3
Changed in mailman:
assignee: Bernard Keimel (sladev5976) → nobody
assignee: nobody → Bernard Keimel (sladev5976)
Changed in mailman:
status: New → Fix Released
Revision history for this message
Barry Warsaw (barry) wrote :

Bernard, why did you change the status to Fix Released? The bug hasn't even been confirmed, let alone fixed, let alone fixed in a released version of Mailman. I don't even see a patch or branch attached to this bug.

This is not the first time you've done something like this.

If you want some help understanding how our process works in the GNU Mailman project, please email me directly and I will help you. Otherwise, *please* *stop* *doing* *this*. It is only annoying us, causing us to do extra work, and generally giving you a very poor reputation for working with open source projects. If you're serious about contributing, and genuinely want to improve the way you interact with us, I would gladly help you, but until then we will have to treat such actions as spam.

Changed in mailman:
status: Fix Released → New
assignee: Bernard Keimel (sladev5976) → nobody
Revision history for this message
Robert Niederreiter (rnix) wrote :

I have committed a fix for this issue here.

http://bazaar.launchpad.net/~rnix/mailman/anon-subscribe/revision/7163

Can you merge this back to the master please?

-Robert

Barry Warsaw (barry)
summary: - remove msgdata['received_time'] in mailman.app.moderator before calling
- IListRequests.hold_request
+ Non-string in msgdata breaks pending requests
Changed in mailman:
importance: Undecided → High
assignee: nobody → Barry Warsaw (barry)
milestone: none → 3.0.0b2
status: New → Confirmed
Revision history for this message
Barry Warsaw (barry) wrote :

Hi Robert. Apologies for the delay in responding. Summer vacations and all. I did end up fixing this in a more general way, by ensuring that all values are pickled if they are not str or unicode. I think it's a programming error if the key is ever non-str/unicode so that raises an exception. I also mangle the key name when using a pickle so that unpending the data can restore the original object.

Thanks very much for the contribution to Mailman!

Changed in mailman:
status: Confirmed → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.