Fossil User Forum

Remove unecessary length check
Login

Remove unecessary length check

Remove unecessary length check

(1) By anonymous on 2021-01-27 10:19:25 [source]

The length of zEntered does not have to be checked twice (it is first checked three lines above)

--- captcha.c.orig      Wed Jan 20 16:34:40 2021
+++ captcha.c   Tue Jan 26 23:24:26 2021
@@ -516,7 +516,6 @@
   if( zEntered==0 || strlen(zEntered)!=8 ) return 0;
   zDecode = captcha_decode((unsigned int)atoi(zSeed));
   assert( strlen(zDecode)==8 );
-  if( strlen(zEntered)!=8 ) return 0;
   for(i=0; i<8; i++){
     char c = zEntered[i];
     if( c>='A' && c<='F' ) c += 'a' - 'A';

(2) By anonymous on 2021-01-28 19:02:45 in reply to 1 [link] [source]

Ok wait till Feb 29 to do anything

(3) By Warren Young (wyoung) on 2021-01-28 19:11:06 in reply to 2 [link] [source]

It was fixed about four hours after you reported it.