uwescience / myria-web

Web frontend for Myria
https://demo.myria.cs.washington.edu
Other
11 stars 14 forks source link

Consider sanitizing non-ASCII whitespace characters in queries #299

Open senderista opened 8 years ago

senderista commented 8 years ago

I just debugged an issue where a user (Korean, so possibly i18n settings played a role) managed to insert 2 EN_SPACE characters into his query in the editor, and it was rather hard to debug because the exception message itself contained the offending characters and could not be encoded to ASCII to display on the console or in a log file (with Python's default ASCII encoding). It might be reasonable to simply sanitize all non-ASCII Unicode whitespace codepoints to ASCII spaces before feeding the contents of the query editor to Raco.

shbae commented 8 years ago

Well, I (the Korean user :)) think the non-ASCII code might be added by 'stickies', since I copied a query to the stickies and it shows the error when I used the query from the stickies. After rewriting it into a text file, it has no problem. :)

On Thu, Aug 27, 2015 at 11:50 AM, Tobin Baker notifications@github.com wrote:

I just debugged an issue where a user (Korean, so possibly i18n settings played a role) managed to insert 2 EN_SPACE characters into his query in the editor, and it was rather hard to debug because the exception message itself contained the offending characters and could not be encoded to ASCII to display on the console or in a log file (with Python's default ASCII encoding). It might be reasonable to simply sanitize all non-ASCII Unicode whitespace codepoints to ASCII spaces before feeding the contents of the query editor to Raco.

— Reply to this email directly or view it on GitHub https://github.com/uwescience/myria-web/issues/299.

| Seung-Hee Bae | Computer Science & Engineering Department | University of Washington