mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 02:26:00 +03:00 
			
		
		
		
	fix captcha
This commit is contained in:
		
							parent
							
								
									f54466f4ca
								
							
						
					
					
						commit
						bfbc90aa8f
					
				| @ -23,7 +23,7 @@ require_once('libs/common.php'); | ||||
| require_once('libs/captcha.php'); | ||||
| 
 | ||||
| $captchaCode = gen_captcha(); | ||||
| $_SESSION["captcha"] = $captchaCode; | ||||
| $_SESSION["mibew_captcha"] = $captchaCode; | ||||
| draw_captcha($captchaCode); | ||||
| 
 | ||||
| exit; | ||||
|  | ||||
| @ -83,11 +83,11 @@ if( !$email ) { | ||||
| 
 | ||||
| if($settings["enablecaptcha"] == "1" && can_show_captcha()) { | ||||
| 	$captcha = getparam('captcha'); | ||||
| 	$original = isset($_SESSION['captcha']) ? $_SESSION['captcha'] : ""; | ||||
| 	$original = isset($_SESSION["mibew_captcha"]) ? $_SESSION["mibew_captcha"] : ""; | ||||
| 	if(empty($original) || empty($captcha) || $captcha != $original) { | ||||
| 	  $errors[] = getlocal('errors.captcha'); | ||||
| 	} | ||||
| 	unset($_SESSION['captcha']); | ||||
| 	unset($_SESSION['mibew_captcha']); | ||||
| } | ||||
| 
 | ||||
| if( count($errors) > 0 ) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user