anti_bruteforce - Version 0.1.1

Version Notes

Fix issue with controller allow method

Download this release

Release Info

Developer Marcin Frymark
Extension anti_bruteforce
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

app/code/community/Alekseon/AntiBruteforce/Model/Observer.php CHANGED
@@ -68,7 +68,7 @@ class Alekseon_AntiBruteforce_Model_Observer
68
  ->addFieldToFilter('ip', $ip)
69
  ->getFirstItem();
70
  if($blocked->getId()){
71
- throw new Mage_Core_Exception(Mage::helper('enterprise_pci')->__('This IP is locked by Alekseon AntiBruteForce module'));
72
  }
73
  }
74
 
68
  ->addFieldToFilter('ip', $ip)
69
  ->getFirstItem();
70
  if($blocked->getId()){
71
+ throw new Mage_Core_Exception('This IP is locked by Alekseon AntiBruteForce module');
72
  }
73
  }
74
 
app/code/community/Alekseon/AntiBruteforce/controllers/Adminhtml/AntiBruteforce/BlockedController.php CHANGED
@@ -10,7 +10,7 @@ class Alekseon_AntiBruteforce_Adminhtml_AntiBruteforce_BlockedController extends
10
 
11
  protected function _isAllowed()
12
  {
13
- return Mage::getSingleton('admin/session')->isAllowed('system/alekseon_tools/sent_emails_history');
14
  }
15
 
16
  public function indexAction()
@@ -34,7 +34,7 @@ class Alekseon_AntiBruteforce_Adminhtml_AntiBruteforce_BlockedController extends
34
  {
35
  $blockedIds = $this->getRequest()->getParam('blocked_id'); // $this->getMassactionBlock()->setFormFieldName('tax_id'); from Mage_Adminhtml_Block_Tax_Rate_Grid
36
  if(!is_array($blockedIds)) {
37
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('tax')->__('Please select ip(s).'));
38
  } else {
39
  try {
40
  $blockedModel = Mage::getModel('alekseon_antibruteforce/blocked');
10
 
11
  protected function _isAllowed()
12
  {
13
+ return Mage::getSingleton('admin/session')->isAllowed('system/alekseon_tools/anti_bruteforce');
14
  }
15
 
16
  public function indexAction()
34
  {
35
  $blockedIds = $this->getRequest()->getParam('blocked_id'); // $this->getMassactionBlock()->setFormFieldName('tax_id'); from Mage_Adminhtml_Block_Tax_Rate_Grid
36
  if(!is_array($blockedIds)) {
37
+ Mage::getSingleton('adminhtml/session')->addError('Please select ip(s).');
38
  } else {
39
  try {
40
  $blockedModel = Mage::getModel('alekseon_antibruteforce/blocked');
app/code/community/Alekseon/AntiBruteforce/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Alekseon_AntiBruteforce>
13
- <version>0.1.0</version>
14
  </Alekseon_AntiBruteforce>
15
  </modules>
16
  <global>
10
  <config>
11
  <modules>
12
  <Alekseon_AntiBruteforce>
13
+ <version>0.1.1</version>
14
  </Alekseon_AntiBruteforce>
15
  </modules>
16
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>anti_bruteforce</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,11 +12,11 @@
12
  It's possible to setup how many attemps and for how long time is allowed before this ip is added to blacklist.&#xD;
13
  &#xD;
14
  It also gives possibility to create whitelist and manage blocked ips.</description>
15
- <notes>Monitor admin login failure and block admin for IP</notes>
16
  <authors><author><name>Lukasz Linczewski</name><user>alekseon</user><email>contact@alekseon.com</email></author></authors>
17
- <date>2016-05-06</date>
18
- <time>14:45:49</time>
19
- <contents><target name="magecommunity"><dir name="Alekseon"><dir name="AntiBruteforce"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Blocked"><file name="Grid.php" hash="8330f294a14a53e30d546629ecef10b5"/></dir><file name="Blocked.php" hash="f97930b24e479fd21d0966599ce9da87"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Ip.php" hash="9d7984f2a8b05fc47cbd2cdd7d87ace8"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="048642a2eb4729c81c2890f1d53858cb"/></dir><dir name="Model"><file name="Attemp.php" hash="59a0cb085f0cf4b06bf42b926cac6b05"/><file name="Blocked.php" hash="aade6868cec4fda97aa054cd3f918a07"/><file name="Observer.php" hash="0bcb61027292333f5a7f28f32361165c"/><dir name="Resource"><dir name="Attemp"><file name="Collection.php" hash="d2dba80ea636bd454033c1a55db24fe1"/></dir><file name="Attemp.php" hash="b3137208977b97231707fb354bb88547"/><dir name="Blocked"><file name="Collection.php" hash="9101390149fe7c0efc5146e10f3761bd"/></dir><file name="Blocked.php" hash="d5eeb0b6b69ffad41bf220cd4b5bf5ee"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="AntiBruteforce"><file name="BlockedController.php" hash="8a20edf2a6695ab91cf9c3c1918192b7"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c857f30f4e073c5ac26ec99e852df020"/><file name="config.xml" hash="4882cfce945d4f8f1ad0caf9572077b6"/><file name="system.xml" hash="36aa1d5d5a7bb5cd93d4ebba42f718ef"/></dir><dir name="sql"><dir name="alekseon_antibruteforce_setup"><file name="install-0.1.0.php" hash="4e2b808e92cf1088adbd68f131832a53"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Alekseon_AntiBruteforce.xml" hash="d8b8434d6b49bd47bff37cb80c4fbc81"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="alekseon"><file name="antiBruteforce.xml" hash="3c6951cdc49fe2c90d9fb9a66eb17cac"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>anti_bruteforce</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
12
  It's possible to setup how many attemps and for how long time is allowed before this ip is added to blacklist.&#xD;
13
  &#xD;
14
  It also gives possibility to create whitelist and manage blocked ips.</description>
15
+ <notes>Fix issue with controller allow method</notes>
16
  <authors><author><name>Lukasz Linczewski</name><user>alekseon</user><email>contact@alekseon.com</email></author></authors>
17
+ <date>2016-05-12</date>
18
+ <time>14:34:36</time>
19
+ <contents><target name="magecommunity"><dir name="Alekseon"><dir name="AntiBruteforce"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Blocked"><file name="Grid.php" hash="8330f294a14a53e30d546629ecef10b5"/></dir><file name="Blocked.php" hash="f97930b24e479fd21d0966599ce9da87"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Ip.php" hash="9d7984f2a8b05fc47cbd2cdd7d87ace8"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="048642a2eb4729c81c2890f1d53858cb"/></dir><dir name="Model"><file name="Attemp.php" hash="59a0cb085f0cf4b06bf42b926cac6b05"/><file name="Blocked.php" hash="aade6868cec4fda97aa054cd3f918a07"/><file name="Observer.php" hash="495709735299b59fcae6744aaa4be7a0"/><dir name="Resource"><dir name="Attemp"><file name="Collection.php" hash="d2dba80ea636bd454033c1a55db24fe1"/></dir><file name="Attemp.php" hash="b3137208977b97231707fb354bb88547"/><dir name="Blocked"><file name="Collection.php" hash="9101390149fe7c0efc5146e10f3761bd"/></dir><file name="Blocked.php" hash="d5eeb0b6b69ffad41bf220cd4b5bf5ee"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="AntiBruteforce"><file name="BlockedController.php" hash="8d98278f3eb04cffdc9e4f6263b6d9b5"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c857f30f4e073c5ac26ec99e852df020"/><file name="config.xml" hash="2cf633665e7f8424534ed79ebeeeec7a"/><file name="system.xml" hash="36aa1d5d5a7bb5cd93d4ebba42f718ef"/></dir><dir name="sql"><dir name="alekseon_antibruteforce_setup"><file name="install-0.1.0.php" hash="4e2b808e92cf1088adbd68f131832a53"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Alekseon_AntiBruteforce.xml" hash="d8b8434d6b49bd47bff37cb80c4fbc81"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="alekseon"><file name="antiBruteforce.xml" hash="3c6951cdc49fe2c90d9fb9a66eb17cac"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>