[hunchentoot-devel] only simple-string's are allowed for md5:md5sum-sequence

Hans Hübner hans at huebner.org
Tue Dec 9 05:51:15 UTC 2008


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 at 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 at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>




More information about the Tbnl-devel mailing list