Skip to content

Commit 1f22ced

Browse files
Added configuration for captcha failed_attempts_ip in backend (OpenMage#1074)
Co-authored-by: Fabrizio Balliano <[email protected]>
1 parent 4da40b1 commit 1f22ced

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

app/code/core/Mage/Captcha/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
<mode>after_fail</mode>
198198
<forms>backend_forgotpassword</forms>
199199
<failed_attempts_login>3</failed_attempts_login>
200-
<failed_attempts_ip>1000</failed_attempts_ip>
200+
<failed_attempts_ip>10</failed_attempts_ip>
201201
<timeout>7</timeout>
202202
<length>4-5</length>
203203
<symbols>ABCDEFGHJKMnpqrstuvwxyz23456789</symbols>

app/code/core/Mage/Captcha/etc/system.xml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,22 @@
7777
</depends>
7878
<frontend_class>required-entry validate-digits</frontend_class>
7979
</failed_attempts_login>
80+
<failed_attempts_ip translate="label">
81+
<label>Number of Unsuccessful Attempts to Login per IP Address</label>
82+
<frontend_type>text</frontend_type>
83+
<sort_order>6</sort_order>
84+
<show_in_default>1</show_in_default>
85+
<show_in_website>0</show_in_website>
86+
<show_in_store>0</show_in_store>
87+
<depends>
88+
<mode>after_fail</mode>
89+
<enable>1</enable>
90+
</depends>
91+
<frontend_class>required-entry validate-digits</frontend_class>
92+
</failed_attempts_ip>
8093
<timeout translate="label">
8194
<label>CAPTCHA Timeout (minutes)</label>
82-
<sort_order>6</sort_order>
95+
<sort_order>7</sort_order>
8396
<show_in_default>1</show_in_default>
8497
<show_in_website>0</show_in_website>
8598
<show_in_store>0</show_in_store>
@@ -89,7 +102,7 @@
89102
<length translate="label comment">
90103
<label>Number of Symbols</label>
91104
<comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment>
92-
<sort_order>7</sort_order>
105+
<sort_order>8</sort_order>
93106
<show_in_default>1</show_in_default>
94107
<show_in_website>0</show_in_website>
95108
<show_in_store>0</show_in_store>
@@ -99,7 +112,7 @@
99112
<symbols translate="label comment">
100113
<label>Symbols Used in CAPTCHA</label>
101114
<comment><![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]></comment>
102-
<sort_order>8</sort_order>
115+
<sort_order>9</sort_order>
103116
<show_in_default>1</show_in_default>
104117
<show_in_website>0</show_in_website>
105118
<show_in_store>0</show_in_store>
@@ -110,7 +123,7 @@
110123
<label>Case Sensitive</label>
111124
<frontend_type>select</frontend_type>
112125
<source_model>adminhtml/system_config_source_yesno</source_model>
113-
<sort_order>9</sort_order>
126+
<sort_order>10</sort_order>
114127
<show_in_default>1</show_in_default>
115128
<show_in_website>0</show_in_website>
116129
<show_in_store>0</show_in_store>

app/locale/en_US/Mage_Captcha.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
"Please type the letters from the image:","Please type the letters from the image:"
2020
"Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.","Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer."
2121
"Reload captcha","Reload captcha"
22-
"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA"
22+
"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA",
23+
"Number of Unsuccessful Attempts to Login per IP Address","Number of Unsuccessful Attempts to Login per IP Address"

0 commit comments

Comments
 (0)