Created attachment 660153 [details] Edit addon - Add-on Builder - 2 screenshots User Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1 Build ID: 20120905151427 Steps to reproduce: I am trying to attach json file which have Japanese(Kanji) data. Actual results: upload an attachment was failed "Error 403 : Forbidden". I tested 4 encordings "UTF-8 without BOM", "UTF-8 with BOM", "UTF-16 without BOM", "UTF-16 with BOM", but failed all of them. Expected results: Add-on Builder should handle Japanese properly.
Please provide an attachment with Kanji. In the format you consider the most popular.
Assignee: nobody → zaloon
Priority: -- → P1
Here you are. You can download simple json files from Google Drive. https://docs.google.com/open?id=0B7x9FcIJnkg5d3lrSDladnYzQ1U and I tested again, results as follows. json with Kanji encoded UTF-8 with BOM -> 403 Forbidden json with Kanji encoded UTF-8 without BOM -> 403 Forbidden json with Kanji encoded UTF-16LE with BOM -> successfully attached but Kanji is broken json with Kanji encoded UTF-16LE without BOM -> successfully attached but Kanji is broken json with Kanji encoded UTF-16BE with BOM -> successfully attached but Kanji is broken json with Kanji encoded UTF-16BE without BOM -> successfuly attached but Kanji is broken
There is an issue. https://github.com/mozilla/FlightDeck/blob/master/apps/jetpack/views.py#L723 Removing this code fixes the above issue, but breaks the test with jquery mpiotr.zalewa.info/downloads/jquery-1.6.4.min.jsinified file - https://github.com/mozilla/FlightDeck/blob/master/apps/jetpack/tests/attachment_test.py#L93 I believe the question is which file is properly encoded, if we should allow both then it's a different story: * piotr.zalewa.info/downloads/kanji_utf8.json * piotr.zalewa.info/downloads/jquery-1.6.4.min.js Please advice
I found a way, but I consider it flaky, please tell me if attachment 661277 [details] is properly encoded ... I made it by copy & paste into vi and saved it... It is passing the test without any changes to the code.
sorry - cancel the last message
Fix is waiting for code review https://github.com/mozilla/FlightDeck/pull/165
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.