This repository was archived by the owner on Jun 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Expand file tree Collapse file tree 3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [push, pull_request]
3+
4+ jobs :
5+ run :
6+ runs-on : ${{ matrix.os }}
7+
8+ strategy :
9+ matrix :
10+ os : [ubuntu-latest]
11+ php : ['7.3', '7.4', '8.0']
12+
13+ name : PHP ${{ matrix.php }} Test on ${{ matrix.os }}
14+
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v2
18+
19+ - name : Setup PHP
20+ uses : shivammathur/setup-php@v2
21+ with :
22+ php-version : ${{matrix.php}}
23+
24+ - name : Install dependencies
25+ uses : php-actions/composer@v5
26+ with :
27+ args : --prefer-source --no-interaction
28+
29+ - name : Run composer test script
30+ uses : php-actions/composer@v5
31+ with :
32+ command : test
Original file line number Diff line number Diff line change 5151 /**
5252 *
5353 * IP addresses for which validation will be skipped
54+ * IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
5455 *
5556 */
56- 'skip_ip ' => [] ,
57+ 'skip_ip ' => env ( ' RECAPTCHA_SKIP_IP ' , []) ,
5758
5859 /**
5960 *
Original file line number Diff line number Diff line change 1212namespace Biscolab \ReCaptcha ;
1313
1414use Illuminate \Support \Arr ;
15+ use Symfony \Component \HttpFoundation \IpUtils ;
1516
1617/**
1718 * Class ReCaptchaBuilder
@@ -247,8 +248,7 @@ public function getIpWhitelist()
247248 */
248249 public function skipByIp (): bool
249250 {
250-
251- return (in_array (request ()->ip (), $ this ->getIpWhitelist ()));
251+ return IpUtils::checkIp (request ()->ip (), $ this ->getIpWhitelist ());
252252 }
253253
254254 /**
You can’t perform that action at this time.
0 commit comments