mirror of
				https://github.com/Mibew/tray.git
				synced 2025-10-03 00:03:34 +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');
 | 
					require_once('libs/captcha.php');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$captchaCode = gen_captcha();
 | 
					$captchaCode = gen_captcha();
 | 
				
			||||||
$_SESSION["captcha"] = $captchaCode;
 | 
					$_SESSION["mibew_captcha"] = $captchaCode;
 | 
				
			||||||
draw_captcha($captchaCode);
 | 
					draw_captcha($captchaCode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit;
 | 
					exit;
 | 
				
			||||||
 | 
				
			|||||||
@ -83,11 +83,11 @@ if( !$email ) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if($settings["enablecaptcha"] == "1" && can_show_captcha()) {
 | 
					if($settings["enablecaptcha"] == "1" && can_show_captcha()) {
 | 
				
			||||||
	$captcha = getparam('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) {
 | 
						if(empty($original) || empty($captcha) || $captcha != $original) {
 | 
				
			||||||
	  $errors[] = getlocal('errors.captcha');
 | 
						  $errors[] = getlocal('errors.captcha');
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	unset($_SESSION['captcha']);
 | 
						unset($_SESSION['mibew_captcha']);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if( count($errors) > 0 ) {
 | 
					if( count($errors) > 0 ) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user