Merge pull request #264 from green-ponies/master
Fix for Issue 263 - Reversed ReCaptcha keys
This commit is contained in:
		
						commit
						f30e34861d
					
				| @ -445,9 +445,9 @@ function captcha_get_html() { | |||||||
| 
 | 
 | ||||||
| 	$captcha = ""; | 	$captcha = ""; | ||||||
| 	if($user->is_anonymous() && $config->get_bool("comment_captcha")) { | 	if($user->is_anonymous() && $config->get_bool("comment_captcha")) { | ||||||
| 		$rpk = $config->get_string("api_recaptcha_privkey"); | 		$r_publickey = $config->get_string("api_recaptcha_pubkey"); | ||||||
| 		if(!empty($rpk)) { | 		if(!empty($r_publickey)) { | ||||||
| 			$captcha = recaptcha_get_html($rpk); | 			$captcha = recaptcha_get_html($r_publickey); | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
| 			session_start(); | 			session_start(); | ||||||
| @ -466,10 +466,10 @@ function captcha_check() { | |||||||
| 	if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return true; | 	if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return true; | ||||||
| 
 | 
 | ||||||
| 	if($user->is_anonymous() && $config->get_bool("comment_captcha")) { | 	if($user->is_anonymous() && $config->get_bool("comment_captcha")) { | ||||||
| 		$rpk = $config->get_string('api_recaptcha_pubkey'); | 		$r_privatekey = $config->get_string('api_recaptcha_privkey'); | ||||||
| 		if(!empty($rpk)) { | 		if(!empty($r_privatekey)) { | ||||||
| 			$resp = recaptcha_check_answer( | 			$resp = recaptcha_check_answer( | ||||||
| 				$rpk, | 				$r_privatekey, | ||||||
| 				$_SERVER["REMOTE_ADDR"], | 				$_SERVER["REMOTE_ADDR"], | ||||||
| 				$_POST["recaptcha_challenge_field"], | 				$_POST["recaptcha_challenge_field"], | ||||||
| 				$_POST["recaptcha_response_field"] | 				$_POST["recaptcha_response_field"] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user