Version Notes
stable release
Download this release
Release Info
Developer | Magento Core Team |
Extension | ET_IpSecurity |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
app/code/community/ET/ET_IpSecurity_ChangeLog.txt
CHANGED
@@ -9,6 +9,9 @@ TODO and some thoughts:
|
|
9 |
+ integrate anti spam service http://www.projecthoneypot.org/
|
10 |
|
11 |
=====================================
|
|
|
|
|
|
|
12 |
ver. 1.5.1
|
13 |
* resolved infinite loop when admin block rule happens and option "Add Store Code to Urls" = Yes and redirect to CMS page is on.
|
14 |
|
9 |
+ integrate anti spam service http://www.projecthoneypot.org/
|
10 |
|
11 |
=====================================
|
12 |
+
ver. 1.5.2
|
13 |
+
+ added ability to use IP ranges (Exampole: 10.0.0.1-20.0.0.1|IP Range)
|
14 |
+
|
15 |
ver. 1.5.1
|
16 |
* resolved infinite loop when admin block rule happens and option "Add Store Code to Urls" = Yes and redirect to CMS page is on.
|
17 |
|
app/code/community/ET/ET_IpSecurity_Description.txt
CHANGED
@@ -23,9 +23,10 @@ EN:
|
|
23 |
* HTTP response code when blocking - HTTP Error 403 - Forbidden: Access is denied
|
24 |
* Editable templates for notification letters
|
25 |
* Available languages for admin panel (en_US, ru_RU)
|
26 |
-
* You can enter IP addresses or IP masks. You can add comment to each rule.
|
27 |
127.0.0.1|My address
|
28 |
10.*.*.*|internal company IPs
|
|
|
29 |
* Editable message (is shown to visitors during maintenance operations.)
|
30 |
* List of blocked IPs is saving to database
|
31 |
* You can view log of blocking in admin panel
|
@@ -40,9 +41,10 @@ RU:
|
|
40 |
* ������ ������ �� ������������ �������� ��� ���������� - HTTP Error 403 - Forbidden: Access is denied
|
41 |
* ������������� ������� ����� ����������
|
42 |
* ��������� ����� ��� ������ ����������������� (en_US, ru_RU)
|
43 |
-
* ����� ��������� ��� IP ������, ��� � ����� �������. � ������� ������� ����� �������� �����������.
|
44 |
127.0.0.1|My address
|
45 |
10.*.*.*|internal company IPs
|
|
|
46 |
* ������������� ��������� (������������ ����������� �� ����� ����������� �����).
|
47 |
|
48 |
* ���������� � ���� ������ �� ������� �� ������� ��������� ����������
|
23 |
* HTTP response code when blocking - HTTP Error 403 - Forbidden: Access is denied
|
24 |
* Editable templates for notification letters
|
25 |
* Available languages for admin panel (en_US, ru_RU)
|
26 |
+
* You can enter IP addresses or IP masks or IP ranges. You can add comment to each rule.
|
27 |
127.0.0.1|My address
|
28 |
10.*.*.*|internal company IPs
|
29 |
+
10.0.0.1-20.0.0.1|IP Ranges
|
30 |
* Editable message (is shown to visitors during maintenance operations.)
|
31 |
* List of blocked IPs is saving to database
|
32 |
* You can view log of blocking in admin panel
|
41 |
* ������ ������ �� ������������ �������� ��� ���������� - HTTP Error 403 - Forbidden: Access is denied
|
42 |
* ������������� ������� ����� ����������
|
43 |
* ��������� ����� ��� ������ ����������������� (en_US, ru_RU)
|
44 |
+
* ����� ��������� ��� IP ������, ��� � ����� ������� � ��������� IP �������. � ������� ������� ����� �������� �����������.
|
45 |
127.0.0.1|My address
|
46 |
10.*.*.*|internal company IPs
|
47 |
+
10.0.0.1-20.0.0.1|IP Ranges
|
48 |
* ������������� ��������� (������������ ����������� �� ����� ����������� �����).
|
49 |
|
50 |
* ���������� � ���� ������ �� ������� �� ������� ��������� ����������
|
app/code/community/ET/IpSecurity/Model/Observer.php
CHANGED
@@ -187,6 +187,12 @@ class ET_IpSecurity_Model_Observer
|
|
187 |
return $this;
|
188 |
}
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
private function find_ip($search_ip,$array)
|
191 |
{
|
192 |
$found = false;
|
@@ -196,7 +202,27 @@ class ET_IpSecurity_Model_Observer
|
|
196 |
{
|
197 |
$ip=explode("|",$iptxt);
|
198 |
$ip=trim($ip[0]);
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
{
|
201 |
$found = true;
|
202 |
$this->last_found_ip=$iptxt;
|
187 |
return $this;
|
188 |
}
|
189 |
|
190 |
+
|
191 |
+
private function _findByRange($allIp)
|
192 |
+
{
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
private function find_ip($search_ip,$array)
|
197 |
{
|
198 |
$found = false;
|
202 |
{
|
203 |
$ip=explode("|",$iptxt);
|
204 |
$ip=trim($ip[0]);
|
205 |
+
$ipRange=explode("-",$ip);
|
206 |
+
//range
|
207 |
+
|
208 |
+
if(count($ipRange)==2)
|
209 |
+
{
|
210 |
+
|
211 |
+
$ipFrom=explode(".",trim($ipRange[0]));
|
212 |
+
$ipFrom=sprintf("%03d%03d%03d%03d",$ipFrom[0],$ipFrom[1],$ipFrom[2],$ipFrom[3]);
|
213 |
+
$ipTo=explode(".",trim($ipRange[1]));
|
214 |
+
$ipTo=sprintf("%03d%03d%03d%03d",$ipTo[0],$ipTo[1],$ipTo[2],$ipTo[3]);
|
215 |
+
$ipCurrent=explode(".",$search_ip);
|
216 |
+
$ipCurrent=sprintf("%03d%03d%03d%03d",$ipCurrent[0],$ipCurrent[1],$ipCurrent[2],$ipCurrent[3]);
|
217 |
+
if((strcmp($ipFrom,$ipCurrent)<=0)&(strcmp($ipCurrent,$ipTo)<=0)){
|
218 |
+
$found = true;
|
219 |
+
$this->last_found_ip=$iptxt;
|
220 |
+
return $found;
|
221 |
+
}
|
222 |
+
|
223 |
+
}
|
224 |
+
//simple
|
225 |
+
else if(preg_match('/^'.str_replace(array('\*','\?'), array('(.*?)','[0-9]'), preg_quote($ip)).'$/',$search_ip))
|
226 |
{
|
227 |
$found = true;
|
228 |
$this->last_found_ip=$iptxt;
|
app/code/community/ET/IpSecurity/etc/config.xml
CHANGED
@@ -23,16 +23,16 @@
|
|
23 |
<config>
|
24 |
<modules>
|
25 |
<ET_IpSecurity>
|
26 |
-
<version>1.5.
|
27 |
<descr>
|
28 |
<ru_RU><![CDATA[
|
29 |
-
Модуль позволяет ограничивать доступ к сайту посетителям по IP или
|
30 |
При срабатывании правила перенаправляет посетителя на указанную CMS страницу или просто на пустую страницу. Также может оповестить владельца сайта о сработавшем правиле по е-майл.
|
31 |
|
32 |
Доступна функция отключения сайта на техническое обслуживание.]]>
|
33 |
</ru_RU>
|
34 |
<en_US><![CDATA[
|
35 |
-
Extension allows to restrict access to website for visitors by IP or IP
|
36 |
When blocking rule is applied user is redirected to selected CMS page or blank page. Also extension can notify website owner about blocked visitor by email.
|
37 |
|
38 |
Second function: Allows to turn off frontend during maintenance operations.]]>
|
23 |
<config>
|
24 |
<modules>
|
25 |
<ET_IpSecurity>
|
26 |
+
<version>1.5.2</version>
|
27 |
<descr>
|
28 |
<ru_RU><![CDATA[
|
29 |
+
Модуль позволяет ограничивать доступ к сайту посетителям по IP, IP маскам или диапозону IP.
|
30 |
При срабатывании правила перенаправляет посетителя на указанную CMS страницу или просто на пустую страницу. Также может оповестить владельца сайта о сработавшем правиле по е-майл.
|
31 |
|
32 |
Доступна функция отключения сайта на техническое обслуживание.]]>
|
33 |
</ru_RU>
|
34 |
<en_US><![CDATA[
|
35 |
+
Extension allows to restrict access to website for visitors by IP, IP mask or IP range.
|
36 |
When blocking rule is applied user is redirected to selected CMS page or blank page. Also extension can notify website owner about blocked visitor by email.
|
37 |
|
38 |
Second function: Allows to turn off frontend during maintenance operations.]]>
|
package.xml
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ET_IpSecurity</name>
|
4 |
-
<version>1.5.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">AFL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Extension allows to restrict access to website for visitors by IP or IP
|
10 |
-
<description>Extension allows to restrict access to website for visitors by IP or IP
|
11 |
When blocking rule is applied user is redirected to selected CMS page or blank page. Also extension can notify website owner about blocked visitor by email.
|
12 |
|
13 |
Second function: Allows to turn off frontend during maintenance operations.</description>
|
14 |
<notes>stable release</notes>
|
15 |
<authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
|
16 |
-
<date>2011-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="et_ipsecurity.xml" hash="3e677b0e6fffcfb90d1d03dd7bc8daa8"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="et_ipsecurity.html" hash="2b67f7f1bc21e003da6246fe76462af4"/><file name="et_ipsecurity_admin.html" hash="2b67f7f1bc21e003da6246fe76462af4"/></dir></dir><file name="ET_IpSecurity.csv" hash="26e22ba736a937422cfc1755670e71a8"/></dir><dir name="ru_RU"><dir name="template"><dir name="email"><file name="et_ipsecurity.html" hash="a6f731a6903375bfc06edc6a31d67865"/><file name="et_ipsecurity_admin.html" hash="5961f9ae7d71f843d96d70c18c223222"/></dir></dir><file name="ET_IpSecurity.csv" hash="7f1e9f9b92e96f45fc45b13d0ca4e5e6"/></dir></target><target name="magecommunity"><dir name="ET"><dir name="IpSecurity"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="baef872daeaa6a195b4bab090244b16f"/></dir><file name="Log.php" hash="17f11639de5af08019be9577fd01e733"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="LogController.php" hash="cfc12c6a05fcb0486bb9f3b4c2eae4d0"/></dir></dir><dir name="etc"><file name="config.xml" hash="
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ET_IpSecurity</name>
|
4 |
+
<version>1.5.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">AFL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Extension allows to restrict access to website for visitors by IP, IP mask or IP range. Also allows to turn off frontend during maintenance operations.</summary>
|
10 |
+
<description>Extension allows to restrict access to website for visitors by IP, IP mask or IP range.
|
11 |
When blocking rule is applied user is redirected to selected CMS page or blank page. Also extension can notify website owner about blocked visitor by email.
|
12 |
|
13 |
Second function: Allows to turn off frontend during maintenance operations.</description>
|
14 |
<notes>stable release</notes>
|
15 |
<authors><author><name>Jurij</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author><author><name>Andrej</name><user>auto-converted</user><email>support@etwebsolutions.com</email></author></authors>
|
16 |
+
<date>2011-05-09</date>
|
17 |
+
<time>09:21:32</time>
|
18 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="et_ipsecurity.xml" hash="3e677b0e6fffcfb90d1d03dd7bc8daa8"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="et_ipsecurity.html" hash="2b67f7f1bc21e003da6246fe76462af4"/><file name="et_ipsecurity_admin.html" hash="2b67f7f1bc21e003da6246fe76462af4"/></dir></dir><file name="ET_IpSecurity.csv" hash="26e22ba736a937422cfc1755670e71a8"/></dir><dir name="ru_RU"><dir name="template"><dir name="email"><file name="et_ipsecurity.html" hash="a6f731a6903375bfc06edc6a31d67865"/><file name="et_ipsecurity_admin.html" hash="5961f9ae7d71f843d96d70c18c223222"/></dir></dir><file name="ET_IpSecurity.csv" hash="7f1e9f9b92e96f45fc45b13d0ca4e5e6"/></dir></target><target name="magecommunity"><dir name="ET"><dir name="IpSecurity"><dir name="Block"><dir name="Adminhtml"><dir name="Log"><file name="Grid.php" hash="baef872daeaa6a195b4bab090244b16f"/></dir><file name="Log.php" hash="17f11639de5af08019be9577fd01e733"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="LogController.php" hash="cfc12c6a05fcb0486bb9f3b4c2eae4d0"/></dir></dir><dir name="etc"><file name="config.xml" hash="84c7ca168484411ca88329a2b075f852"/><file name="system.xml" hash="462b9b4d2e802a63cdeaca5448b6bc47"/></dir><dir name="Helper"><file name="Data.php" hash="08c557cd26157c317c1049d5f1366eab"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Ipsecuritylog"><file name="Collection.php" hash="929fd786020e26b87f900caf0f2996f1"/></dir><file name="Ipsecuritylog.php" hash="4ec2037e5a52eaa4278ddd7ad2929dfc"/></dir><file name="Ipsecuritylog.php" hash="bb8a6ad3b612c46ef8b2fa36d2fac709"/><file name="Observer.php" hash="65eaa4ad5dfbc4a81887001615e4515f"/></dir><dir name="sql"><dir name="ipsecurity_setup"><file name="mysql4-install-1.5.php" hash="c2524c78dbb7db294d53983ca588c5bb"/></dir></dir></dir><file name="ET_IpSecurity_ChangeLog.txt" hash="b341c675026b64e6e43ac904eb8724d8"/><file name="ET_IpSecurity_Description.txt" hash="895d87a17203bb0c113efdbb83af0666"/><file name="ET_IpSecurity_LICENSE.txt" hash="b799504264c23c11a941473d7a3e3ab7"/></dir></target><target name="mageetc"><dir name="modules"><file name="ET_IpSecurity.xml" hash="d191fe14ed772c4515519e1445af2229"/></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|