Closed
Bug 790318
Opened 13 years ago
Closed 13 years ago
upload an attachment was failed "Error 403 : Forbidden" if json file has Japanese(Kanji) data
Categories
(addons.mozilla.org Graveyard :: Add-on Builder, defect, P1)
addons.mozilla.org Graveyard
Add-on Builder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: backy0175, Assigned: zalun)
Details
Attachments
(2 files)
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.
Assignee | ||
Comment 1•13 years ago
|
||
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
Assignee | ||
Comment 3•13 years ago
|
||
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
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
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.
Assignee | ||
Comment 6•13 years ago
|
||
sorry - cancel the last message
Assignee | ||
Comment 7•13 years ago
|
||
Fix is waiting for code review https://github.com/mozilla/FlightDeck/pull/165
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•