Bug 2208 - LDAP encrypted passwords produce invalid XML
Summary: LDAP encrypted passwords produce invalid XML
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Address Book (show other bugs)
Version: 3.7.6
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2010-05-19 07:03 UTC by David Schneider
Modified: 2010-08-24 10:31 UTC (History)
0 users

See Also:


Attachments

Description David Schneider 2010-05-19 07:03:18 UTC
For one, thank you for fixing bug 2113.
Unfortunately, I have stumbled upon a regression: the output of the encrypted password produces invalid UTF-8, which in turn makes parsers like the Python expat parser (that programs like Kupfer use to index the address books) fail with an error like "xml.parsers.expat.ExpatError: not well-formed (invalid token)".
Interestingly enough, despite my LDAP and e-mail passwords being the same, the encrypted password in accountrc is slightly longer but of valid characters, while the LDAP one is shorter but with invalid characters (16 vs. 11 characters), which has me believing that a base64 or similar encoding step is missing with LDAP password storage.
Comment 1 Michael Rasmussen 2010-05-19 07:59:01 UTC
Hi,

You are right that the password causes the file to have invalid UTF-8 which I will investigate further.

The reason for your password not being identical should not be the cause since the same password function is used. Differences might be caused by adding different "salt" to the encrypted string.
Comment 2 David Schneider 2010-05-19 08:45:03 UTC
Wouldn't a salt simply change the encoded string, not the range of produced characters?  The increased length of the accountrc version also increases my suspicions...
Regardless, I haven't looked at the code so I defer to you, the actual developer :)
Comment 3 users 2010-05-22 13:21:34 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2010-05-22 [mir]	3.7.6cvs8

	* src/ldapctrl.c
	   Fix bug 2208. Encode encrypted password to qouted
	   printable to avoid making invalid XML. Encoding
	   will be activated the first time the password is
	   changed.
Comment 4 users 2010-07-25 12:58:21 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2010-07-25 [colin]	3.7.6cvs20

	* src/common/utils.c
		Reverse free/use with more logical and safe
		use/free. Thanks to Michael Rasmussen !

2010-07-24 [colin]	3.7.6cvs19

	* src/gtk/quicksearch.c
		Finish 3.7.5cvs42 patch. Probably fixes bug 2232,
		'freeze when using quick search'

2010-07-11 [iwkse]	3.7.6cvs18

	* src/gtk/quicksearch.c
		Add SMALL_LAYOUT to quicksearch_relayout

2010-07-10 [iwkse]	3.7.6cvs17

	* src/mainwindow.h
			Remove forgotten variable from
			the last bugfix #2224

2010-07-10 [colin]	3.7.6cvs16

	* src/mainwindow.c
	* src/gtk/quicksearch.c
		Clean fix for bug #2224: don't mess with GTK settings when
		handling the layout ourselves is enough

2010-07-09 [iwkse]	3.7.6cvs15

	* src/mainwindow.h
	* src/mainwindow.c
			Better fix for Bug #2224

2010-07-09 [iwkse]	3.7.6cvs14

	* src/mainwindow.c
			Bug #2224
			Always use stock icons on buttons

2010-07-08 [colin]	3.7.6cvs13

	* src/gtk/filesel.c
		Fix bug 2223, 'Compilation fails with GTK+
		2.21.3'. Thanks to Jan Psota !

		Do not add into quicksearch history
		matching rules with bad syntax
		Fix bug 2208. Encode encrypted password to qouted
		printable to avoid making invalid XML. Encoding
		will be activated the first time the password is
		changed.

Note You need to log in before you can comment on or make changes to this bug.