Closed Bug 471853 Opened 16 years ago Closed 15 years ago

A Weave encryption passphrase with special symbols will not let Weave sync

Categories

(Cloud Services :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: for.bugzilla, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

A special symbol in the Weave encryption passphrase will not let Weave Synchronize.

Example:
g9qL(nj#fdM+4G6xE3:.W7]Qtim?eA8"k&2;wBYVZFUDNvR
or a simply ' is also not working

Errors in the log that are seen:
2009-01-02 10:51:23	Engine.History	WARN	Sync failed
2009-01-02 10:51:23	Service.Main	WARN	Engine exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [IWeaveCrypto.unwrapSymmetricKey]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///Users/maartenrenckens/Library/Application%20Support/Firefox/Profiles/4gijbowk.Weave%201/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/base_records/crypto.js :: CryptoMeta__getKey :: line 169"  data: no]
2009-01-02 10:51:23	Engine.Bookmarks	WARN	Sync failed
2009-01-02 10:51:23	Service.Main	WARN	Engine exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [IWeaveCrypto.unwrapSymmetricKey]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///Users/maartenrenckens/Library/Application%20Support/Firefox/Profiles/4gijbowk.Weave%201/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/base_records/crypto.js :: CryptoMeta__getKey :: line 169"  data: no]


In with the latest number in line xxx can be different

Reproducible: Always
Summary: A Weave encryption passphrase with special symbols will net Weave sync → A Weave encryption passphrase with special symbols will not let Weave sync
Blocks: 468694
Target Milestone: -- → 0.3
Justin, any ideas?  Is this a WeaveCrypto or an NSS limitation?
If it's a quote symbol causing a problem, I'd suspect a problem above WeaveCrypto. Normal ASCII characters shouldn't ever cause it a problem, it's just byte arrays for WeaveCrypto.

That said, I wonder if WeaveCrypto handles non-ASCII inputs correctly or not. I ran into this with the password manager in bug 451155... I think this shouldn't matter for passwords too much (more of an interoperability issue), but could manifest as, say, corrupting bookmark names using CJK characters.
Adding the solution for now, so users who find this bug have a way around:
(from: https://labs.mozilla.com/forum/comments.php?DiscussionID=4910&page=1#Item_21 where the bug was traced by vasechka)


Changing your passphrase is currently a slightly tricky operation. Weave doesn't make it easy for you by letting you re-encrypt the key, so you have to:

1) reset the "lastSync" prefs (one per data type) in about:config, so that Weave uploads all items on next sync (instead of just changed items).
2) go into the login manager in the Fx prefs and delete the chrome://weave entries (the saved password & passphrase).
3) quit Firefox on *every* computer. This is *important*, because Weave caches the keys (since they are needed very often). You don't want to use an old key because:
4) delete *all* server data (including keys and crypto records). See the topic in the forum about curl: https://labs.mozilla.com/forum/comments.php?DiscussionID=4892&page=1
5) Start Firefox, login and choose your new passphrase.

Incidentally, that's about as close as you can get to a "fresh start" as possible.
It'd be great to have that info in the wiki, where it might get more visibility!
Done at https://wiki.mozilla.org/Labs/Weave/FAQ
I hope I don't have made any mistakes, my English isn't so good as I want...

But someone with a lot of time has to rewrite the wiki dramatically!
A lot of information is outdated ('Weave 0.2 server information' is at end of live, and I have edited the Weave 0.1 server information)
We should prevent the user from creating a passphrase with special symbols.
Priority: -- → P1
I just tried various passphrases and all of them worked.

Simple passphrases like just a single quote ' worked as well as the provided: g9qL(nj#fdM+4G6xE3:.W7]Qtim?eA8"k&2;wBYVZFUDNvR

The unwrapSymmetricKey failure is just that you have data encrypted with multiple passphrases stored on the server. You can get out of that problem for now by wiping the server data (advanced -> debuggin) and making sure you have the same passphrase on each machine.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Component: Weave → General
Product: Mozilla Labs → Weave
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.