mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
e95a6f224a
Bug 1275841 switched some IDL types from "string" to "AUTF8String". This had the unintentional effect of breaking decryption of previously saved passwords that contained special characters. In particular, the AUTF8String type means XPConnect may convert any strings using that type to UTF-16 when crossing XPConnect boundaries. However, crypto-SDR.js (responsible for encrypting and decrypting for the password manager) expects to do conversions between UTF-16 and UTF-8 itself. What ends up happening is crypto-SDR.js decrypts a saved password and tries to convert from UTF-8 to UTF-16, but fails because the decrypted text is already UTF-16. The solution is to use ACString instead of AUTF8String. ACString does not result in automatic encoding changes, so the expectations of crypto-SDR.js are met again, and lets SecretDecoderRing.cpp keep the benefit of working with smart string types. This change probably breaks passwords saved after Bug 1275841 landed and before this patch landed, but the number of passwords this patch breaks is probably much lower than the number of passwords that would be broken if this patch did not land. MozReview-Commit-ID: 6Z01zfwJ6t7 --HG-- extra : rebase_source : 514e78f2e1c2cef3b3692656b20daf3b068a4fee |
||
---|---|---|
.. | ||
locales | ||
pki | ||
ssl | ||
tools | ||
.eslintrc.json | ||
android_stub.h | ||
moz.build |