#5534 UnicodeEncodeError in anti-spam check

v1.0.0
closed
General
Cory Johns
2015-08-20
2013-01-02
No

Unicode in a user's name can cause this error:

File '/var/local/allura/Allura/allura/controllers/discuss.py', line 189 in post
  is_spam = g.spam_checker.check(kw['text'], artifact=p, user=c.user)
File '/var/local/allura/Allura/allura/lib/spam/akismetservice.py', line 26 in check
  res = self.comment_check(text, data=kw, build_data=False)
File '/var/local/env-allura/lib/python2.7/site-packages/akismet-0.2.0-py2.7.egg/akismet.py', line 320 in comment_check
  resp = self._safeRequest(url, urlencode(data), headers)
File '/usr/lib64/python2.7/urllib.py', line 1312 in urlencode
  v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\\xf6' in position 2: ordinal not in range(128)

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-01-03
    • size: --> 1
     
    • status: open --> in-progress
    • assigned_to: Tim Van Steenburgh
     
    • status: in-progress --> code-review
     
  • forge:tv/5534

     
  • Cory Johns - 2013-01-08
    • status: code-review --> closed
    • qa: Cory Johns
     
  • Chris Tsai - 2013-01-09
    • labels: spam --> spam, support, p3
     

Log in to post a comment.