Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into dev
  • Loading branch information
flambard committed Jul 7, 2013
2 parents 5cb0d48 + f3ef4c0 commit 4d45f55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/md5.lisp
Expand Up @@ -3,4 +3,4 @@
(in-package :cleric)

(defun calculate-digest (challenge cookie)
(md5:md5sum-sequence (format nil "~a~a" cookie challenge)))
(md5:md5sum-string (format nil "~a~a" cookie challenge)))
10 changes: 10 additions & 0 deletions test/tests.lisp
Expand Up @@ -20,3 +20,13 @@

(defmethod asdf:perform ((op asdf:test-op) (system (eql (asdf:find-system :cleric-test))))
(run-all-tests))


(test sbcl-challenge-md5-digest-bug
;; Bug in CLERIC::CALCULATE-DIGEST, it returned same MD5sum for different
;; strings! Turns out that MD5:MD5SUM-SEQUENCE is deprecated for strings.
;; Use MD5:MD5SUM-STRING instead.
(is (not (every #'=
(cleric::calculate-digest 1234567890 "kaka")
(cleric::calculate-digest 1234567891 "kaka"))))
)

0 comments on commit 4d45f55

Please sign in to comment.