File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ language: php
3
3
sudo : false
4
4
5
5
php :
6
- - 5.3
7
- - 5.4
8
- - 5.5
9
- - 5.6
6
+ - ' 5.5 '
7
+ - ' 5.6 '
8
+ - ' 7.0 '
9
+ - ' 7.1 '
10
10
- hhvm
11
+ - nightly
11
12
12
13
before_script :
13
14
- composer install
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ $recaptcha = new \ReCaptcha\ReCaptcha($secret);
83
83
$resp = $recaptcha->verify($gRecaptchaResponse, $remoteIp);
84
84
if ($resp->isSuccess()) {
85
85
// verified!
86
+ // if Domain Name Validation turned off don't forget to check hostname field
87
+ // if($resp->getHostName() === $_SERVER['SERVER_NAME']) { }
86
88
} else {
87
89
$errors = $resp->getErrorCodes();
88
90
}
Original file line number Diff line number Diff line change 10
10
"source" : " https://github.com/google/recaptcha"
11
11
},
12
12
"require" : {
13
- "php" : " >=5.3.2 "
13
+ "php" : " >=5.5 "
14
14
},
15
15
"require-dev" : {
16
- "phpunit/phpunit" : " 4.5.* "
16
+ "phpunit/phpunit" : " ^4.8 "
17
17
},
18
18
"autoload" : {
19
19
"psr-4" : {
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ public function testIsSuccess()
62
62
63
63
$ response = new Response (false );
64
64
$ this ->assertFalse ($ response ->isSuccess ());
65
+
66
+ $ response = new Response (true , array (), 'example.com ' );
67
+ $ this ->assertEquals ('example.com ' , $ response ->getHostName ());
65
68
}
66
69
67
70
public function testGetErrorCodes ()
You can’t perform that action at this time.
0 commit comments