<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,8 @@
+== 1.2.2.3 (2007-10-09) ==
+* Fixed the CAPTCHA image generator to fall-back to a non-TTF. Patra discovered
+  that the Kitto system check reported all-OK despite TTF support not being
+  enabled on their server, causing the CAPTCHA to fail.
+
 == 1.2.2.2 (2007-10-03) ==
 * System check script added. This file allows a user to know if their server is
   capable of running Kitto.</diff>
      <filename>CHANGES</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,10 @@
+== 1.2.2.1 or 1.2.2.2 to 1.2.2.3 ==
+To upgrade an earlier 1.2.2 release to 1.2.2.3, update the following files:
+
+    * captcha.php
+    * scripts/user/register.php (line 64 modified).
+    * scripts/user/forgot_password.php (line 66 modified).
+
 == 1.2.2.1, 1.2.2.2 ==
 Both of these releases contained insignificant updates. 1.2.2.1 corrected
 an error in the db/mysql4_ddl.sql file, and 1.2.2.2 was targetted towards</diff>
      <filename>UPGRADING</filename>
    </modified>
    <modified>
      <diff>@@ -50,7 +50,7 @@ class CaptchaSecurityImages {
    }
 
     function CaptchaSecurityImages($width='120',$height='40',$characters='6',$font) {
-        global $font,$font_ballback;
+        global $font,$font_fallback;
         $code = $this-&gt;generateCode($characters);
 
         /* font size will be 75% of the image height */
@@ -72,20 +72,20 @@ class CaptchaSecurityImages {
         }
         $x = 4;
         $y = 5;
-        if (@imagettfbbox($font_size, 0, $font, $code)) {
+
+        if(function_exists('imagettfbbox') == true)
+        {
+            imagettfbbox($font_size, 0, $font, $code);
             $textbox = imagettfbbox($font_size, 0, $font, $code);
             $x = ($width - $textbox[4])/2;
             $y = ($height - $textbox[5])/2;
             imagettftext($image, $font_size, 0, $x, $y, $text_color, $font, $code);
-        } else {
-            imagestring($image, $font_ballback, $x, $y, $code, $text_color);
+        } 
+        else 
+        {
+            imagestring($image, $font_fallback, $x, $y, $code, $text_color);
         }
-        /* create textbox and add text
-        $textbox = imagettfbbox($font_size, 0, $font, $code) or die('Error in imagettfbbox function');
-        $x = ($width - $textbox[4])/2;
-        $y = ($height - $textbox[5])/2;
-        imagettftext($image, $font_size, 0, $x, $y, $text_color, $font, $code) or die('Error in imagettftext function');
-        output captcha image to browser */
+        
         header('Content-Type: image/jpeg');
         imagejpeg($image);
         imagedestroy($image);</diff>
      <filename>captcha.php</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ else
             {
                 $ERRORS[] = 'Internal CAPTCHA error. Please report this if it persists.';
             }
-            elseif($FORGOT['code'] != $_SESSION['security_code'])
+            elseif(strtolower($FORGOT['code']) != strtolower($_SESSION['security_code']))
             {
                 $ERRORS[] = &quot;Incorrect security code specified.&quot;;
             }</diff>
      <filename>scripts/user/forgot_password.php</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ switch($_REQUEST['state'])
 		{
 			$ERRORS[] = 'Internal CAPTCHA error. Please report this if it persists.';
 		}
-		elseif($_POST['captcha_code'] != $_SESSION['security_code'])
+		elseif(strtolower($_POST['captcha_code']) != strtolower($_SESSION['security_code']))
 		{
 			$ERRORS[] = &quot;Incorrect security code specified.&quot;;
 		}</diff>
      <filename>scripts/user/register.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e0a9b7fd494091ed76549eeefaeec18df7415de8</id>
    </parent>
  </parents>
  <author>
    <name>nevans</name>
    <email>nevans</email>
  </author>
  <url>http://github.com/OwlManAtt/kittokittokitto/commit/042735b391fc6ab052fea8f4d40d8e24b1519649</url>
  <id>042735b391fc6ab052fea8f4d40d8e24b1519649</id>
  <committed-date>2007-10-09T05:20:12-07:00</committed-date>
  <authored-date>2007-10-09T05:20:12-07:00</authored-date>
  <message>Fixed CAPTCHA</message>
  <tree>d00c9a21bdabc2e841aa6758edc731e1275be836</tree>
  <committer>
    <name>nevans</name>
    <email>nevans</email>
  </committer>
</commit>
