You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced an issue yesterday where a well-meaning user pasted in some output he received in PuTTY to the creation of an Iris incident. Within this output, I believe there were some unusual unicode quote characters that caused urllib.urlencode to fail to encode the payload inside the iris_twilio vendor module. The end result was that Twilio didn't trigger any phone calls or SMS messages and fell back to email because of all the unhandled exceptions.
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | 2017-11-15 19:17:20,094 INFO root Sending message (ID 38) locally
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | 2017-11-15 19:17:20,094 ERROR iris.vendors Sending {u'body': u'Blah blah blah some text about /etc/nginx/sites-available$ sudo ln -s /etc/nginx/sites-available/default_new /etc/nginx/sites-enabled/default\r\nln: failed to create symbolic link \xe2/etc/nginx/sites-enabled/default\xe2: File exists
Nov 15 19:17:20 iris-host iris[33482]: '} with vendor <iris.vendors.iris_twilio.iris_twilio object at 0x7f9b3faffcd0> failed
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | Traceback (most recent call last):
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | File "/alldata/home/iris/iris/src/iris/vendors/__init__.py", line 64, in send_message
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | return vendor.send(message)
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | File "/alldata/home/iris/iris/src/iris/vendors/iris_twilio.py", line 143, in send
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | return self.modes[message['mode']](message)
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | File "/alldata/home/iris/iris/src/iris/vendors/iris_twilio.py", line 112, in send_call
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | self.config['relay_base_url'], urllib.urlencode(payload)
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | File "/usr/lib/python2.7/urllib.py", line 1343, in urlencode
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | v = quote_plus(str(v))
Nov 15 19:17:20 iris-host iris[33482]: sender.1 | UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 350: ordinal not in range(128)
I believe this should be a straightforward fix of UTF-8 encoding the payload before urlencoding it. PR incoming, but let me know if you have something else in mind.
The text was updated successfully, but these errors were encountered:
I experienced an issue yesterday where a well-meaning user pasted in some output he received in PuTTY to the creation of an Iris incident. Within this output, I believe there were some unusual unicode quote characters that caused urllib.urlencode to fail to encode the payload inside the iris_twilio vendor module. The end result was that Twilio didn't trigger any phone calls or SMS messages and fell back to email because of all the unhandled exceptions.
I believe this should be a straightforward fix of UTF-8 encoding the payload before urlencoding it. PR incoming, but let me know if you have something else in mind.
The text was updated successfully, but these errors were encountered: