Closed
Bug 1088641
Opened 11 years ago
Closed 11 years ago
TEST-UNEXPECTED-FAIL | addon-sdk/tests/test-base64.test encode/decode Unicode without utf-8 as charset | TypeError: Cannot convert string to ByteString because the character at index 0 has value 10003 which is greater than 255.
Categories
(Add-on SDK Graveyard :: General, defect, P1)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: evold, Assigned: mossop)
References
()
Details
Attachments
(1 file, 1 obsolete file)
TEST-START | addon-sdk/tests/test-base64.test encode/decode Unicode without utf-8 as charset
TEST-UNEXPECTED-FAIL | addon-sdk/tests/test-base64.test encode/decode Unicode without utf-8 as charset | TypeError: Cannot convert string to ByteString because the character at index 0 has value 10003 which is greater than 255.
An exception occurred.
Traceback (most recent call last):
File "resource://gre/modules/Promise-backend.js", line 744, in this.PromiseWalker.walkerLoop
this.handlers.shift().process();
File "resource://gre/modules/Promise-backend.js", line 865, in Handler.prototype.process
nextValue = this.onResolve.call(undefined, nextValue);
File "resource://extensions.modules.12b25901-32d8-463b-9dfe-017327f3e359-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 504, in startMany/runNextTest/<
self.start({test: test, onDone: runNextTest});
File "resource://extensions.modules.12b25901-32d8-463b-9dfe-017327f3e359-at-jetpack.commonjs.path/sdk/deprecated/unit-test.js", line 541, in start
this.test.testFunction(this);
File "resource://extensions.modules.12b25901-32d8-463b-9dfe-017327f3e359-at-jetpack.commonjs.path/sdk/test.js", line 76, in
test(assert);
File "resource://12b25901-32d8-463b-9dfe-017327f3e359-at-jetpack/addon-sdk/tests/test-base64.js", line 69, in exports["test encode/decode Unicode without utf-8 as charset"]
assert.notEqual(base64.decode(base64.encode(utf8text)), utf8text,
File "resource://extensions.modules.12b25901-32d8-463b-9dfe-017327f3e359-at-jetpack.commonjs.path/sdk/base64.js", line 41, in exports.encode
return btoa(data);
TypeError: Cannot convert string to ByteString because the character at index 0 has value 10003 which is greater than 255.
TEST-END | addon-sdk/tests/test-base64.test encode/decode Unicode without utf-8 as charset
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 2•11 years ago
|
||
Attachment #8511361 -
Flags: review?(rFobic)
| Reporter | ||
Updated•11 years ago
|
Assignee: nobody → evold
| Reporter | ||
Updated•11 years ago
|
Priority: -- → P1
| Reporter | ||
Comment 3•11 years ago
|
||
Attachment #8511376 -
Flags: review+
| Reporter | ||
Updated•11 years ago
|
Attachment #8511361 -
Attachment description: Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1682 → Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1683
Attachment #8511361 -
Attachment is obsolete: true
Attachment #8511361 -
Flags: review?(rFobic)
| Reporter | ||
Updated•11 years ago
|
Assignee: evold → nobody
Comment 4•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/2bad89d1239c4bdd8dda5c6f8f924a2f54b4613d
Bug 1088641: Strip all but the low-bytes of characters when calling base64.encode without a charset.
https://github.com/mozilla/addon-sdk/commit/54417b495f3c3ad82364857a92388eaeca67a6a0
Merge pull request #1683 from Mossop/bug1088641
Bug 1088641: Strip all but the low-bytes of characters when calling base64.encode without a charset. r=@erikvold
| Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Assignee: nobody → dtownsend+bugmail
Comment 5•11 years ago
|
||
To make it clear what happened here: in bug 1019191 the xpconnect behavior changed from "silently corrupt the data" to "throw an exception on invalid data".
I guess the SDK has to preserve the old "corrupt the data" behavior for compat, right? :(
Blocks: 1019191
You need to log in
before you can comment on or make changes to this bug.
Description
•