Index: openacs-4/packages/acs-templating/tcl/captcha-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/Attic/captcha-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-templating/tcl/captcha-procs.tcl 27 Jan 2022 07:26:28 -0000 1.1.2.2 +++ openacs-4/packages/acs-templating/tcl/captcha-procs.tcl 27 Jan 2022 08:18:47 -0000 1.1.2.3 @@ -191,7 +191,7 @@ if {$checksum ne ""} { # While we check for this particular captcha, we also sloppily # cleanup the ones that have already expired. - set text [db_string check_captcha { + set valid_p [db_0or1row check_captcha { with lookup as ( select text, image_checksum @@ -203,9 +203,8 @@ where image_checksum = (select image_checksum from lookup) or expiration < current_timestamp ) - select text from lookup - } -default ""] - set valid_p [expr {$text eq $value}] + select 1 from lookup where text = :value + }] } else { set valid_p 0 }