From aa22e20e0a5d2cd503df218f6e29af4abe59687d Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Thu, 14 Feb 2008 05:23:16 +0000 Subject: [PATCH] * src/cyrsasl_digest.erl: Unquote backslash in DIGEST-MD5 quoted strings (EJAB-304) SVN Revision: 1190 --- ChangeLog | 3 +++ src/cyrsasl_digest.erl | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 817f0bbdc..48d709607 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-02-14 Alexey Shchepin + * src/cyrsasl_digest.erl: Unquote backslash in DIGEST-MD5 quoted + strings (EJAB-304) + * src/mod_roster.erl: Removed the ancient Psi roster workaround * src/mod_roster_odbc.erl: Likewise diff --git a/src/cyrsasl_digest.erl b/src/cyrsasl_digest.erl index 1dfd54931..190695176 100644 --- a/src/cyrsasl_digest.erl +++ b/src/cyrsasl_digest.erl @@ -87,15 +87,17 @@ parse1([], [], T) -> parse1([], _S, _T) -> bad. -parse2([$" | Cs], Key, Val, Ts) -> +parse2([$\" | Cs], Key, Val, Ts) -> parse3(Cs, Key, Val, Ts); parse2([C | Cs], Key, Val, Ts) -> parse4(Cs, Key, [C | Val], Ts); parse2([], _, _, _) -> bad. -parse3([$" | Cs], Key, Val, Ts) -> +parse3([$\" | Cs], Key, Val, Ts) -> parse4(Cs, Key, Val, Ts); +parse3([$\\, C | Cs], Key, Val, Ts) -> + parse3(Cs, Key, [C | Val], Ts); parse3([C | Cs], Key, Val, Ts) -> parse3(Cs, Key, [C | Val], Ts); parse3([], _, _, _) ->