~mailman-coders/mailman/2.1

« back to all changes in this revision

Viewing changes to Mailman/Queue/CommandRunner.py

  • Committer: Mark Sapiro
  • Date: 2021-11-22 04:31:11 UTC
  • Revision ID: mark@msapiro.net-20211122043111-v9n55ud4tk337ks6
Avoid NotAMemberError in CSRF check from user options page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
            # E.g the outer Content-Type: was text/html
101
101
            return
102
102
        body = part.get_payload(decode=True)
 
103
        if (part.get_content_charset(None)):
 
104
            body = unicode(body, part.get_content_charset(),
 
105
                           errors='replace').encode(
 
106
                           Utils.GetCharSet(self.msgdata['lang']),
 
107
                           errors='replace')
103
108
        # text/plain parts better have string payloads
104
109
        assert isinstance(body, StringType) or isinstance(body, UnicodeType)
105
110
        lines = body.splitlines()