#8289 Parse error in allura.tasks.mail_tasks.route_email

v1.11.0
closed
None
General
nobody
2019-06-17
2019-05-28
No
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/tasks/mail_tasks.py", line 64, in route_email
    msg = mail_util.parse_message(data)
  File "/var/local/allura/Allura/allura/lib/mail_util.py", line 159, in parse_message
    result['payload'] = result['payload'].decode(charset)
  File "/var/local/env-allura/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 289-367: ordinal not in range(128)

Also this error can occur, would be nice to avoid even though its being handled:

03:30:18,297 ERROR [taskd:allura.tasks.mail_tasks.route_email:5cecab48e8ba7c205771f9d2:allura.lib.spam] Error calling exceptionless(check)(args=(u'Thanks for your reply. The problem came from.......
.......
.......
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/lib/helpers.py", line 1064, in inner
    return fun(*args, **kwargs)
  File "/var/local/allura/Allura/allura/lib/spam/stopforumspamfilter.py", line 60, in check
    ip_int = int(ipaddress.ip_address(unicode(ip)))
  File "/var/local/env-allura/lib/python2.7/site-packages/ipaddress-1.0.22-py2.7.egg/ipaddress.py", line 168, in ip_address
    address)
ValueError: u'None' does not appear to be an IPv4 or IPv6 address

Discussion

  • Dave Brondsema

    Dave Brondsema - 2019-05-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,3 +8,19 @@
         return codecs.utf_8_decode(input, errors, True)
     UnicodeEncodeError: 'ascii' codec can't encode characters in position 289-367: ordinal not in range(128)
     ```
    +
    +Also this error can occur, would be nice to avoid even though its being handled:
    +
    +```
    +03:30:18,297 ERROR [taskd:allura.tasks.mail_tasks.route_email:5cecab48e8ba7c205771f9d2:allura.lib.spam] Error calling exceptionless(check)(args=(u'Thanks for your reply. The problem came from.......
    +.......
    +.......
    +Traceback (most recent call last):
    +  File "/var/local/allura/Allura/allura/lib/helpers.py", line 1064, in inner
    +    return fun(*args, **kwargs)
    +  File "/var/local/allura/Allura/allura/lib/spam/stopforumspamfilter.py", line 60, in check
    +    ip_int = int(ipaddress.ip_address(unicode(ip)))
    +  File "/var/local/env-allura/lib/python2.7/site-packages/ipaddress-1.0.22-py2.7.egg/ipaddress.py", line 168, in ip_address
    +    address)
    +ValueError: u'None' does not appear to be an IPv4 or IPv6 address
    +```
    
     
  • Dave Brondsema

    Dave Brondsema - 2019-05-30
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2019-05-30

    db/8289

     
  • Kenton Taylor - 2019-06-04

    Merged.

     
  • Kenton Taylor - 2019-06-05
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2019-06-05
    • status: closed --> review
     
  • Dave Brondsema

    Dave Brondsema - 2019-06-05

    Needs another matching fix for multipart. Done on branch db/8289b

     
    • Kenton Taylor - 2019-06-06

      Merged

       
  • Kenton Taylor - 2019-06-06
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2019-06-17
    • Milestone: unreleased --> v1.11.0
     

Log in to post a comment.