Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1370)
+++ branches/2.8.x/CHANGELOG	(revision 1371)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.2 -------------------------------------
+09 Jan-2011 Build 1371 Dietmar Woellbrink (Luisehahne)
+# captcha patch (Tks to FrankH)
 09 Jan-2011 Build 1370 Dietmar Woellbrink (Luisehahne)
 ! update install, changed some default settings to enabled
 06 Jan-2011 Build 1369 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/include/captcha/captchas/ttf_image.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/ttf_image.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/ttf_image.php	(revision 1371)
@@ -1,141 +1,144 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require_once("../../../config.php");
-require_once(WB_PATH.'/include/captcha/captcha.php');
-
-if(!isset($_SESSION['captcha_time']))
-	exit;
-unset($_SESSION['captcha_time']);
-
-// get lists of fonts and backgrounds
-require_once(WB_PATH.'/framework/functions.php');
-$t_fonts = file_list(WB_PATH.'/include/captcha/fonts');
-$t_bgs = file_list(WB_PATH.'/include/captcha/backgrounds');
-$fonts = array();
-$bgs = array();
-foreach($t_fonts as $file) { if(preg_match('/\.ttf/',$file)) { $fonts[]=$file; } }
-foreach($t_bgs as $file) { if(preg_match('/\.png/',$file)) { $bgs[]=$file; } }
-
-// make random string
-if(!function_exists('randomString')) {
-	function randomString($len) {
-		list($usec, $sec) = explode(' ', microtime());
-		mt_srand((float)$sec + ((float)$usec * 100000));
-		//$possible="ABCDEFGHJKLMNPRSTUVWXYZabcdefghkmnpqrstuvwxyz23456789";
-		$possible="abdfhkrsvwxz23456789";
-		$str="";
-		while(strlen($str)<$len) {
-			$str.=substr($possible,(mt_rand()%(strlen($possible))),1);
-		}
-		return($str);
-	}
-}
-$text = randomString(5); // number of characters
-$_SESSION['captcha'] = $text; 
-
-// choose a font and background
-$font = $fonts[array_rand($fonts)];
-$bg = $bgs[array_rand($bgs)];
-// get image-dimensions
-list($width, $height, $type, $attr) = getimagesize($bg);
-
-// create reload-image
-$reload = ImageCreateFromPNG(WB_PATH.'/include/captcha/reload_140_40.png'); // reload-overlay
-
-if(mt_rand(0,2)==0) { // 1 out of 3
-
-	// draw each character individualy
-	$image = ImageCreateFromPNG($bg); // background image
-	$grey = mt_rand(0,50);
-	$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
-	$ttf = $font;
-	$ttfsize = 25; // fontsize
-	$count = 0;
-	$image_failed = true;
-	$angle = mt_rand(-15,15);
-	$x = mt_rand(10,25);
-	$y = mt_rand($height-10,$height-2);
-	do {
-		for($i=0;$i<strlen($text);$i++) {
-			$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text{$i});
-			$angle = mt_rand(-15,15);
-			$x = mt_rand($res[4],$res[4]+10);
-			$y = mt_rand($height-15,$height-5);
-		}
-		if($res[4] > $width) {
-			$image_failed = true;
-		} else {
-			$image_failed = false;
-		}
-		if(++$count > 4) // too many tries! Use the image
-			break;
-	} while($image_failed);
-	
-} else {
-	
-	// draw whole string at once
-	$image_failed = true;
-	$count=0;
-	do {
-		$image = ImageCreateFromPNG($bg); // background image
-		$grey = mt_rand(0,50);
-		$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
-		$ttf = $font;
-		$ttfsize = 25; // fontsize
-		$angle = mt_rand(0,5);
-		$x = mt_rand(5,30);
-		$y = mt_rand($height-10,$height-2);
-		$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text);
-		// check if text fits into the image
-		if(($res[0]>0 && $res[0]<$width) && ($res[1]>0 && $res[1]<$height) && 
-			 ($res[2]>0 && $res[2]<$width) && ($res[3]>0 && $res[3]<$height) && 
-			 ($res[4]>0 && $res[4]<$width) && ($res[5]>0 && $res[5]<$height) && 
-			 ($res[6]>0 && $res[6]<$width) && ($res[7]>0 && $res[7]<$height)
-		) {
-			$image_failed = false;
-		}
-		if(++$count > 4) // too many tries! Use the image
-			break;
-	} while($image_failed);
-	
-}
-
-imagealphablending($reload, TRUE);
-imagesavealpha($reload, TRUE);
-
-// overlay
-imagecopy($reload, $image, 0,0,0,0, 140,40);
-imagedestroy($image);
-$image = $reload;
-
-captcha_header();
-ob_start();
-imagepng($image);
-header("Content-Length: ".ob_get_length()); 
-ob_end_flush();
-imagedestroy($image);
-
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require_once("../../../config.php");
+require_once(WB_PATH.'/include/captcha/captcha.php');
+
+if(!isset($_SESSION['captcha_time']))
+	exit;
+//unset($_SESSION['captcha_time']);
+
+// get lists of fonts and backgrounds
+require_once(WB_PATH.'/framework/functions.php');
+$t_fonts = file_list(WB_PATH.'/include/captcha/fonts');
+$t_bgs = file_list(WB_PATH.'/include/captcha/backgrounds');
+$fonts = array();
+$bgs = array();
+foreach($t_fonts as $file) if(eregi('\.ttf$',$file)) $fonts[]=$file;
+foreach($t_bgs as $file) if(eregi('\.png$',$file)) $bgs[]=$file;
+
+// make random string
+if(!function_exists('randomString')) {
+	function randomString($len) {
+		list($usec, $sec) = explode(' ', microtime());
+		mt_srand((float)$sec + ((float)$usec * 100000));
+		//$possible="ABCDEFGHJKLMNPRSTUVWXYZabcdefghkmnpqrstuvwxyz23456789";
+		$possible="abdfhkrsvwxz23456789";
+		$str="";
+		while(strlen($str)<$len) {
+			$str.=substr($possible,(mt_rand()%(strlen($possible))),1);
+		}
+		return($str);
+	}
+}
+$text = randomString(5); // number of characters
+
+$sec_id = '';
+if(isset($_GET['s'])) $sec_id = $_GET['s'];
+$_SESSION['captcha'.$sec_id] = $text;
+
+// choose a font and background
+$font = $fonts[array_rand($fonts)];
+$bg = $bgs[array_rand($bgs)];
+// get image-dimensions
+list($width, $height, $type, $attr) = getimagesize($bg);
+
+// create reload-image
+$reload = ImageCreateFromPNG(WB_PATH.'/include/captcha/reload_140_40.png'); // reload-overlay
+
+if(mt_rand(0,2)==0) { // 1 out of 3
+
+	// draw each character individualy
+	$image = ImageCreateFromPNG($bg); // background image
+	$grey = mt_rand(0,50);
+	$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
+	$ttf = $font;
+	$ttfsize = 25; // fontsize
+	$count = 0;
+	$image_failed = true;
+	$angle = mt_rand(-15,15);
+	$x = mt_rand(10,25);
+	$y = mt_rand($height-10,$height-2);
+	do {
+		for($i=0;$i<strlen($text);$i++) {
+			$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text{$i});
+			$angle = mt_rand(-15,15);
+			$x = mt_rand($res[4],$res[4]+10);
+			$y = mt_rand($height-15,$height-5);
+		}
+		if($res[4] > $width) {
+			$image_failed = true;
+		} else {
+			$image_failed = false;
+		}
+		if(++$count > 4) // too many tries! Use the image
+			break;
+	} while($image_failed);
+	
+} else {
+	
+	// draw whole string at once
+	$image_failed = true;
+	$count=0;
+	do {
+		$image = ImageCreateFromPNG($bg); // background image
+		$grey = mt_rand(0,50);
+		$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
+		$ttf = $font;
+		$ttfsize = 25; // fontsize
+		$angle = mt_rand(0,5);
+		$x = mt_rand(5,30);
+		$y = mt_rand($height-10,$height-2);
+		$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text);
+		// check if text fits into the image
+		if(($res[0]>0 && $res[0]<$width) && ($res[1]>0 && $res[1]<$height) && 
+			 ($res[2]>0 && $res[2]<$width) && ($res[3]>0 && $res[3]<$height) && 
+			 ($res[4]>0 && $res[4]<$width) && ($res[5]>0 && $res[5]<$height) && 
+			 ($res[6]>0 && $res[6]<$width) && ($res[7]>0 && $res[7]<$height)
+		) {
+			$image_failed = false;
+		}
+		if(++$count > 4) // too many tries! Use the image
+			break;
+	} while($image_failed);
+	
+}
+
+imagealphablending($reload, TRUE);
+imagesavealpha($reload, TRUE);
+
+// overlay
+imagecopy($reload, $image, 0,0,0,0, 140,40);
+imagedestroy($image);
+$image = $reload;
+
+captcha_header();
+ob_start();
+imagepng($image);
+header("Content-Length: ".ob_get_length()); 
+ob_end_flush();
+imagedestroy($image);
+
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/include/captcha/captchas/old_image.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/old_image.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/old_image.php	(revision 1371)
@@ -28,11 +28,13 @@
 
 if(!isset($_SESSION['captcha_time']))
 	exit;
-unset($_SESSION['captcha_time']);
+//unset($_SESSION['captcha_time']);
 
 // Captcha
 srand((double)microtime()*100000);
-$_SESSION['captcha'] = rand(10000,99999);
+$sec_id = '';
+if(isset($_GET['s'])) $sec_id = $_GET['s'];
+$_SESSION['captcha'.$sec_id] = rand(10000,99999);
 
 // create reload-image
 $reload = ImageCreateFromPNG(WB_PATH.'/include/captcha/reload_120_30.png'); // reload-overlay
@@ -58,7 +60,7 @@
 	$fnt = rand(3,5);
 	$x = $x + rand(12 , 20);
 	$y = rand(7 , 12); 
-	imagestring($image, $fnt, $x, $y, substr($_SESSION['captcha'], $i, 1), $darkgray); 
+	imagestring($image, $fnt, $x, $y, substr($_SESSION['captcha'.$sec_id], $i, 1), $darkgray); 
 }
 
 imagealphablending($reload, TRUE);
Index: branches/2.8.x/wb/include/captcha/captchas/calc_ttf_image.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/calc_ttf_image.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/calc_ttf_image.php	(revision 1371)
@@ -1,150 +1,152 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require_once("../../../config.php");
-require_once(WB_PATH.'/include/captcha/captcha.php');
-
-if(!isset($_SESSION['captcha_time']))
-	exit;
-unset($_SESSION['captcha_time']);
-
-// get lists of fonts and backgrounds
-require_once(WB_PATH.'/framework/functions.php');
-$t_fonts = file_list(WB_PATH.'/include/captcha/fonts');
-$t_bgs = file_list(WB_PATH.'/include/captcha/backgrounds');
-$fonts = array();
-$bgs = array();
-foreach($t_fonts as $file) { if(preg_match('/\.ttf/',$file)) { $fonts[]=$file; } }
-foreach($t_bgs as $file) { if(preg_match('/\.png/',$file)) { $bgs[]=$file; } }
-
-// Captcha
-$_SESSION['captcha'] = '';
-mt_srand((double)microtime()*1000000);
-$n = mt_rand(1,3);
-switch ($n) {
-	case 1:
-		$x = mt_rand(1,9);
-		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x + $y;
-		$cap = "$x+$y"; 
-		break; 
-	case 2:
-		$x = mt_rand(10,20);
-		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x - $y; 
-		$cap = "$x-$y"; 
-		break;
-	case 3:
-		$x = mt_rand(2,10);
-		$y = mt_rand(2,5);
-		$_SESSION['captcha'] = $x * $y; 
-		$cap = "$x*$y"; 
-		break;
-}
-$text = $cap;
-
-// choose a font and background
-$font = $fonts[array_rand($fonts)];
-$bg = $bgs[array_rand($bgs)];
-// get image-dimensions
-list($width, $height, $type, $attr) = getimagesize($bg);
-
-// create reload-image
-$reload = ImageCreateFromPNG(WB_PATH.'/include/captcha/reload_140_40.png'); // reload-overlay
-
-if(mt_rand(0,2)==0) { // 1 out of 3
-
-	// draw each character individualy
-	$image = ImageCreateFromPNG($bg); // background image
-	$grey = mt_rand(0,50);
-	$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
-	$ttf = $font;
-	$ttfsize = 25; // fontsize
-	$count = 0;
-	$image_failed = true;
-	$angle = mt_rand(-10,10);
-	$x = mt_rand(20,35);
-	$y = mt_rand($height-10,$height-2);
-	do {
-		for($i=0;$i<strlen($text);$i++) {
-			$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text{$i});
-			$angle = mt_rand(-10,10);
-			$x = mt_rand($res[4],$res[4]+10);
-			$y = mt_rand($height-12,$height-7);
-		}
-		if($res[4] > $width) {
-			$image_failed = true;
-		} else {
-			$image_failed = false;
-		}
-		if(++$count > 4) // too many tries! Use the image
-			break;
-	} while($image_failed);
-	
-} else {
-	
-	// draw whole string at once
-	$image_failed = true;
-	$count=0;
-	do {
-		$image = ImageCreateFromPNG($bg); // background image
-		$grey = mt_rand(0,50);
-		$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
-		$ttf = $font;
-		$ttfsize = 25; // fontsize
-		$angle = mt_rand(0,5);
-		$x = mt_rand(20,35);
-		$y = mt_rand($height-10,$height-2);
-		$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text);
-		// check if text fits into the image
-		if(($res[0]>0 && $res[0]<$width) && ($res[1]>0 && $res[1]<$height) && 
-			 ($res[2]>0 && $res[2]<$width) && ($res[3]>0 && $res[3]<$height) && 
-			 ($res[4]>0 && $res[4]<$width) && ($res[5]>0 && $res[5]<$height) && 
-			 ($res[6]>0 && $res[6]<$width) && ($res[7]>0 && $res[7]<$height)
-		) {
-			$image_failed = false;
-		}
-		if(++$count > 4) // too many tries! Use the image
-			break;
-	} while($image_failed);
-	
-}
-
-imagealphablending($reload, TRUE);
-imagesavealpha($reload, TRUE);
-
-// overlay
-imagecopy($reload, $image, 0,0,0,0, 140,40);
-imagedestroy($image);
-$image = $reload;
-
-captcha_header();
-ob_start();
-imagepng($image);
-header("Content-Length: ".ob_get_length()); 
-ob_end_flush();
-imagedestroy($image);
-
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2009, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require_once("../../../config.php");
+require_once(WB_PATH.'/include/captcha/captcha.php');
+
+if(!isset($_SESSION['captcha_time']))
+	exit;
+//unset($_SESSION['captcha_time']);		// otherwise there can't be 2 captchas on one page!
+
+// get lists of fonts and backgrounds
+require_once(WB_PATH.'/framework/functions.php');
+$t_fonts = file_list(WB_PATH.'/include/captcha/fonts');
+$t_bgs = file_list(WB_PATH.'/include/captcha/backgrounds');
+$fonts = array();
+$bgs = array();
+foreach($t_fonts as $file) if(eregi('\.ttf$',$file)) $fonts[]=$file;
+foreach($t_bgs as $file) if(eregi('\.png$',$file)) $bgs[]=$file;
+
+// Captcha
+$sec_id = '';
+if(isset($_GET['s'])) $sec_id = $_GET['s'];
+$_SESSION['captcha'.$sec_id] = '';
+mt_srand((double)microtime()*1000000);
+$n = mt_rand(1,3);
+switch ($n) {
+	case 1:
+		$x = mt_rand(1,9);
+		$y = mt_rand(1,9);
+		$_SESSION['captcha'.$sec_id] = $x + $y;
+		$cap = "$x+$y"; 
+		break; 
+	case 2:
+		$x = mt_rand(10,20);
+		$y = mt_rand(1,9);
+		$_SESSION['captcha'.$sec_id] = $x - $y; 
+		$cap = "$x-$y"; 
+		break;
+	case 3:
+		$x = mt_rand(2,10);
+		$y = mt_rand(2,5);
+		$_SESSION['captcha'.$sec_id] = $x * $y; 
+		$cap = "$x*$y"; 
+		break;
+}
+$text = $cap;
+
+// choose a font and background
+$font = $fonts[array_rand($fonts)];
+$bg = $bgs[array_rand($bgs)];
+// get image-dimensions
+list($width, $height, $type, $attr) = getimagesize($bg);
+
+// create reload-image
+$reload = ImageCreateFromPNG(WB_PATH.'/include/captcha/reload_140_40.png'); // reload-overlay
+
+if(mt_rand(0,2)==0) { // 1 out of 3
+
+	// draw each character individualy
+	$image = ImageCreateFromPNG($bg); // background image
+	$grey = mt_rand(0,50);
+	$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
+	$ttf = $font;
+	$ttfsize = 25; // fontsize
+	$count = 0;
+	$image_failed = true;
+	$angle = mt_rand(-10,10);
+	$x = mt_rand(20,35);
+	$y = mt_rand($height-10,$height-2);
+	do {
+		for($i=0;$i<strlen($text);$i++) {
+			$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text{$i});
+			$angle = mt_rand(-10,10);
+			$x = mt_rand($res[4],$res[4]+10);
+			$y = mt_rand($height-12,$height-7);
+		}
+		if($res[4] > $width) {
+			$image_failed = true;
+		} else {
+			$image_failed = false;
+		}
+		if(++$count > 4) // too many tries! Use the image
+			break;
+	} while($image_failed);
+	
+} else {
+	
+	// draw whole string at once
+	$image_failed = true;
+	$count=0;
+	do {
+		$image = ImageCreateFromPNG($bg); // background image
+		$grey = mt_rand(0,50);
+		$color = ImageColorAllocate($image, $grey, $grey, $grey); // font-color
+		$ttf = $font;
+		$ttfsize = 25; // fontsize
+		$angle = mt_rand(0,5);
+		$x = mt_rand(20,35);
+		$y = mt_rand($height-10,$height-2);
+		$res = imagettftext($image, $ttfsize, $angle, $x, $y, $color, $ttf, $text);
+		// check if text fits into the image
+		if(($res[0]>0 && $res[0]<$width) && ($res[1]>0 && $res[1]<$height) && 
+			 ($res[2]>0 && $res[2]<$width) && ($res[3]>0 && $res[3]<$height) && 
+			 ($res[4]>0 && $res[4]<$width) && ($res[5]>0 && $res[5]<$height) && 
+			 ($res[6]>0 && $res[6]<$width) && ($res[7]>0 && $res[7]<$height)
+		) {
+			$image_failed = false;
+		}
+		if(++$count > 4) // too many tries! Use the image
+			break;
+	} while($image_failed);
+	
+}
+
+imagealphablending($reload, TRUE);
+imagesavealpha($reload, TRUE);
+
+// overlay
+imagecopy($reload, $image, 0,0,0,0, 140,40);
+imagedestroy($image);
+$image = $reload;
+
+captcha_header();
+ob_start();
+imagepng($image);
+header("Content-Length: ".ob_get_length()); 
+ob_end_flush();
+imagedestroy($image);
+
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/include/captcha/captchas/calc_image.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/calc_image.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/calc_image.php	(revision 1371)
@@ -28,10 +28,12 @@
 
 if(!isset($_SESSION['captcha_time']))
 	exit;
-unset($_SESSION['captcha_time']);
+//unset($_SESSION['captcha_time']);
 
 // Captcha
-$_SESSION['captcha'] = '';
+$sec_id = '';
+if(isset($_GET['s'])) $sec_id = $_GET['s'];
+$_SESSION['captcha'.$sec_id] = '';
 mt_srand((double)microtime()*1000000);
 $n = mt_rand(1,3);
 switch ($n) {
@@ -38,19 +40,19 @@
 	case 1:
 		$x = mt_rand(1,9);
 		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x + $y;
+		$_SESSION['captcha'.$sec_id] = $x + $y;
 		$cap = "$x+$y"; 
 		break; 
 	case 2:
 		$x = mt_rand(10,20);
 		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x - $y; 
+		$_SESSION['captcha'.$sec_id] = $x - $y; 
 		$cap = "$x-$y"; 
 		break;
 	case 3:
 		$x = mt_rand(2,10);
 		$y = mt_rand(2,5);
-		$_SESSION['captcha'] = $x * $y; 
+		$_SESSION['captcha'.$sec_id] = $x * $y; 
 		$cap = "$x*$y"; 
 		break;
 }
Index: branches/2.8.x/wb/include/captcha/captchas/text.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/text.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/text.php	(revision 1371)
@@ -31,7 +31,7 @@
 $file = WB_PATH."/temp/.captcha_$name.php";
 
 srand((double)microtime()*100000);
-$_SESSION['captcha'] = rand(0,99999);
+$_SESSION['captcha'.$sec_id] = rand(0,99999);
 
 // get questions and answers
 $text_qa='';
@@ -90,7 +90,7 @@
 // choose random question
 $k = array_rand($qa[$lang]);
 
-$_SESSION['captcha'] = $qa[$lang][$k];
+$_SESSION['captcha'.$sec_id] = $qa[$lang][$k];
 
 echo $k;
 
Index: branches/2.8.x/wb/include/captcha/captchas/calc_text.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captchas/calc_text.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captchas/calc_text.php	(revision 1371)
@@ -34,7 +34,7 @@
 	require_once(WB_PATH.'/modules/captcha_control/languages/'.LANGUAGE .'.php');
 }
 
-$_SESSION['captcha'] = '';
+$_SESSION['captcha'.$sec_id] = '';
 mt_srand((double)microtime()*1000000);
 $n = mt_rand(1,3);
 switch ($n) {
@@ -41,21 +41,21 @@
 	case 1:
 		$x = mt_rand(1,9);
 		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x + $y;
+		$_SESSION['captcha'.$sec_id] = $x + $y;
 		$cap = "$x {$MOD_CAPTCHA['ADDITION']} $y"; 
 		break; 
 	case 2:
 		$x = mt_rand(10,20);
 		$y = mt_rand(1,9);
-		$_SESSION['captcha'] = $x - $y; 
+		$_SESSION['captcha'.$sec_id] = $x - $y; 
 		$cap = "$x {$MOD_CAPTCHA['SUBTRAKTION']} $y"; 
 		break;
 	case 3:
 		$x = mt_rand(2,10);
 		$y = mt_rand(2,5);
-		$_SESSION['captcha'] = $x * $y; 
+		$_SESSION['captcha'.$sec_id] = $x * $y; 
 		$cap = "$x {$MOD_CAPTCHA['MULTIPLIKATION']} $y"; 
 		break;
 }
 echo $cap;
-?>
+?>
\ No newline at end of file
Index: branches/2.8.x/wb/include/captcha/captcha.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captcha.php	(revision 1370)
+++ branches/2.8.x/wb/include/captcha/captcha.php	(revision 1371)
@@ -24,15 +24,19 @@
 */
 
 // displays the image or text inside an <iframe>
-function display_captcha_real($kind='image') {
-	$t = time();
-	$_SESSION['captcha_time'] = $t;
-	if($kind=='image') {
-		?><a title="reload" href="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=2'; ?>">
-		  <img style="border: none;" src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t"; ?>" alt="Captcha" />
-			</a><?php
-	} else {
-		echo 'error';
+if(!function_exists('display_captcha_real')) {
+	function display_captcha_real($kind='image') {
+		$t = time();
+		$_SESSION['captcha_time'] = $t;
+		$sec_id = '';
+		if(isset($_GET['s']) && is_numeric($_GET['s'])) $sec_id = $_GET['s'];
+		if($kind=='image') {
+			?><a title="reload" href="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=2'; ?>">
+			  <img style="border: none;" src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t&amp;s=$sec_id"; ?>" alt="Captcha" />
+				</a><?php
+		} else {
+			echo 'error';
+		}
 	}
 }
 
@@ -70,7 +74,6 @@
 		header("Expires: Mon, 1 Jan 1990 05:00:00 GMT");
 		header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
 		header("Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate");
-		header("Cache-Control: post-check=0, pre-check=0", false); // MS made there own headers :-(
 		header("Pragma: no-cache");
 		header("Content-type: image/png");
 		return;
@@ -102,7 +105,7 @@
 }
 
 if(!function_exists('call_captcha')) {
-	function call_captcha($action='all', $style='') {
+	function call_captcha($action='all', $style='', $sec_id='') {
 		global $MOD_CAPTCHA;
 		$t = time();
 		$_SESSION['captcha_time'] = $t;
@@ -156,8 +159,8 @@
 				case 'calc_ttf_image': // calculation with varying background and ttf-font
 				  ?><table class="captcha_table"><tr>
 					<td class="image_captcha">
-						<iframe class="captcha_iframe" width="<?php echo $captcha_width; ?>" height="<?php echo $captcha_height; ?>" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" name="captcha_iframe" src="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=1'; ?>">
-						<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t"; ?>" alt="Captcha" />
+						<?php echo "<iframe class=\"captcha_iframe\" width=\"$captcha_width\" height=\"$captcha_height\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" name=\"captcha_iframe_$sec_id\" src=\"". WB_URL ."/include/captcha/captcha.php?display_captcha_X986E21=1&amp;s=$sec_id"; ?>">
+						<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t&amp;s=$sec_id"; ?>" alt="Captcha" />
 						</iframe>
 					</td>
 					<td>&nbsp;=&nbsp;</td>
@@ -170,8 +173,8 @@
 				case 'old_image': // old captcha
 					?><table class="captcha_table"><tr>
 					<td class="image_captcha">
-						<iframe class="captcha_iframe" width="<?php echo $captcha_width; ?>" height="<?php echo $captcha_height; ?>" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" name="captcha_iframe" src="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=1'; ?>">
-						<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t"; ?>" alt="Captcha" />
+						<?php echo "<iframe class=\"captcha_iframe\" width=\"$captcha_width\" height=\"$captcha_height\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" name=\"captcha_iframe_$sec_id\" src=\"". WB_URL ."/include/captcha/captcha.php?display_captcha_X986E21=1&amp;s=$sec_id"; ?>">
+						<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t&amp;s=$sec_id"; ?>" alt="Captcha" />
 						</iframe>
 					</td>
 					<td></td>
@@ -192,7 +195,7 @@
 				case 'calc_ttf_image': // calculation with varying background and ttf-font
 				case 'ttf_image': // captcha with varying background and ttf-font
 				case 'old_image': // old captcha
-					echo "<img $style src=\"".WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t\" />";
+					echo "<img $style src=\"".WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t&amp;s=$sec_id\" />";
 					break;
 			}
 		} elseif($action=='image_iframe') {
@@ -209,7 +212,9 @@
 				case 'calc_ttf_image': // calculation with varying background and ttf-font
 				case 'ttf_image': // captcha with varying background and ttf-font
 				case 'old_image': // old captcha
-					?><iframe class="captcha_iframe" width="<?php echo $captcha_width; ?>" height="<?php echo $captcha_height; ?>" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" name="captcha_iframe" src="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=1'; ?>"><?php
+					?>
+					<?php echo "<iframe class=\"captcha_iframe\" width=\"$captcha_width\" height=\"$captcha_height\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" name=\"captcha_iframe_$sec_id\" src=\"". WB_URL ."/include/captcha/captcha.php?display_captcha_X986E21=1&amp;s=$sec_id"; ?>">
+					<?php
 					echo "<img $style alt=\"Captcha\" src=\"".WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t\" />";
 					?></iframe><?php
 					break;
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1370)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1371)
@@ -51,7 +51,7 @@
 }
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
-if(!defined('VERSION')) define('VERSION', '2.8.2.RC3');
-if(!defined('REVISION')) define('REVISION', '1370');
+if(!defined('VERSION')) define('VERSION', '2.8.2.RC4');
+if(!defined('REVISION')) define('REVISION', '1371');
 
 ?>
\ No newline at end of file
