Skip to content

Commit 68a0f4d

Browse files
authored
Merge pull request #10 from dwisiswant0/master
Bug fixes for v1.0.2-dev1
2 parents d688bc7 + abcac77 commit 68a0f4d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All notable changes to `AntiScanScanClub` will be documented in this file.
44

5-
## Version 1.0.2-dev
5+
## Version 1.0.2-dev1
6+
7+
### Fixed
8+
9+
- Fix filterFile() bug cause matching through strpos isn't efficient
10+
11+
## Version 1.0.2
612

713
### Added
814

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@ license. Please see the [LICENSE file](LICENSE) for more information.
202202
203203
## Version
204204
205-
**Current version is 1.0.2** and still development.
205+
**Current version is 1.0.2-dev1** and still development.

src/AntiScanScanClub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function filterFile($url = NULL, $blocker = FALSE, $clientIp) {
143143

144144
foreach ($objectFiles as $key => $value) {
145145
$file = trim($value);
146-
if (strpos($url, trim($file)) !== FALSE) {
146+
if (substr($url, 1) === trim($file)) {
147147
if ($blocker === TRUE) $this->addToBlacklisted($clientIp, "Trying to access " . $file);
148148
return abort($this->abort);
149149
}

0 commit comments

Comments
 (0)