Hello.
Huncentoot used md5 library to generate session strings. The function MD5:MD5SUM-SEQUENCE allows only SIMPLE-STRINGs as arguments. Hunchentoot passes result of FORMAT, which is not necessary returns SIMPLE-STRING (although in many implementations it does).
In particular just encountered this error when testing Hunchentoot on ECL (with the patch sent by Marko Kocic here: http://common-lisp.net/pipermail/tbnl-devel/2008-November/004474.html)
The fix will be as follows:
(defun md5-hex (string) "Calculates the md5 sum of the string STRING and returns it as a hex string." (with-output-to-string (s) - (loop for code across (md5:md5sum-sequence string) + (loop for code across (md5:md5sum-sequence (coerce string 'simple-string)) do (format s "~2,'0x" code))))
Best regards, - Anton
Fix applied, thank you. Please send a context diff next time.
The ECL patches unfortunately are against the last release version, so we will not be able to include them in the upcoming release which will be based on the development version. Hopefully, someone can supply us with a new change set for ECL after the release.
-Hans
On Tue, Dec 9, 2008 at 04:22, Anton Vodonosov avodonosov@yandex.ru wrote:
Hello.
Huncentoot used md5 library to generate session strings. The function MD5:MD5SUM-SEQUENCE allows only SIMPLE-STRINGs as arguments. Hunchentoot passes result of FORMAT, which is not necessary returns SIMPLE-STRING (although in many implementations it does).
In particular just encountered this error when testing Hunchentoot on ECL (with the patch sent by Marko Kocic here: http://common-lisp.net/pipermail/tbnl-devel/2008-November/004474.html)
The fix will be as follows:
(defun md5-hex (string) "Calculates the md5 sum of the string STRING and returns it as a hex string." (with-output-to-string (s)
- (loop for code across (md5:md5sum-sequence string)
- (loop for code across (md5:md5sum-sequence (coerce string 'simple-string)) do (format s "~2,'0x" code))))
Best regards,
- Anton
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
On Tue, Dec 9, 2008 at 12:51 AM, Hans Hübner hans@huebner.org wrote:
The ECL patches unfortunately are against the last release version, so we will not be able to include them in the upcoming release which will be based on the development version. Hopefully, someone can supply us with a new change set for ECL after the release.
Could someone update either http://www.weitz.de/hunchentoot/ or http://weitz.de/patches.html to this effect?
A short message explaining where the development branch of Hunchentoot is (or how to coordinate development) would have been very helpful. Even a message like "We're not accepting patches for Hunchentoot/this version is obsolete" would be nice, or at the very least, a "please check with the mailing list before writing any code targetting Hunchentoot".
I spent a fair amount of time porting ECL to Hunchentoot (and porting Hunchentoot's dependencies to ECL) only to discover it was wasted efforts in a similar way. Having some big friendly letters explaining how to get this "development version" on the Hunchentoot website would have saved my time, and clearly others.