Limit Login Attempts - Version 1.3

Version Description

Download this release

Release Info

Developer johanee
Plugin Icon wp plugin Limit Login Attempts
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

limit-login-attempts-de_DE.mo ADDED
Binary file
limit-login-attempts-de_DE.po ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Limit Login Attempts German Translation
2
+ # Copyright (C) 2009 Johan Eenfeldt
3
+ # This file is distributed under the same license as the Wordpress package.
4
+ # Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>, 2009.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: limit-login-attempts 1.3\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/limit-login-attempts\n"
10
+ "POT-Creation-Date: 2009-01-28 17:17+0000\n"
11
+ "PO-Revision-Date: 2009-01-28 18:27+0100\n"
12
+ "Last-Translator: Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>\n"
13
+ "Language-Team: German <michael@skerwiderski.de>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-Language: German\n"
19
+ "X-Poedit-Country: GERMANY\n"
20
+
21
+ #: limit-login-attempts.php:372
22
+ #, php-format
23
+ msgid "%d hour"
24
+ msgid_plural "%d hours"
25
+ msgstr[0] "%d Stunde"
26
+ msgstr[1] "%d Stunden"
27
+
28
+ #: limit-login-attempts.php:378
29
+ #, php-format
30
+ msgid "%d minute"
31
+ msgid_plural "%d minutes"
32
+ msgstr[0] "%d Minute"
33
+ msgstr[1] "%d Minuten"
34
+
35
+ #: limit-login-attempts.php:381
36
+ #, php-format
37
+ msgid "[%s] Too many failed login attempts"
38
+ msgstr "[%s] Zu viele ungültige Anmeldeversuche"
39
+
40
+ #: limit-login-attempts.php:383
41
+ #, php-format
42
+ msgid "%d failed login attempts (%d lockout(s)) from IP: %s"
43
+ msgstr "%d ungültige Anmeldeversuche (%d Sperrung(en)) von IP: %s"
44
+
45
+ #: limit-login-attempts.php:387
46
+ #, php-format
47
+ msgid "Last user attempted: %s"
48
+ msgstr "Letzter Anmeldeversuch erfolgte mit dem Benutzernamen: %s"
49
+
50
+ #: limit-login-attempts.php:390
51
+ #, php-format
52
+ msgid "IP was blocked for %s"
53
+ msgstr "IP wurde gesperrt für %s."
54
+
55
+ #: limit-login-attempts.php:445
56
+ msgid "<strong>ERROR</strong>: Too many failed login attempts."
57
+ msgstr "<strong>FEHLER</strong>: Zuviele ung&uuml;ltige Anmeldeversuche."
58
+
59
+ #: limit-login-attempts.php:449
60
+ msgid "Please try again later."
61
+ msgstr "Bitte versuchen Sie es sp&auml;ter noch einmal."
62
+
63
+ #: limit-login-attempts.php:456
64
+ #, php-format
65
+ msgid "Please try again in %d hour."
66
+ msgid_plural "Please try again in %d hours."
67
+ msgstr[0] "Bitte versuchen Sie es in %d Stunde noch einmal."
68
+ msgstr[1] "Bitte versuchen Sie es in %d Stunden noch einmal."
69
+
70
+ #: limit-login-attempts.php:458
71
+ #, php-format
72
+ msgid "Please try again in %d minute."
73
+ msgid_plural "Please try again in %d minutes."
74
+ msgstr[0] "Bitte versuchen Sie es in %d Minute noch einmal."
75
+ msgstr[1] "Bitte versuchen Sie es in %d Minuten noch einmal."
76
+
77
+ #: limit-login-attempts.php:487
78
+ #, php-format
79
+ msgid "<strong>%d</strong> attempt remaining."
80
+ msgid_plural "<strong>%d</strong> attempts remaining."
81
+ msgstr[0] "Es ist noch <strong>%d</strong> Anmeldeversuch m&ouml;glich."
82
+ msgstr[1] "Es sind noch <strong>%d</strong> Anmeldeversuche m&ouml;glich."
83
+
84
+ #: limit-login-attempts.php:551
85
+ msgid "<strong>ERROR</strong>: Incorrect username or password."
86
+ msgstr "<strong>FEHLER</strong>: Ung&uuml;ltiger Benutzername oder Passwort."
87
+
88
+ #: limit-login-attempts.php:714
89
+ msgid "IP|Internet address"
90
+ msgstr "IP"
91
+
92
+ #: limit-login-attempts.php:714
93
+ msgid "Tried to log in as"
94
+ msgstr "Anmeldeversuch als"
95
+
96
+ #: limit-login-attempts.php:719
97
+ #, php-format
98
+ msgid "%d lockout"
99
+ msgid_plural "%d lockouts"
100
+ msgstr[0] "%d Sperrung"
101
+ msgstr[1] "%d Sperrungen"
102
+
103
+ #: limit-login-attempts.php:743
104
+ msgid "Cleared IP log"
105
+ msgstr "Protokoll wurde gel&ouml;scht"
106
+
107
+ #: limit-login-attempts.php:751
108
+ msgid "Reset lockout count"
109
+ msgstr "Anzahl Sperrungen zur&uuml;cksetzen"
110
+
111
+ #: limit-login-attempts.php:759
112
+ msgid "Cleared current lockouts"
113
+ msgstr "Sperrungen wurden deaktiviert"
114
+
115
+ #: limit-login-attempts.php:788
116
+ msgid "Options changed"
117
+ msgstr "Einstellungen wurden ge&auml;ndert"
118
+
119
+ #: limit-login-attempts.php:799
120
+ msgid "<strong>NOTE:</strong> Only works in Wordpress 2.7 or later"
121
+ msgstr "<strong>Hinweis:</strong> Erst ab Wordpress 2.7 verwendbar"
122
+
123
+ #: limit-login-attempts.php:815
124
+ #, php-format
125
+ msgid "It appears the site is reached directly (from your IP: %s)"
126
+ msgstr "Der Zugriff auf diese Webseite erfolgt auf direktem Weg (von Ihrer IP: %s)"
127
+
128
+ #: limit-login-attempts.php:817
129
+ #, php-format
130
+ msgid "It appears the site is reached through a proxy server (proxy IP: %s, your IP: %s)"
131
+ msgstr "Der Zugriff auf diese Webseite erfolgt über einen Proxy Server (IP des Proxy Servers: %s, Ihre IP: %s)"
132
+
133
+ #: limit-login-attempts.php:825
134
+ #, php-format
135
+ msgid "<strong>Current setting appears to be invalid</strong>. Please make sure it is correct. Further information can be found <a href=\"%s\" title=\"FAQ\">here</a>"
136
+ msgstr "<strong>Die aktuellen Einstellungen sind u.U. nicht korrekt, bzw. nicht konsistent</strong>. Weitere Infos zu den Einstellungen finden Sie <a href=\"%s\" title=\"FAQ\">hier</a>"
137
+
138
+ #: limit-login-attempts.php:833
139
+ msgid "Limit Login Attempts Settings"
140
+ msgstr "Limit Login Attempts Einstellungen"
141
+
142
+ #: limit-login-attempts.php:834
143
+ msgid "Statistics"
144
+ msgstr "Statistik"
145
+
146
+ #: limit-login-attempts.php:838
147
+ msgid "Total lockouts"
148
+ msgstr "Bisher vorgenommene Sperrungen"
149
+
150
+ #: limit-login-attempts.php:841
151
+ msgid "Reset Counter"
152
+ msgstr "Z&auml;hler zur&uuml;cksetzen"
153
+
154
+ #: limit-login-attempts.php:842
155
+ #, php-format
156
+ msgid "%d lockout since last reset"
157
+ msgid_plural "%d lockouts since last reset"
158
+ msgstr[0] "%d Sperrung seit letztem Zur&uuml;cksetzen"
159
+ msgstr[1] "%d Sperrungen seit letztem Zur&uuml;cksetzen"
160
+
161
+ #: limit-login-attempts.php:843
162
+ msgid "No lockouts yet"
163
+ msgstr "Derzeit sind keine Sperrungen aktiv"
164
+
165
+ #: limit-login-attempts.php:848
166
+ msgid "Active lockouts"
167
+ msgstr "Aktive Sperrungen"
168
+
169
+ #: limit-login-attempts.php:850
170
+ msgid "Restore Lockouts"
171
+ msgstr "Sperrungen aufheben"
172
+
173
+ #: limit-login-attempts.php:851
174
+ #, php-format
175
+ msgid "%d IP is currently blocked from trying to log in"
176
+ msgstr "%d IP ist derzeit f&uuml;r Anmeldeversuche gesperrt"
177
+
178
+ #: limit-login-attempts.php:857
179
+ msgid "Options"
180
+ msgstr "Einstellungen"
181
+
182
+ #: limit-login-attempts.php:861
183
+ msgid "Lockout"
184
+ msgstr "Sperrung"
185
+
186
+ #: limit-login-attempts.php:863
187
+ msgid "allowed retries"
188
+ msgstr "erlaubte Anmeldeversuche"
189
+
190
+ #: limit-login-attempts.php:864
191
+ msgid "minutes lockout"
192
+ msgstr "Minuten Sperrung nach &Uuml;berschreiten der zul&auml;ssigen Anmeldeversuche"
193
+
194
+ #: limit-login-attempts.php:865
195
+ msgid "lockouts increase lockout time to"
196
+ msgstr "Sperrungen erh&ouml;hen die insgesamte Sperrzeit um"
197
+
198
+ #: limit-login-attempts.php:865
199
+ msgid "hours"
200
+ msgstr "Stunden"
201
+
202
+ #: limit-login-attempts.php:866
203
+ msgid "hours until retries are reset"
204
+ msgstr "Stunden bis fehlgeschlagene Anmeldeversuche zur&uuml;ckgesetzt werden"
205
+
206
+ #: limit-login-attempts.php:870
207
+ msgid "Site connection"
208
+ msgstr "Verbindungsweg zu dieser Webseite"
209
+
210
+ #: limit-login-attempts.php:876
211
+ msgid "Direct connection"
212
+ msgstr "Direkte Verbindung"
213
+
214
+ #: limit-login-attempts.php:881
215
+ msgid "From behind a reversy proxy"
216
+ msgstr "&Uuml;ber einen Reverse Proxy Server"
217
+
218
+ #: limit-login-attempts.php:887
219
+ msgid "Handle cookie login"
220
+ msgstr "Anmeldungen via Cockies ber&uuml;cksichtigen"
221
+
222
+ #: limit-login-attempts.php:889
223
+ msgid "Yes"
224
+ msgstr "Ja"
225
+
226
+ #: limit-login-attempts.php:889
227
+ msgid "No"
228
+ msgstr "Nein"
229
+
230
+ #: limit-login-attempts.php:894
231
+ msgid "Notify on lockout"
232
+ msgstr "Benachrichtigung im Falle einer Sperrung"
233
+
234
+ #: limit-login-attempts.php:896
235
+ msgid "Log IP"
236
+ msgstr "IP protokollieren"
237
+
238
+ #: limit-login-attempts.php:897
239
+ msgid "Email to admin after"
240
+ msgstr "Email an den Administrator nach"
241
+
242
+ #: limit-login-attempts.php:897
243
+ msgid "lockouts"
244
+ msgstr "Sperrungen"
245
+
246
+ #: limit-login-attempts.php:902
247
+ msgid "Change Options"
248
+ msgstr "Einstellungen speichern"
249
+
250
+ #: limit-login-attempts.php:910
251
+ msgid "Lockout log"
252
+ msgstr "Protokoll der durchgef&uuml;hrten Sperrungen"
253
+
254
+ #: limit-login-attempts.php:914
255
+ msgid "Clear Log"
256
+ msgstr "Protokoll zur&uuml;cksetzen"
257
+
258
+ #. Plugin Name of an extension
259
+ msgid "Limit Login Attempts"
260
+ msgstr "Limit Login Attempts"
261
+
262
+ #. Plugin URI of an extension
263
+ msgid "http://devel.kostdoktorn.se/limit-login-attempts"
264
+ msgstr "http://devel.kostdoktorn.se/limit-login-attempts"
265
+
266
+ #. Description of an extension
267
+ msgid "Limit rate of login attempts, including by way of cookies, for each IP."
268
+ msgstr "Limit rate of login attempts, including by way of cookies, for each IP."
269
+
270
+ #. Author of an extension
271
+ msgid "Johan Eenfeldt"
272
+ msgstr "Johan Eenfeldt"
273
+
274
+ #. Author URI of an extension
275
+ msgid "http://devel.kostdoktorn.se"
276
+ msgstr "http://devel.kostdoktorn.se"
277
+
limit-login-attempts-sv_SE.mo CHANGED
Binary file
limit-login-attempts-sv_SE.po CHANGED
@@ -3,231 +3,253 @@
3
  # This file is distributed under the same license as the Wordpress package.
4
  # Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>, 2009.
5
  #
6
- #, fuzzy
7
  msgid ""
8
  msgstr ""
9
  "Project-Id-Version: limit-login-attempts 1.2\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/limit-login-attempts\n"
11
- "POT-Creation-Date: 2009-01-20 12:47+0000\n"
12
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>\n"
14
  "Language-Team: Swedish\n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=UTF-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
19
 
20
- #: limit-login-attempts.php:319
21
  #, php-format
22
  msgid "%d hour"
23
  msgid_plural "%d hours"
24
  msgstr[0] "%d timme"
25
  msgstr[1] "%d timmar"
26
 
27
- #: limit-login-attempts.php:325
28
  #, php-format
29
  msgid "%d minute"
30
  msgid_plural "%d minutes"
31
  msgstr[0] "%d minut"
32
  msgstr[1] "%d minuter"
33
 
34
- #: limit-login-attempts.php:328
35
  #, php-format
36
  msgid "[%s] Too many failed login attempts"
37
  msgstr "[%s] För många misslyckade inloggningar"
38
 
39
- #: limit-login-attempts.php:330
40
  #, php-format
41
- msgid ""
42
- "%d failed login attempts (%d lockout(s)) from IP: %s\r\n"
43
- "\r\n"
44
- msgstr ""
45
- "%d misslyckade inloggningar (blockad %d gång(er)) från IP: %s\r\n"
46
- "\r\n"
47
 
48
- #: limit-login-attempts.php:334
49
  #, php-format
50
- msgid ""
51
- "Last user attempted: %s\r\n"
52
- "\r\n"
53
- msgstr ""
54
- "Senast misslyckades med användare : %s\r\n"
55
- "\r\n"
56
 
57
- #: limit-login-attempts.php:337
58
  #, php-format
59
  msgid "IP was blocked for %s"
60
  msgstr "IP blockerades i %s"
61
 
62
- #: limit-login-attempts.php:394
63
  msgid "<strong>ERROR</strong>: Too many failed login attempts."
64
  msgstr "<strong>Fel</strong>: F&ouml;r m&aring;nga misslyckade f&ouml;rs&ouml;k."
65
 
66
- #: limit-login-attempts.php:398
67
  msgid "Please try again later."
68
  msgstr "F&ouml;rs&ouml;k igen senare."
69
 
70
- #: limit-login-attempts.php:405
71
  #, php-format
72
  msgid "Please try again in %d hour."
73
  msgid_plural "Please try again in %d hours."
74
  msgstr[0] "F&ouml;rs&ouml;k igen om %d timme."
75
  msgstr[1] "F&ouml;rs&ouml;k igen om %d timmar."
76
 
77
- #: limit-login-attempts.php:407
78
  #, php-format
79
  msgid "Please try again in %d minute."
80
  msgid_plural "Please try again in %d minutes."
81
  msgstr[0] "F&ouml;rs&ouml;k igen om %d minut."
82
  msgstr[1] "F&ouml;rs&ouml;k igen om %d minuter."
83
 
84
- #: limit-login-attempts.php:439
85
  #, php-format
86
  msgid "<strong>%d</strong> attempt remaining."
87
  msgid_plural "<strong>%d</strong> attempts remaining."
88
  msgstr[0] "<strong>%d</strong> f&ouml;rs&ouml;k &aring;terst&aring;r."
89
  msgstr[1] "<strong>%d</strong> f&ouml;rs&ouml;k &aring;terst&aring;r."
90
 
91
- #: limit-login-attempts.php:503
92
  msgid "<strong>ERROR</strong>: Incorrect username or password."
93
  msgstr "<strong>Fel</strong>: Felaktigt anv&auml;ndarnamn eller l&ouml;senord."
94
 
95
- #: limit-login-attempts.php:643
96
  msgid "IP|Internet address"
97
  msgstr "IP"
98
 
99
- #: limit-login-attempts.php:643
100
  msgid "Tried to log in as"
101
  msgstr "F&ouml;rs&ouml;kte logga in som"
102
 
103
- #: limit-login-attempts.php:648
104
  #, php-format
105
  msgid "%d lockout"
106
  msgid_plural "%d lockouts"
107
  msgstr[0] "%d blockering"
108
  msgstr[1] "%d blockeringar"
109
 
110
- #: limit-login-attempts.php:674
111
  msgid "Cleared IP log"
112
  msgstr "Rensade IP loggen"
113
 
114
- #: limit-login-attempts.php:682
115
  msgid "Reset lockout count"
116
  msgstr "Nollst&auml;llde r&auml;knaren f&ouml;r blockeringar"
117
 
118
- #: limit-login-attempts.php:690
119
  msgid "Cleared current lockouts"
120
  msgstr "Tog bort aktuella blockeringar"
121
 
122
- #: limit-login-attempts.php:717
123
  msgid "Options changed"
124
  msgstr "Inst&auml;llningar &auml;ndrade"
125
 
126
- #: limit-login-attempts.php:728
127
  msgid "<strong>NOTE:</strong> Only works in Wordpress 2.7 or later"
128
  msgstr "<strong>OBS:</strong> Fungerar endast i WordPress 2.7 eller senare"
129
 
130
- #: limit-login-attempts.php:741
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  msgid "Limit Login Attempts Settings"
132
  msgstr "Limit Login Attempts Inst&auml;llningar"
133
 
134
- #: limit-login-attempts.php:742
135
  msgid "Statistics"
136
  msgstr "Statistik"
137
 
138
- #: limit-login-attempts.php:746
139
  msgid "Total lockouts"
140
  msgstr "Antal blockeringar"
141
 
142
- #: limit-login-attempts.php:749
143
  msgid "Reset Counter"
144
  msgstr "Nollst&auml;ll r&auml;knare"
145
 
146
- #: limit-login-attempts.php:750
147
  #, php-format
148
  msgid "%d lockout since last reset"
149
  msgid_plural "%d lockouts since last reset"
150
  msgstr[0] "%d blockering sedan r&auml;knaren nollst&auml;lldes"
151
  msgstr[1] "%d blockeringar sedan r&auml;knaren nollst&auml;lldes"
152
 
153
- #: limit-login-attempts.php:751
154
  msgid "No lockouts yet"
155
  msgstr "Inga blockeringar har skett &auml;nnu"
156
 
157
- #: limit-login-attempts.php:756
158
  msgid "Active lockouts"
159
  msgstr "Aktiva blockeringar"
160
 
161
- #: limit-login-attempts.php:758
162
  msgid "Restore Lockouts"
163
  msgstr "Ta bort blockeringar"
164
 
165
- #: limit-login-attempts.php:759
166
  #, php-format
167
  msgid "%d IP is currently blocked from trying to log in"
168
  msgstr "%d IP &auml;r f&ouml;r n&auml;rvarande blockerade fr&aring;n att logga in"
169
 
170
- #: limit-login-attempts.php:769
 
 
 
 
171
  msgid "Lockout"
172
  msgstr "Blockering"
173
 
174
- #: limit-login-attempts.php:771
175
  msgid "allowed retries"
176
  msgstr "till&aring;tna misslyckanden"
177
 
178
- #: limit-login-attempts.php:772
179
  msgid "minutes lockout"
180
  msgstr "minuters blockering"
181
 
182
- #: limit-login-attempts.php:773
183
  msgid "lockouts increase lockout time to"
184
  msgstr "blockeringar &ouml;kar tiden till"
185
 
186
- #: limit-login-attempts.php:773
187
  msgid "hours"
188
  msgstr "timmar"
189
 
190
- #: limit-login-attempts.php:774
191
  msgid "hours until retries are reset"
192
  msgstr "timmar tills misslyckanden nollst&auml;lls"
193
 
194
- #: limit-login-attempts.php:778
 
 
 
 
 
 
 
 
 
 
 
 
195
  msgid "Handle cookie login"
196
  msgstr "Hantera inloggning med kakor"
197
 
198
- #: limit-login-attempts.php:780
199
  msgid "Yes"
200
  msgstr "Ja"
201
 
202
- #: limit-login-attempts.php:780
203
  msgid "No"
204
  msgstr "Nej"
205
 
206
- #: limit-login-attempts.php:785
207
  msgid "Notify on lockout"
208
  msgstr "Notifiera om blockering"
209
 
210
- #: limit-login-attempts.php:787
211
  msgid "Log IP"
212
  msgstr "Logga IP"
213
 
214
- #: limit-login-attempts.php:788
215
  msgid "Email to admin after"
216
  msgstr "E-post till administrat&ouml;r efter"
217
 
218
- #: limit-login-attempts.php:788
219
  msgid "lockouts"
220
  msgstr "blockeringar"
221
 
222
- #: limit-login-attempts.php:793
223
  msgid "Change Options"
224
  msgstr "&Auml;ndra Inst&auml;llningar"
225
 
226
- #: limit-login-attempts.php:801
227
  msgid "Lockout log"
228
  msgstr "Log &ouml;ver blockeringar"
229
 
230
- #: limit-login-attempts.php:805
231
  msgid "Clear Log"
232
  msgstr "Rensa Log"
233
 
@@ -250,3 +272,4 @@ msgstr "Johan Eenfeldt"
250
  #. Author URI of an extension
251
  msgid "http://devel.kostdoktorn.se"
252
  msgstr "http://devel.kostdoktorn.se"
 
3
  # This file is distributed under the same license as the Wordpress package.
4
  # Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>, 2009.
5
  #
 
6
  msgid ""
7
  msgstr ""
8
  "Project-Id-Version: limit-login-attempts 1.2\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/limit-login-attempts\n"
10
+ "POT-Creation-Date: 2009-01-28 17:17+0000\n"
11
+ "PO-Revision-Date: 2009-01-28 18:25+0100\n"
12
  "Last-Translator: Johan Eenfeldt <johan.eenfeldt@kostdoktorn.se>\n"
13
  "Language-Team: Swedish\n"
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
+ #: limit-login-attempts.php:372
20
  #, php-format
21
  msgid "%d hour"
22
  msgid_plural "%d hours"
23
  msgstr[0] "%d timme"
24
  msgstr[1] "%d timmar"
25
 
26
+ #: limit-login-attempts.php:378
27
  #, php-format
28
  msgid "%d minute"
29
  msgid_plural "%d minutes"
30
  msgstr[0] "%d minut"
31
  msgstr[1] "%d minuter"
32
 
33
+ #: limit-login-attempts.php:381
34
  #, php-format
35
  msgid "[%s] Too many failed login attempts"
36
  msgstr "[%s] För många misslyckade inloggningar"
37
 
38
+ #: limit-login-attempts.php:383
39
  #, php-format
40
+ msgid "%d failed login attempts (%d lockout(s)) from IP: %s"
41
+ msgstr "%d misslyckade inloggningar (blockad %d gång(er)) från IP: %s"
 
 
 
 
42
 
43
+ #: limit-login-attempts.php:387
44
  #, php-format
45
+ msgid "Last user attempted: %s"
46
+ msgstr "Misslyckades senast med användare : %s"
 
 
 
 
47
 
48
+ #: limit-login-attempts.php:390
49
  #, php-format
50
  msgid "IP was blocked for %s"
51
  msgstr "IP blockerades i %s"
52
 
53
+ #: limit-login-attempts.php:445
54
  msgid "<strong>ERROR</strong>: Too many failed login attempts."
55
  msgstr "<strong>Fel</strong>: F&ouml;r m&aring;nga misslyckade f&ouml;rs&ouml;k."
56
 
57
+ #: limit-login-attempts.php:449
58
  msgid "Please try again later."
59
  msgstr "F&ouml;rs&ouml;k igen senare."
60
 
61
+ #: limit-login-attempts.php:456
62
  #, php-format
63
  msgid "Please try again in %d hour."
64
  msgid_plural "Please try again in %d hours."
65
  msgstr[0] "F&ouml;rs&ouml;k igen om %d timme."
66
  msgstr[1] "F&ouml;rs&ouml;k igen om %d timmar."
67
 
68
+ #: limit-login-attempts.php:458
69
  #, php-format
70
  msgid "Please try again in %d minute."
71
  msgid_plural "Please try again in %d minutes."
72
  msgstr[0] "F&ouml;rs&ouml;k igen om %d minut."
73
  msgstr[1] "F&ouml;rs&ouml;k igen om %d minuter."
74
 
75
+ #: limit-login-attempts.php:487
76
  #, php-format
77
  msgid "<strong>%d</strong> attempt remaining."
78
  msgid_plural "<strong>%d</strong> attempts remaining."
79
  msgstr[0] "<strong>%d</strong> f&ouml;rs&ouml;k &aring;terst&aring;r."
80
  msgstr[1] "<strong>%d</strong> f&ouml;rs&ouml;k &aring;terst&aring;r."
81
 
82
+ #: limit-login-attempts.php:551
83
  msgid "<strong>ERROR</strong>: Incorrect username or password."
84
  msgstr "<strong>Fel</strong>: Felaktigt anv&auml;ndarnamn eller l&ouml;senord."
85
 
86
+ #: limit-login-attempts.php:714
87
  msgid "IP|Internet address"
88
  msgstr "IP"
89
 
90
+ #: limit-login-attempts.php:714
91
  msgid "Tried to log in as"
92
  msgstr "F&ouml;rs&ouml;kte logga in som"
93
 
94
+ #: limit-login-attempts.php:719
95
  #, php-format
96
  msgid "%d lockout"
97
  msgid_plural "%d lockouts"
98
  msgstr[0] "%d blockering"
99
  msgstr[1] "%d blockeringar"
100
 
101
+ #: limit-login-attempts.php:743
102
  msgid "Cleared IP log"
103
  msgstr "Rensade IP loggen"
104
 
105
+ #: limit-login-attempts.php:751
106
  msgid "Reset lockout count"
107
  msgstr "Nollst&auml;llde r&auml;knaren f&ouml;r blockeringar"
108
 
109
+ #: limit-login-attempts.php:759
110
  msgid "Cleared current lockouts"
111
  msgstr "Tog bort aktuella blockeringar"
112
 
113
+ #: limit-login-attempts.php:788
114
  msgid "Options changed"
115
  msgstr "Inst&auml;llningar &auml;ndrade"
116
 
117
+ #: limit-login-attempts.php:799
118
  msgid "<strong>NOTE:</strong> Only works in Wordpress 2.7 or later"
119
  msgstr "<strong>OBS:</strong> Fungerar endast i WordPress 2.7 eller senare"
120
 
121
+ #: limit-login-attempts.php:815
122
+ #, php-format
123
+ msgid "It appears the site is reached directly (from your IP: %s)"
124
+ msgstr "Sajten tycks vara direktansluten (från din IP: %s)"
125
+
126
+ #: limit-login-attempts.php:817
127
+ #, php-format
128
+ msgid "It appears the site is reached through a proxy server (proxy IP: %s, your IP: %s)"
129
+ msgstr "Sajten tycks ansluta genom en proxy server (proxy IP: %s, din IP: %s)"
130
+
131
+ #: limit-login-attempts.php:825
132
+ #, php-format
133
+ msgid "<strong>Current setting appears to be invalid</strong>. Please make sure it is correct. Further information can be found <a href=\"%s\" title=\"FAQ\">here</a>"
134
+ msgstr "<strong>Nuvarande inställningar kan vara fel</strong>. Säkerställ att de är korrekta. Mer information kan hittas <a href=\"%s\" title=\"FAQ\">här</a>"
135
+
136
+ #: limit-login-attempts.php:833
137
  msgid "Limit Login Attempts Settings"
138
  msgstr "Limit Login Attempts Inst&auml;llningar"
139
 
140
+ #: limit-login-attempts.php:834
141
  msgid "Statistics"
142
  msgstr "Statistik"
143
 
144
+ #: limit-login-attempts.php:838
145
  msgid "Total lockouts"
146
  msgstr "Antal blockeringar"
147
 
148
+ #: limit-login-attempts.php:841
149
  msgid "Reset Counter"
150
  msgstr "Nollst&auml;ll r&auml;knare"
151
 
152
+ #: limit-login-attempts.php:842
153
  #, php-format
154
  msgid "%d lockout since last reset"
155
  msgid_plural "%d lockouts since last reset"
156
  msgstr[0] "%d blockering sedan r&auml;knaren nollst&auml;lldes"
157
  msgstr[1] "%d blockeringar sedan r&auml;knaren nollst&auml;lldes"
158
 
159
+ #: limit-login-attempts.php:843
160
  msgid "No lockouts yet"
161
  msgstr "Inga blockeringar har skett &auml;nnu"
162
 
163
+ #: limit-login-attempts.php:848
164
  msgid "Active lockouts"
165
  msgstr "Aktiva blockeringar"
166
 
167
+ #: limit-login-attempts.php:850
168
  msgid "Restore Lockouts"
169
  msgstr "Ta bort blockeringar"
170
 
171
+ #: limit-login-attempts.php:851
172
  #, php-format
173
  msgid "%d IP is currently blocked from trying to log in"
174
  msgstr "%d IP &auml;r f&ouml;r n&auml;rvarande blockerade fr&aring;n att logga in"
175
 
176
+ #: limit-login-attempts.php:857
177
+ msgid "Options"
178
+ msgstr "Inst&auml;llningar"
179
+
180
+ #: limit-login-attempts.php:861
181
  msgid "Lockout"
182
  msgstr "Blockering"
183
 
184
+ #: limit-login-attempts.php:863
185
  msgid "allowed retries"
186
  msgstr "till&aring;tna misslyckanden"
187
 
188
+ #: limit-login-attempts.php:864
189
  msgid "minutes lockout"
190
  msgstr "minuters blockering"
191
 
192
+ #: limit-login-attempts.php:865
193
  msgid "lockouts increase lockout time to"
194
  msgstr "blockeringar &ouml;kar tiden till"
195
 
196
+ #: limit-login-attempts.php:865
197
  msgid "hours"
198
  msgstr "timmar"
199
 
200
+ #: limit-login-attempts.php:866
201
  msgid "hours until retries are reset"
202
  msgstr "timmar tills misslyckanden nollst&auml;lls"
203
 
204
+ #: limit-login-attempts.php:870
205
+ msgid "Site connection"
206
+ msgstr "Sajten ansluter"
207
+
208
+ #: limit-login-attempts.php:876
209
+ msgid "Direct connection"
210
+ msgstr "Direktansluten"
211
+
212
+ #: limit-login-attempts.php:881
213
+ msgid "From behind a reversy proxy"
214
+ msgstr "Bakom en reverse proxy"
215
+
216
+ #: limit-login-attempts.php:887
217
  msgid "Handle cookie login"
218
  msgstr "Hantera inloggning med kakor"
219
 
220
+ #: limit-login-attempts.php:889
221
  msgid "Yes"
222
  msgstr "Ja"
223
 
224
+ #: limit-login-attempts.php:889
225
  msgid "No"
226
  msgstr "Nej"
227
 
228
+ #: limit-login-attempts.php:894
229
  msgid "Notify on lockout"
230
  msgstr "Notifiera om blockering"
231
 
232
+ #: limit-login-attempts.php:896
233
  msgid "Log IP"
234
  msgstr "Logga IP"
235
 
236
+ #: limit-login-attempts.php:897
237
  msgid "Email to admin after"
238
  msgstr "E-post till administrat&ouml;r efter"
239
 
240
+ #: limit-login-attempts.php:897
241
  msgid "lockouts"
242
  msgstr "blockeringar"
243
 
244
+ #: limit-login-attempts.php:902
245
  msgid "Change Options"
246
  msgstr "&Auml;ndra Inst&auml;llningar"
247
 
248
+ #: limit-login-attempts.php:910
249
  msgid "Lockout log"
250
  msgstr "Log &ouml;ver blockeringar"
251
 
252
+ #: limit-login-attempts.php:914
253
  msgid "Clear Log"
254
  msgstr "Rensa Log"
255
 
272
  #. Author URI of an extension
273
  msgid "http://devel.kostdoktorn.se"
274
  msgstr "http://devel.kostdoktorn.se"
275
+
limit-login-attempts.php CHANGED
@@ -5,10 +5,12 @@
5
  Description: Limit rate of login attempts, including by way of cookies, for each IP.
6
  Author: Johan Eenfeldt
7
  Author URI: http://devel.kostdoktorn.se
8
- Version: 1.2
9
 
10
  Copyright 2008, 2009 Johan Eenfeldt
11
 
 
 
12
  Licenced under the GNU GPL:
13
 
14
  This program is free software; you can redistribute it and/or modify
@@ -26,6 +28,16 @@
26
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
  */
28
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  /*
31
  * Variables
@@ -33,35 +45,38 @@
33
  * Assignments are for default value -- change in admin page.
34
  */
35
 
36
- /* Lock out after this many tries */
37
- $limit_login_allowed_retries = 4;
 
 
38
 
39
- /* Lock out for this many seconds */
40
- $limit_login_lockout_duration = 1200; // 20 minutes
41
 
42
- /* Long lock out after this many lockouts */
43
- $limit_login_allowed_lockouts = 4;
44
 
45
- /* Long lock out for this many seconds */
46
- $limit_login_long_duration = 86400; // 24 hours
47
 
48
- /* Reset failed attempts after this many seconds */
49
- $limit_login_valid_duration = 86400; // 24 hours
50
 
51
- /* Also limit malformed/forged cookies?
52
- *
53
- * NOTE: Only works in WP 2.7+, as necessary actions were added then.
54
- */
55
- $limit_login_cookies = true;
56
 
57
- /* Notify on lockout. Values: '', 'log', 'email', 'log,email' */
58
- $limit_login_lockout_notify = 'log';
 
 
 
59
 
60
- /* Notify value checked against these in limit_login_sanitize_variables() */
61
- $limit_login_lockout_notify_allowed = 'log,email';
62
 
63
- /* If notify by email, do so after this number of lockouts */
64
- $limit_login_notify_email_after = 4;
 
65
 
66
  $limit_login_my_error_shown = false; /* have we shown our stuff? */
67
  $limit_login_just_lockedout = false; /* started this pageload??? */
@@ -81,8 +96,6 @@ limit_login_setup();
81
 
82
  /* Get options and setup filters & actions */
83
  function limit_login_setup() {
84
- global $limit_login_cookies;
85
-
86
  load_plugin_textdomain('limit-login-attempts'
87
  , PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)));
88
 
@@ -90,7 +103,7 @@ function limit_login_setup() {
90
 
91
  /* Filters and actions */
92
  add_action('wp_login_failed', 'limit_login_failed');
93
- if ($limit_login_cookies) {
94
  add_action('plugins_loaded', 'limit_login_handle_cookies', 99999);
95
  add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie');
96
  add_action('auth_cookie_bad_username', 'limit_login_failed_cookie');
@@ -103,13 +116,59 @@ function limit_login_setup() {
103
  }
104
 
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  /* Check if it is ok to login */
107
  function is_limit_login_ok() {
108
- $index = $_SERVER['REMOTE_ADDR'];
109
 
110
  /* lockout active? */
111
  $lockouts = get_option('limit_login_lockouts');
112
- return (!is_array($lockouts) || !isset($lockouts[$index]) || time() >= $lockouts[$index]);
113
  }
114
 
115
 
@@ -169,13 +228,11 @@ function limit_login_failed_cookie($arg) {
169
  * lockout if nr of retries are above threshold. And more!
170
  */
171
  function limit_login_failed($arg) {
172
- global $limit_login_allowed_retries, $limit_login_valid_duration, $limit_login_last_user, $limit_login_allowed_lockouts, $limit_login_long_duration;
173
-
174
- $index = $_SERVER['REMOTE_ADDR'];
175
 
176
  /* if currently locked-out, do not add to retries */
177
  $lockouts = get_option('limit_login_lockouts');
178
- if(is_array($lockouts) && isset($lockouts[$index]) && time() < $lockouts[$index]) {
179
  return;
180
  } elseif (!is_array($lockouts)) {
181
  $lockouts = array();
@@ -194,28 +251,30 @@ function limit_login_failed($arg) {
194
  }
195
 
196
  /* Check validity and add one to retries */
197
- if (isset($retries[$index]) && isset($valid[$index]) && time() < $valid[$index]) {
198
- $retries[$index] ++;
199
  } else {
200
- $retries[$index] = 1;
201
  }
202
- $valid[$index] = time() + $limit_login_valid_duration;
203
 
204
  /* lockout? */
205
- if($retries[$index] % $limit_login_allowed_retries == 0) {
206
- global $limit_login_lockout_duration, $limit_login_just_lockedout;
207
 
208
  $limit_login_just_lockedout = true;
209
 
210
  /* setup lockout, reset retries as needed */
211
- if ($retries[$index] >= $limit_login_allowed_retries * $limit_login_allowed_lockouts) {
 
 
212
  /* long lockout */
213
- $lockouts[$index] = time() + $limit_login_long_duration;
214
- unset($retries[$index]);
215
- unset($valid[$index]);
216
  } else {
217
  /* normal lockout */
218
- $lockouts[$index] = time() + $limit_login_lockout_duration;
219
  }
220
 
221
  /* try to find username which failed */
@@ -250,10 +309,7 @@ function limit_login_failed($arg) {
250
 
251
  /* Clean up any old lockouts and old retries */
252
  function limit_login_cleanup($retries = null, $lockouts = null, $valid = null) {
253
- global $limit_login_lockout_duration, $limit_login_allowed_retries, $limit_login_valid_duration;
254
-
255
  $now = time();
256
-
257
  $lockouts = !is_null($lockouts) ? $lockouts : get_option('limit_login_lockouts');
258
 
259
  /* remove old lockouts */
@@ -294,9 +350,7 @@ function limit_login_cleanup($retries = null, $lockouts = null, $valid = null) {
294
 
295
  /* Email notification of lockout to admin (if configured) */
296
  function limit_login_notify_email($user) {
297
- global $limit_login_allowed_retries, $limit_login_allowed_lockouts, $limit_login_lockout_duration, $limit_login_notify_email_after, $limit_login_long_duration;
298
-
299
- $index = $_SERVER['REMOTE_ADDR'];
300
  $retries = get_option('limit_login_retries');
301
 
302
  if (!is_array($retries)) {
@@ -304,35 +358,36 @@ function limit_login_notify_email($user) {
304
  }
305
 
306
  /* check if we are at the right nr to do notification */
307
- if ( isset($retries[$index])
308
- && ( ($retries[$index] / $limit_login_allowed_retries)
309
- % $limit_login_notify_email_after ) != 0 ) {
310
  return;
311
  }
312
 
313
  /* Format message. First current lockout duration */
314
- if (!isset($retries[$index])) {
315
  /* longer lockout */
316
- $count = $limit_login_allowed_retries * $limit_login_allowed_lockouts;
317
- $lockouts = $limit_login_allowed_lockouts;
318
- $time = round($limit_login_long_duration / 3600);
 
319
  $when = sprintf(__ngettext('%d hour', '%d hours', $time, 'limit-login-attempts'), $time);
320
  } else {
321
  /* normal lockout */
322
- $count = $retries[$index];
323
- $lockouts = floor($count / $limit_login_allowed_retries);
324
- $time = round($limit_login_lockout_duration / 60);
325
  $when = sprintf(__ngettext('%d minute', '%d minutes', $time, 'limit-login-attempts'), $time);
326
  }
327
 
328
  $subject = sprintf(__("[%s] Too many failed login attempts", 'limit-login-attempts')
329
  , get_option('blogname'));
330
- $message = sprintf(__("%d failed login attempts (%d lockout(s)) from IP: %s\r\n\r\n"
331
- , 'limit-login-attempts')
332
- , $count, $lockouts, $index);
333
  if ($user != '') {
334
- $message .= sprintf(__("Last user attempted: %s\r\n\r\n", 'limit-login-attempts')
335
- , $user);
336
  }
337
  $message .= sprintf(__("IP was blocked for %s", 'limit-login-attempts'), $when);
338
 
@@ -343,19 +398,20 @@ function limit_login_notify_email($user) {
343
  /* Logging of lockout (if configured) */
344
  function limit_login_notify_log($user) {
345
  $log = get_option('limit_login_logged');
 
346
  if ($log === false) {
347
- $log = array($_SERVER['REMOTE_ADDR'] => array($user => 1));
348
  add_option('limit_login_logged', $log, '', 'no'); /* no autoload */
349
  } else {
350
  /* can be written much simpler, if you do not mind php warnings */
351
- if (isset($log[$_SERVER['REMOTE_ADDR']])) {
352
- if (isset($log[$_SERVER['REMOTE_ADDR']][$user])) {
353
- $log[$_SERVER['REMOTE_ADDR']][$user]++;
354
  } else {
355
- $log[$_SERVER['REMOTE_ADDR']][$user] = 1;
356
  }
357
  } else {
358
- $log[$_SERVER['REMOTE_ADDR']] = array($user => 1);
359
  }
360
  update_option('limit_login_logged', $log);
361
  }
@@ -364,9 +420,7 @@ function limit_login_notify_log($user) {
364
 
365
  /* Handle notification in event of lockout */
366
  function limit_login_notify($user) {
367
- global $limit_login_lockout_notify;
368
-
369
- $args = explode(',', $limit_login_lockout_notify);
370
 
371
  if (empty($args)) {
372
  return;
@@ -387,19 +441,18 @@ function limit_login_notify($user) {
387
 
388
  /* Construct informative error message */
389
  function limit_login_error_msg() {
390
- $index = $_SERVER['REMOTE_ADDR'];
391
-
392
  $lockouts = get_option('limit_login_lockouts');
393
 
394
  $msg = __('<strong>ERROR</strong>: Too many failed login attempts.', 'limit-login-attempts') . ' ';
395
 
396
- if (!is_array($lockouts) || !isset($lockouts[$index]) || time() >= $lockouts[$index]) {
397
  /* Huh? No timeout active? */
398
  $msg .= __('Please try again later.', 'limit-login-attempts');
399
  return $msg;
400
  }
401
 
402
- $when = ceil(($lockouts[$index] - time()) / 60);
403
  if ($when > 60) {
404
  $when = ceil($when / 60);
405
  $msg .= sprintf(__ngettext('Please try again in %d hour.', 'Please try again in %d hours.', $when, 'limit-login-attempts'), $when);
@@ -413,10 +466,7 @@ function limit_login_error_msg() {
413
 
414
  /* Construct retries remaining message */
415
  function limit_login_retries_remaining_msg() {
416
- global $limit_login_allowed_retries;
417
-
418
- $index = $_SERVER['REMOTE_ADDR'];
419
-
420
  $retries = get_option('limit_login_retries');
421
  $valid = get_option('limit_login_retries_valid');
422
 
@@ -426,16 +476,16 @@ function limit_login_retries_remaining_msg() {
426
  /* no retries at all */
427
  return '';
428
  }
429
- if (!isset($retries[$index]) || !isset($valid[$index]) || time() > $valid[$index]) {
430
  /* no: no valid retries */
431
  return '';
432
  }
433
- if (($retries[$index] % $limit_login_allowed_retries) == 0 ) {
434
  /* no: already been locked out for these retries */
435
  return '';
436
  }
437
 
438
- $remaining = max(($limit_login_allowed_retries - ($retries[$index] % $limit_login_allowed_retries)), 0);
439
  return sprintf(__ngettext("<strong>%d</strong> attempt remaining.", "<strong>%d</strong> attempts remaining.", $remaining, 'limit-login-attempts'), $remaining);
440
  }
441
 
@@ -523,7 +573,7 @@ function limit_login_fixup_error_messages($content) {
523
 
524
  /* Add a message to login page when necessary */
525
  function limit_login_add_error_message() {
526
- global $error, $limit_login_my_error_shown, $limit_login_allowed_retries;
527
 
528
  if (!should_limit_login_show_msg() || $limit_login_my_error_shown) {
529
  return;
@@ -559,28 +609,36 @@ function limit_login_support_cookie_option() {
559
  }
560
 
561
 
 
 
 
 
 
 
 
562
  /* Only change var if option exists */
563
- function limit_login_get_option($option, &$var) {
564
  $a = get_option($option);
565
 
566
  if ($a !== false) {
567
- $var = $a;
 
 
568
  }
569
  }
570
 
571
 
572
  /* Setup global variables from options */
573
  function limit_login_setup_options() {
574
- global $limit_login_allowed_retries, $limit_login_lockout_duration, $limit_login_valid_duration, $limit_login_cookies, $limit_login_lockout_notify, $limit_login_allowed_lockouts, $limit_login_long_duration, $limit_login_notify_email_after;
575
-
576
- limit_login_get_option('limit_login_allowed_retries', $limit_login_allowed_retries);
577
- limit_login_get_option('limit_login_lockout_duration', $limit_login_lockout_duration);
578
- limit_login_get_option('limit_login_valid_duration', $limit_login_valid_duration);
579
- limit_login_get_option('limit_login_cookies', $limit_login_cookies);
580
- limit_login_get_option('limit_login_lockout_notify', $limit_login_lockout_notify);
581
- limit_login_get_option('limit_login_allowed_lockouts', $limit_login_allowed_lockouts);
582
- limit_login_get_option('limit_login_long_duration', $limit_login_long_duration);
583
- limit_login_get_option('limit_login_notify_email_after', $limit_login_notify_email_after);
584
 
585
  limit_login_sanitize_variables();
586
  }
@@ -588,43 +646,58 @@ function limit_login_setup_options() {
588
 
589
  /* Update options in db from global variables */
590
  function limit_login_update_options() {
591
- global $limit_login_allowed_retries, $limit_login_lockout_duration, $limit_login_valid_duration, $limit_login_cookies, $limit_login_lockout_notify, $limit_login_allowed_lockouts, $limit_login_long_duration, $limit_login_notify_email_after;
592
-
593
- update_option('limit_login_allowed_retries', $limit_login_allowed_retries);
594
- update_option('limit_login_lockout_duration', $limit_login_lockout_duration);
595
- update_option('limit_login_allowed_lockouts', $limit_login_allowed_lockouts);
596
- update_option('limit_login_long_duration', $limit_login_long_duration);
597
- update_option('limit_login_valid_duration', $limit_login_valid_duration);
598
- update_option('limit_login_lockout_notify', $limit_login_lockout_notify);
599
- update_option('limit_login_notify_email_after', $limit_login_notify_email_after);
600
- update_option('limit_login_cookies', $limit_login_cookies ? '1' : '0');
 
 
 
 
 
 
 
601
  }
602
 
603
 
604
  /* Make sure the variables make sense */
605
  function limit_login_sanitize_variables() {
606
- global $limit_login_allowed_retries, $limit_login_lockout_duration, $limit_login_valid_duration, $limit_login_cookies, $limit_login_lockout_notify, $limit_login_allowed_lockouts, $limit_login_long_duration, $limit_login_lockout_notify_allowed, $limit_login_notify_email_after;
607
 
608
- $limit_login_allowed_retries = max(1, intval($limit_login_allowed_retries));
609
- $limit_login_lockout_duration = max(1, intval($limit_login_lockout_duration));
610
- $limit_login_valid_duration = max(1, intval($limit_login_valid_duration));
611
- $limit_login_allowed_lockouts = max(1, intval($limit_login_allowed_lockouts));
612
- $limit_login_long_duration = max(1, intval($limit_login_long_duration));
613
 
614
- $limit_login_notify_email_after = max(1, intval($limit_login_notify_email_after));
615
- $limit_login_notify_email_after = min($limit_login_allowed_lockouts, $limit_login_notify_email_after);
616
 
617
- $args = explode(',', $limit_login_lockout_notify);
618
- $args_allowed = explode(',', $limit_login_lockout_notify_allowed);
619
  $new_args = array();
620
  foreach ($args as $a) {
621
  if (in_array($a, $args_allowed)) {
622
  $new_args[] = $a;
623
  }
624
  }
625
- $limit_login_lockout_notify = implode(',', $new_args);
 
 
 
626
 
627
- $limit_login_cookies = $limit_login_cookies && limit_login_support_cookie_option() ? true : false;
 
 
 
 
 
628
  }
629
 
630
 
@@ -659,8 +732,6 @@ function limit_login_show_log($log) {
659
 
660
  /* Actual admin page */
661
  function limit_login_option_page() {
662
- global $limit_login_allowed_retries, $limit_login_lockout_duration, $limit_login_valid_duration, $limit_login_cookies, $limit_login_lockout_notify, $limit_login_allowed_lockouts, $limit_login_long_duration, $limit_login_lockout_notify_allowed, $limit_login_notify_email_after;
663
-
664
  limit_login_cleanup();
665
 
666
  if (!current_user_can('manage_options')) {
@@ -693,14 +764,16 @@ function limit_login_option_page() {
693
 
694
  /* Should we update options? */
695
  if (isset($_POST['update_options'])) {
696
- $limit_login_allowed_retries = $_POST['allowed_retries'];
697
- $limit_login_lockout_duration = $_POST['lockout_duration'] * 60;
698
- $limit_login_valid_duration = $_POST['valid_duration'] * 3600;
699
- $limit_login_allowed_lockouts = $_POST['allowed_lockouts'];
700
- $limit_login_long_duration = $_POST['long_duration'] * 3600;
701
- $limit_login_notify_email_after = $_POST['email_after'];
702
 
703
- $limit_login_cookies = (isset($_POST['cookies']) && $_POST['cookies'] == '1');
 
 
 
 
 
 
 
704
 
705
  $v = array();
706
  if (isset($_POST['lockout_notify_log'])) {
@@ -709,7 +782,7 @@ function limit_login_option_page() {
709
  if (isset($_POST['lockout_notify_email'])) {
710
  $v[] = 'email';
711
  }
712
- $limit_login_lockout_notify = implode(',', $v);
713
 
714
  limit_login_sanitize_variables();
715
  limit_login_update_options();
@@ -725,15 +798,36 @@ function limit_login_option_page() {
725
  if (!limit_login_support_cookie_option()) {
726
  $cookies_disabled = ' DISABLED ';
727
  $cookies_note = ' <br /> '
728
- . __('<strong>NOTE:</strong> Only works in Wordpress 2.7 or later', 'limit-login-attempts');
 
729
  } else {
730
  $cookies_disabled = '';
731
  $cookies_note = '';
732
  }
733
- $cookies_yes = $limit_login_cookies ? ' checked ' : '';
734
- $cookies_no = $limit_login_cookies ? '' : ' checked ';
 
 
 
 
 
 
 
 
 
 
 
 
 
735
 
736
- $v = explode(',', $limit_login_lockout_notify);
 
 
 
 
 
 
 
737
  $log_checked = in_array('log', $v) ? ' checked ' : '';
738
  $email_checked = in_array('email', $v) ? ' checked ' : '';
739
  ?>
@@ -762,22 +856,39 @@ function limit_login_option_page() {
762
  <?php } ?>
763
  </table>
764
  </form>
765
- <h3>Options</h3>
766
  <form action="options-general.php?page=limit-login-attempts" method="post">
767
  <table class="form-table">
768
  <tr>
769
  <th scope="row" valign="top"><?php echo __('Lockout','limit-login-attempts'); ?></th>
770
  <td>
771
- <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_allowed_retries); ?>" name="allowed_retries" /> <?php echo __('allowed retries','limit-login-attempts'); ?> <br />
772
- <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_lockout_duration/60); ?>" name="lockout_duration" /> <?php echo __('minutes lockout','limit-login-attempts'); ?> <br />
773
- <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_allowed_lockouts); ?>" name="allowed_lockouts" /> <?php echo __('lockouts increase lockout time to','limit-login-attempts'); ?> <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_long_duration/3600); ?>" name="long_duration" /> <?php echo __('hours','limit-login-attempts'); ?> <br />
774
- <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_valid_duration/3600); ?>" name="valid_duration" /> <?php echo __('hours until retries are reset','limit-login-attempts'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  </td>
776
  </tr>
777
  <tr>
778
  <th scope="row" valign="top"><?php echo __('Handle cookie login','limit-login-attempts'); ?></th>
779
  <td>
780
- <input type="radio" name="cookies" <?php echo $cookies_disabled . $cookies_yes; ?> value="1" /> <?php echo __('Yes','limit-login-attempts'); ?> <input type="radio" name="cookies" <?php echo $cookies_disabled . $cookies_no; ?> value="0" /> <?php echo __('No','limit-login-attempts'); ?>
781
  <?php echo $cookies_note ?>
782
  </td>
783
  </tr>
@@ -785,7 +896,7 @@ function limit_login_option_page() {
785
  <th scope="row" valign="top"><?php echo __('Notify on lockout','limit-login-attempts'); ?></th>
786
  <td>
787
  <input type="checkbox" name="lockout_notify_log" <?php echo $log_checked; ?> value="log" /> <?php echo __('Log IP','limit-login-attempts'); ?><br />
788
- <input type="checkbox" name="lockout_notify_email" <?php echo $email_checked; ?> value="email" /> <?php echo __('Email to admin after','limit-login-attempts'); ?> <input type="text" size="3" maxlength="4" value="<?php echo($limit_login_notify_email_after); ?>" name="email_after" /> <?php echo __('lockouts','limit-login-attempts'); ?>
789
  </td>
790
  </tr>
791
  </table>
5
  Description: Limit rate of login attempts, including by way of cookies, for each IP.
6
  Author: Johan Eenfeldt
7
  Author URI: http://devel.kostdoktorn.se
8
+ Version: 1.3
9
 
10
  Copyright 2008, 2009 Johan Eenfeldt
11
 
12
+ Thanks to Michael Skerwiderski for reverse proxy handling.
13
+
14
  Licenced under the GNU GPL:
15
 
16
  This program is free software; you can redistribute it and/or modify
28
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
  */
30
 
31
+ /*
32
+ * Constants
33
+ */
34
+
35
+ /* Different ways to get remote address: direct & behind proxy */
36
+ define('LIMIT_LOGIN_DIRECT_ADDR', 'REMOTE_ADDR');
37
+ define('LIMIT_LOGIN_PROXY_ADDR', 'HTTP_X_FORWARDED_FOR');
38
+
39
+ /* Notify value checked against these in limit_login_sanitize_variables() */
40
+ define('LIMIT_LOGIN_LOCKOUT_NOTIFY_ALLOWED', 'log,email');
41
 
42
  /*
43
  * Variables
45
  * Assignments are for default value -- change in admin page.
46
  */
47
 
48
+ $limit_login_options =
49
+ array(
50
+ /* Are we behind a proxy? */
51
+ 'client_type' => LIMIT_LOGIN_DIRECT_ADDR
52
 
53
+ /* Lock out after this many tries */
54
+ , 'allowed_retries' => 4
55
 
56
+ /* Lock out for this many seconds */
57
+ , 'lockout_duration' => 1200 // 20 minutes
58
 
59
+ /* Long lock out after this many lockouts */
60
+ , 'allowed_lockouts' => 4
61
 
62
+ /* Long lock out for this many seconds */
63
+ , 'long_duration' => 86400 // 24 hours
64
 
65
+ /* Reset failed attempts after this many seconds */
66
+ , 'valid_duration' => 86400 // 24 hours
 
 
 
67
 
68
+ /* Also limit malformed/forged cookies?
69
+ *
70
+ * NOTE: Only works in WP 2.7+, as necessary actions were added then.
71
+ */
72
+ , 'cookies' => true
73
 
74
+ /* Notify on lockout. Values: '', 'log', 'email', 'log,email' */
75
+ , 'lockout_notify' => 'log'
76
 
77
+ /* If notify by email, do so after this number of lockouts */
78
+ , 'notify_email_after' => 4
79
+ );
80
 
81
  $limit_login_my_error_shown = false; /* have we shown our stuff? */
82
  $limit_login_just_lockedout = false; /* started this pageload??? */
96
 
97
  /* Get options and setup filters & actions */
98
  function limit_login_setup() {
 
 
99
  load_plugin_textdomain('limit-login-attempts'
100
  , PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)));
101
 
103
 
104
  /* Filters and actions */
105
  add_action('wp_login_failed', 'limit_login_failed');
106
+ if (limit_login_option('cookies')) {
107
  add_action('plugins_loaded', 'limit_login_handle_cookies', 99999);
108
  add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie');
109
  add_action('auth_cookie_bad_username', 'limit_login_failed_cookie');
116
  }
117
 
118
 
119
+ /* Get current option value */
120
+ function limit_login_option($option_name) {
121
+ global $limit_login_options;
122
+
123
+ if (isset($limit_login_options[$option_name])) {
124
+ return $limit_login_options[$option_name];
125
+ } else {
126
+ return null;
127
+ }
128
+ }
129
+
130
+
131
+ /* Get correct remote address */
132
+ function limit_login_get_address($type_name = '') {
133
+ $type = $type_name;
134
+ if (empty($type)) {
135
+ $type = limit_login_option('client_type');
136
+ }
137
+
138
+ if (isset($_SERVER[$type])) {
139
+ return $_SERVER[$type];
140
+ }
141
+
142
+ /*
143
+ * Not found. Did we get proxy type from option?
144
+ * If so, try to fall back to direct address.
145
+ */
146
+ if ( empty($type_name) && $type == LIMIT_LOGIN_PROXY_ADDR
147
+ && isset($_SERVER[LIMIT_LOGIN_DIRECT_ADDR])) {
148
+
149
+ /*
150
+ * NOTE: Even though we fall back to direct address -- meaning you
151
+ * can get a mostly working plugin when set to PROXY mode while in
152
+ * fact directly connected to Internet it is not safe!
153
+ *
154
+ * Client can itself send HTTP_X_FORWARDED_FOR header fooling us
155
+ * regarding which IP should be banned.
156
+ */
157
+
158
+ return $_SERVER[LIMIT_LOGIN_DIRECT_ADDR];
159
+ }
160
+
161
+ return '';
162
+ }
163
+
164
+
165
  /* Check if it is ok to login */
166
  function is_limit_login_ok() {
167
+ $ip = limit_login_get_address();
168
 
169
  /* lockout active? */
170
  $lockouts = get_option('limit_login_lockouts');
171
+ return (!is_array($lockouts) || !isset($lockouts[$ip]) || time() >= $lockouts[$ip]);
172
  }
173
 
174
 
228
  * lockout if nr of retries are above threshold. And more!
229
  */
230
  function limit_login_failed($arg) {
231
+ $ip = limit_login_get_address();
 
 
232
 
233
  /* if currently locked-out, do not add to retries */
234
  $lockouts = get_option('limit_login_lockouts');
235
+ if(is_array($lockouts) && isset($lockouts[$ip]) && time() < $lockouts[$ip]) {
236
  return;
237
  } elseif (!is_array($lockouts)) {
238
  $lockouts = array();
251
  }
252
 
253
  /* Check validity and add one to retries */
254
+ if (isset($retries[$ip]) && isset($valid[$ip]) && time() < $valid[$ip]) {
255
+ $retries[$ip] ++;
256
  } else {
257
+ $retries[$ip] = 1;
258
  }
259
+ $valid[$ip] = time() + limit_login_option('valid_duration');
260
 
261
  /* lockout? */
262
+ if($retries[$ip] % limit_login_option('allowed_retries') == 0) {
263
+ global $limit_login_just_lockedout;
264
 
265
  $limit_login_just_lockedout = true;
266
 
267
  /* setup lockout, reset retries as needed */
268
+ $retries_long = limit_login_option('allowed_retries')
269
+ * limit_login_option('allowed_lockouts');
270
+ if ($retries[$ip] >= $retries_long) {
271
  /* long lockout */
272
+ $lockouts[$ip] = time() + limit_login_option('long_duration');
273
+ unset($retries[$ip]);
274
+ unset($valid[$ip]);
275
  } else {
276
  /* normal lockout */
277
+ $lockouts[$ip] = time() + limit_login_option('lockout_duration');
278
  }
279
 
280
  /* try to find username which failed */
309
 
310
  /* Clean up any old lockouts and old retries */
311
  function limit_login_cleanup($retries = null, $lockouts = null, $valid = null) {
 
 
312
  $now = time();
 
313
  $lockouts = !is_null($lockouts) ? $lockouts : get_option('limit_login_lockouts');
314
 
315
  /* remove old lockouts */
350
 
351
  /* Email notification of lockout to admin (if configured) */
352
  function limit_login_notify_email($user) {
353
+ $ip = limit_login_get_address();
 
 
354
  $retries = get_option('limit_login_retries');
355
 
356
  if (!is_array($retries)) {
358
  }
359
 
360
  /* check if we are at the right nr to do notification */
361
+ if ( isset($retries[$ip])
362
+ && ( ($retries[$ip] / limit_login_option('allowed_retries'))
363
+ % limit_login_option('notify_email_after') ) != 0 ) {
364
  return;
365
  }
366
 
367
  /* Format message. First current lockout duration */
368
+ if (!isset($retries[$ip])) {
369
  /* longer lockout */
370
+ $count = limit_login_option('allowed_retries')
371
+ * limit_login_option('allowed_lockouts');
372
+ $lockouts = limit_login_option('allowed_lockouts');
373
+ $time = round(limit_login_option('long_duration') / 3600);
374
  $when = sprintf(__ngettext('%d hour', '%d hours', $time, 'limit-login-attempts'), $time);
375
  } else {
376
  /* normal lockout */
377
+ $count = $retries[$ip];
378
+ $lockouts = floor($count / limit_login_option('allowed_retries'));
379
+ $time = round(limit_login_option('lockout_duration') / 60);
380
  $when = sprintf(__ngettext('%d minute', '%d minutes', $time, 'limit-login-attempts'), $time);
381
  }
382
 
383
  $subject = sprintf(__("[%s] Too many failed login attempts", 'limit-login-attempts')
384
  , get_option('blogname'));
385
+ $message = sprintf(__("%d failed login attempts (%d lockout(s)) from IP: %s"
386
+ , 'limit-login-attempts') . "\r\n\r\n"
387
+ , $count, $lockouts, $ip);
388
  if ($user != '') {
389
+ $message .= sprintf(__("Last user attempted: %s", 'limit-login-attempts')
390
+ . "\r\n\r\n" , $user);
391
  }
392
  $message .= sprintf(__("IP was blocked for %s", 'limit-login-attempts'), $when);
393
 
398
  /* Logging of lockout (if configured) */
399
  function limit_login_notify_log($user) {
400
  $log = get_option('limit_login_logged');
401
+ $ip = limit_login_get_address();
402
  if ($log === false) {
403
+ $log = array($ip => array($user => 1));
404
  add_option('limit_login_logged', $log, '', 'no'); /* no autoload */
405
  } else {
406
  /* can be written much simpler, if you do not mind php warnings */
407
+ if (isset($log[$ip])) {
408
+ if (isset($log[$ip][$user])) {
409
+ $log[$ip][$user]++;
410
  } else {
411
+ $log[$ip][$user] = 1;
412
  }
413
  } else {
414
+ $log[$ip] = array($user => 1);
415
  }
416
  update_option('limit_login_logged', $log);
417
  }
420
 
421
  /* Handle notification in event of lockout */
422
  function limit_login_notify($user) {
423
+ $args = explode(',', limit_login_option('lockout_notify'));
 
 
424
 
425
  if (empty($args)) {
426
  return;
441
 
442
  /* Construct informative error message */
443
  function limit_login_error_msg() {
444
+ $ip = limit_login_get_address();
 
445
  $lockouts = get_option('limit_login_lockouts');
446
 
447
  $msg = __('<strong>ERROR</strong>: Too many failed login attempts.', 'limit-login-attempts') . ' ';
448
 
449
+ if (!is_array($lockouts) || !isset($lockouts[$ip]) || time() >= $lockouts[$ip]) {
450
  /* Huh? No timeout active? */
451
  $msg .= __('Please try again later.', 'limit-login-attempts');
452
  return $msg;
453
  }
454
 
455
+ $when = ceil(($lockouts[$ip] - time()) / 60);
456
  if ($when > 60) {
457
  $when = ceil($when / 60);
458
  $msg .= sprintf(__ngettext('Please try again in %d hour.', 'Please try again in %d hours.', $when, 'limit-login-attempts'), $when);
466
 
467
  /* Construct retries remaining message */
468
  function limit_login_retries_remaining_msg() {
469
+ $ip = limit_login_get_address();
 
 
 
470
  $retries = get_option('limit_login_retries');
471
  $valid = get_option('limit_login_retries_valid');
472
 
476
  /* no retries at all */
477
  return '';
478
  }
479
+ if (!isset($retries[$ip]) || !isset($valid[$ip]) || time() > $valid[$ip]) {
480
  /* no: no valid retries */
481
  return '';
482
  }
483
+ if (($retries[$ip] % limit_login_option('allowed_retries')) == 0 ) {
484
  /* no: already been locked out for these retries */
485
  return '';
486
  }
487
 
488
+ $remaining = max((limit_login_option('allowed_retries') - ($retries[$ip] % limit_login_option('allowed_retries'))), 0);
489
  return sprintf(__ngettext("<strong>%d</strong> attempt remaining.", "<strong>%d</strong> attempts remaining.", $remaining, 'limit-login-attempts'), $remaining);
490
  }
491
 
573
 
574
  /* Add a message to login page when necessary */
575
  function limit_login_add_error_message() {
576
+ global $error, $limit_login_my_error_shown;
577
 
578
  if (!should_limit_login_show_msg() || $limit_login_my_error_shown) {
579
  return;
609
  }
610
 
611
 
612
+ /* Make a guess if we are behind a proxy or not */
613
+ function limit_login_guess_proxy() {
614
+ return isset($_SERVER[LIMIT_LOGIN_PROXY_ADDR])
615
+ ? LIMIT_LOGIN_PROXY_ADDR : LIMIT_LOGIN_DIRECT_ADDR;
616
+ }
617
+
618
+
619
  /* Only change var if option exists */
620
+ function limit_login_get_option($option, $var_name) {
621
  $a = get_option($option);
622
 
623
  if ($a !== false) {
624
+ global $limit_login_options;
625
+
626
+ $limit_login_options[$var_name] = $a;
627
  }
628
  }
629
 
630
 
631
  /* Setup global variables from options */
632
  function limit_login_setup_options() {
633
+ limit_login_get_option('limit_login_client_type', 'client_type');
634
+ limit_login_get_option('limit_login_allowed_retries', 'allowed_retries');
635
+ limit_login_get_option('limit_login_lockout_duration', 'lockout_duration');
636
+ limit_login_get_option('limit_login_valid_duration', 'valid_duration');
637
+ limit_login_get_option('limit_login_cookies', 'cookies');
638
+ limit_login_get_option('limit_login_lockout_notify', 'lockout_notify');
639
+ limit_login_get_option('limit_login_allowed_lockouts', 'allowed_lockouts');
640
+ limit_login_get_option('limit_login_long_duration', 'long_duration');
641
+ limit_login_get_option('limit_login_notify_email_after', 'notify_email_after');
 
642
 
643
  limit_login_sanitize_variables();
644
  }
646
 
647
  /* Update options in db from global variables */
648
  function limit_login_update_options() {
649
+ update_option('limit_login_client_type', limit_login_option('client_type'));
650
+ update_option('limit_login_allowed_retries', limit_login_option('allowed_retries'));
651
+ update_option('limit_login_lockout_duration', limit_login_option('lockout_duration'));
652
+ update_option('limit_login_allowed_lockouts', limit_login_option('allowed_lockouts'));
653
+ update_option('limit_login_long_duration', limit_login_option('long_duration'));
654
+ update_option('limit_login_valid_duration', limit_login_option('valid_duration'));
655
+ update_option('limit_login_lockout_notify', limit_login_option('lockout_notify'));
656
+ update_option('limit_login_notify_email_after', limit_login_option('notify_email_after'));
657
+ update_option('limit_login_cookies', limit_login_option('cookies') ? '1' : '0');
658
+ }
659
+
660
+
661
+ /* Make sure the variables make sense -- simple integer */
662
+ function limit_login_sanitize_simple_int($var_name) {
663
+ global $limit_login_options;
664
+
665
+ $limit_login_options[$var_name] = max(1, intval(limit_login_option($var_name)));
666
  }
667
 
668
 
669
  /* Make sure the variables make sense */
670
  function limit_login_sanitize_variables() {
671
+ global $limit_login_options;
672
 
673
+ limit_login_sanitize_simple_int('allowed_retries');
674
+ limit_login_sanitize_simple_int('lockout_duration');
675
+ limit_login_sanitize_simple_int('valid_duration');
676
+ limit_login_sanitize_simple_int('allowed_lockouts');
677
+ limit_login_sanitize_simple_int('long_duration');
678
 
679
+ $notify_email_after = max(1, intval(limit_login_option('notify_email_after')));
680
+ $limit_login_options['notify_email_after'] = min(limit_login_option('allowed_lockouts'), $notify_email_after);
681
 
682
+ $args = explode(',', limit_login_option('lockout_notify'));
683
+ $args_allowed = explode(',', LIMIT_LOGIN_LOCKOUT_NOTIFY_ALLOWED);
684
  $new_args = array();
685
  foreach ($args as $a) {
686
  if (in_array($a, $args_allowed)) {
687
  $new_args[] = $a;
688
  }
689
  }
690
+ $limit_login_options['lockout_notify'] = implode(',', $new_args);
691
+
692
+ $cookies = limit_login_option('cookies')
693
+ && limit_login_support_cookie_option() ? true : false;
694
 
695
+ $limit_login_options['cookies'] = $cookies;
696
+
697
+ if ( limit_login_option('client_type') != LIMIT_LOGIN_DIRECT_ADDR
698
+ && limit_login_option('client_type') != LIMIT_LOGIN_PROXY_ADDR ) {
699
+ $limit_login_options['client_type'] = LIMIT_LOGIN_DIRECT_ADDR;
700
+ }
701
  }
702
 
703
 
732
 
733
  /* Actual admin page */
734
  function limit_login_option_page() {
 
 
735
  limit_login_cleanup();
736
 
737
  if (!current_user_can('manage_options')) {
764
 
765
  /* Should we update options? */
766
  if (isset($_POST['update_options'])) {
767
+ global $limit_login_options;
 
 
 
 
 
768
 
769
+ $limit_login_options['client_type'] = $_POST['client_type'];
770
+ $limit_login_options['allowed_retries'] = $_POST['allowed_retries'];
771
+ $limit_login_options['lockout_duration'] = $_POST['lockout_duration'] * 60;
772
+ $limit_login_options['valid_duration'] = $_POST['valid_duration'] * 3600;
773
+ $limit_login_options['allowed_lockouts'] = $_POST['allowed_lockouts'];
774
+ $limit_login_options['long_duration'] = $_POST['long_duration'] * 3600;
775
+ $limit_login_options['notify_email_after'] = $_POST['email_after'];
776
+ $limit_login_options['cookies'] = (isset($_POST['cookies']) && $_POST['cookies'] == '1');
777
 
778
  $v = array();
779
  if (isset($_POST['lockout_notify_log'])) {
782
  if (isset($_POST['lockout_notify_email'])) {
783
  $v[] = 'email';
784
  }
785
+ $limit_login_options['lockout_notify'] = implode(',', $v);
786
 
787
  limit_login_sanitize_variables();
788
  limit_login_update_options();
798
  if (!limit_login_support_cookie_option()) {
799
  $cookies_disabled = ' DISABLED ';
800
  $cookies_note = ' <br /> '
801
+ . __('<strong>NOTE:</strong> Only works in Wordpress 2.7 or later'
802
+ , 'limit-login-attempts');
803
  } else {
804
  $cookies_disabled = '';
805
  $cookies_note = '';
806
  }
807
+ $cookies_yes = limit_login_option('cookies') ? ' checked ' : '';
808
+ $cookies_no = limit_login_option('cookies') ? '' : ' checked ';
809
+
810
+ $client_type = limit_login_option('client_type');
811
+ $client_type_direct = $client_type == LIMIT_LOGIN_DIRECT_ADDR ? ' checked ' : '';
812
+ $client_type_proxy = $client_type == LIMIT_LOGIN_PROXY_ADDR ? ' checked ' : '';
813
+
814
+ $client_type_guess = limit_login_guess_proxy();
815
+
816
+ if ($client_type_guess == LIMIT_LOGIN_DIRECT_ADDR) {
817
+ $client_type_message = sprintf(__('It appears the site is reached directly (from your IP: %s)','limit-login-attempts'), limit_login_get_address(LIMIT_LOGIN_DIRECT_ADDR));
818
+ } else {
819
+ $client_type_message = sprintf(__('It appears the site is reached through a proxy server (proxy IP: %s, your IP: %s)','limit-login-attempts'), limit_login_get_address(LIMIT_LOGIN_DIRECT_ADDR), limit_login_get_address(LIMIT_LOGIN_PROXY_ADDR));
820
+ }
821
+ $client_type_message .= '<br />';
822
 
823
+ $client_type_warning = '';
824
+ if ($client_type != $client_type_guess) {
825
+ $faq = 'http://wordpress.org/extend/plugins/limit-login-attempts/faq/';
826
+
827
+ $client_type_warning = '<br /><br />' . sprintf(__('<strong>Current setting appears to be invalid</strong>. Please make sure it is correct. Further information can be found <a href="%s" title="FAQ">here</a>','limit-login-attempts'), $faq);
828
+ }
829
+
830
+ $v = explode(',', limit_login_option('lockout_notify'));
831
  $log_checked = in_array('log', $v) ? ' checked ' : '';
832
  $email_checked = in_array('email', $v) ? ' checked ' : '';
833
  ?>
856
  <?php } ?>
857
  </table>
858
  </form>
859
+ <h3><?php echo __('Options','limit-login-attempts'); ?></h3>
860
  <form action="options-general.php?page=limit-login-attempts" method="post">
861
  <table class="form-table">
862
  <tr>
863
  <th scope="row" valign="top"><?php echo __('Lockout','limit-login-attempts'); ?></th>
864
  <td>
865
+ <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('allowed_retries')); ?>" name="allowed_retries" /> <?php echo __('allowed retries','limit-login-attempts'); ?> <br />
866
+ <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('lockout_duration')/60); ?>" name="lockout_duration" /> <?php echo __('minutes lockout','limit-login-attempts'); ?> <br />
867
+ <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('allowed_lockouts')); ?>" name="allowed_lockouts" /> <?php echo __('lockouts increase lockout time to','limit-login-attempts'); ?> <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('long_duration')/3600); ?>" name="long_duration" /> <?php echo __('hours','limit-login-attempts'); ?> <br />
868
+ <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('valid_duration')/3600); ?>" name="valid_duration" /> <?php echo __('hours until retries are reset','limit-login-attempts'); ?>
869
+ </td>
870
+ </tr>
871
+ <tr>
872
+ <th scope="row" valign="top"><?php echo __('Site connection','limit-login-attempts'); ?></th>
873
+ <td>
874
+ <?php echo $client_type_message; ?>
875
+ <label>
876
+ <input type="radio" name="client_type"
877
+ <?php echo $client_type_direct; ?> value="<?php echo LIMIT_LOGIN_DIRECT_ADDR; ?>" />
878
+ <?php echo __('Direct connection','limit-login-attempts'); ?>
879
+ </label>
880
+ <label>
881
+ <input type="radio" name="client_type"
882
+ <?php echo $client_type_proxy; ?> value="<?php echo LIMIT_LOGIN_PROXY_ADDR; ?>" />
883
+ <?php echo __('From behind a reversy proxy','limit-login-attempts'); ?>
884
+ </label>
885
+ <?php echo $client_type_warning; ?>
886
  </td>
887
  </tr>
888
  <tr>
889
  <th scope="row" valign="top"><?php echo __('Handle cookie login','limit-login-attempts'); ?></th>
890
  <td>
891
+ <label><input type="radio" name="cookies" <?php echo $cookies_disabled . $cookies_yes; ?> value="1" /> <?php echo __('Yes','limit-login-attempts'); ?></label> <label><input type="radio" name="cookies" <?php echo $cookies_disabled . $cookies_no; ?> value="0" /> <?php echo __('No','limit-login-attempts'); ?></label>
892
  <?php echo $cookies_note ?>
893
  </td>
894
  </tr>
896
  <th scope="row" valign="top"><?php echo __('Notify on lockout','limit-login-attempts'); ?></th>
897
  <td>
898
  <input type="checkbox" name="lockout_notify_log" <?php echo $log_checked; ?> value="log" /> <?php echo __('Log IP','limit-login-attempts'); ?><br />
899
+ <input type="checkbox" name="lockout_notify_email" <?php echo $email_checked; ?> value="email" /> <?php echo __('Email to admin after','limit-login-attempts'); ?> <input type="text" size="3" maxlength="4" value="<?php echo(limit_login_option('notify_email_after')); ?>" name="email_after" /> <?php echo __('lockouts','limit-login-attempts'); ?>
900
  </td>
901
  </tr>
902
  </table>
limit-login-attempts.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/limit-login-attempts\n"
11
- "POT-Creation-Date: 2009-01-20 12:47+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,213 +17,247 @@ msgstr ""
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
19
 
20
- #: limit-login-attempts.php:319
21
  #, php-format
22
  msgid "%d hour"
23
  msgid_plural "%d hours"
24
  msgstr[0] ""
25
  msgstr[1] ""
26
 
27
- #: limit-login-attempts.php:325
28
  #, php-format
29
  msgid "%d minute"
30
  msgid_plural "%d minutes"
31
  msgstr[0] ""
32
  msgstr[1] ""
33
 
34
- #: limit-login-attempts.php:328
35
  #, php-format
36
  msgid "[%s] Too many failed login attempts"
37
  msgstr ""
38
 
39
- #: limit-login-attempts.php:330
40
  #, php-format
41
  msgid ""
42
- "%d failed login attempts (%d lockout(s)) from IP: %s\r\n"
43
- "\r\n"
44
  msgstr ""
45
 
46
- #: limit-login-attempts.php:334
47
  #, php-format
48
  msgid ""
49
- "Last user attempted: %s\r\n"
50
- "\r\n"
51
  msgstr ""
52
 
53
- #: limit-login-attempts.php:337
54
  #, php-format
55
  msgid "IP was blocked for %s"
56
  msgstr ""
57
 
58
- #: limit-login-attempts.php:394
59
  msgid "<strong>ERROR</strong>: Too many failed login attempts."
60
  msgstr ""
61
 
62
- #: limit-login-attempts.php:398
63
  msgid "Please try again later."
64
  msgstr ""
65
 
66
- #: limit-login-attempts.php:405
67
  #, php-format
68
  msgid "Please try again in %d hour."
69
  msgid_plural "Please try again in %d hours."
70
  msgstr[0] ""
71
  msgstr[1] ""
72
 
73
- #: limit-login-attempts.php:407
74
  #, php-format
75
  msgid "Please try again in %d minute."
76
  msgid_plural "Please try again in %d minutes."
77
  msgstr[0] ""
78
  msgstr[1] ""
79
 
80
- #: limit-login-attempts.php:439
81
  #, php-format
82
  msgid "<strong>%d</strong> attempt remaining."
83
  msgid_plural "<strong>%d</strong> attempts remaining."
84
  msgstr[0] ""
85
  msgstr[1] ""
86
 
87
- #: limit-login-attempts.php:503
88
  msgid "<strong>ERROR</strong>: Incorrect username or password."
89
  msgstr ""
90
 
91
- #: limit-login-attempts.php:643
92
  msgid "IP|Internet address"
93
  msgstr ""
94
 
95
- #: limit-login-attempts.php:643
96
  msgid "Tried to log in as"
97
  msgstr ""
98
 
99
- #: limit-login-attempts.php:648
100
  #, php-format
101
  msgid "%d lockout"
102
  msgid_plural "%d lockouts"
103
  msgstr[0] ""
104
  msgstr[1] ""
105
 
106
- #: limit-login-attempts.php:674
107
  msgid "Cleared IP log"
108
  msgstr ""
109
 
110
- #: limit-login-attempts.php:682
111
  msgid "Reset lockout count"
112
  msgstr ""
113
 
114
- #: limit-login-attempts.php:690
115
  msgid "Cleared current lockouts"
116
  msgstr ""
117
 
118
- #: limit-login-attempts.php:717
119
  msgid "Options changed"
120
  msgstr ""
121
 
122
- #: limit-login-attempts.php:728
123
  msgid "<strong>NOTE:</strong> Only works in Wordpress 2.7 or later"
124
  msgstr ""
125
 
126
- #: limit-login-attempts.php:741
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  msgid "Limit Login Attempts Settings"
128
  msgstr ""
129
 
130
- #: limit-login-attempts.php:742
131
  msgid "Statistics"
132
  msgstr ""
133
 
134
- #: limit-login-attempts.php:746
135
  msgid "Total lockouts"
136
  msgstr ""
137
 
138
- #: limit-login-attempts.php:749
139
  msgid "Reset Counter"
140
  msgstr ""
141
 
142
- #: limit-login-attempts.php:750
143
  #, php-format
144
  msgid "%d lockout since last reset"
145
  msgid_plural "%d lockouts since last reset"
146
  msgstr[0] ""
147
  msgstr[1] ""
148
 
149
- #: limit-login-attempts.php:751
150
  msgid "No lockouts yet"
151
  msgstr ""
152
 
153
- #: limit-login-attempts.php:756
154
  msgid "Active lockouts"
155
  msgstr ""
156
 
157
- #: limit-login-attempts.php:758
158
  msgid "Restore Lockouts"
159
  msgstr ""
160
 
161
- #: limit-login-attempts.php:759
162
  #, php-format
163
  msgid "%d IP is currently blocked from trying to log in"
164
  msgstr ""
165
 
166
- #: limit-login-attempts.php:769
 
 
 
 
167
  msgid "Lockout"
168
  msgstr ""
169
 
170
- #: limit-login-attempts.php:771
171
  msgid "allowed retries"
172
  msgstr ""
173
 
174
- #: limit-login-attempts.php:772
175
  msgid "minutes lockout"
176
  msgstr ""
177
 
178
- #: limit-login-attempts.php:773
179
  msgid "lockouts increase lockout time to"
180
  msgstr ""
181
 
182
- #: limit-login-attempts.php:773
183
  msgid "hours"
184
  msgstr ""
185
 
186
- #: limit-login-attempts.php:774
187
  msgid "hours until retries are reset"
188
  msgstr ""
189
 
190
- #: limit-login-attempts.php:778
 
 
 
 
 
 
 
 
 
 
 
 
191
  msgid "Handle cookie login"
192
  msgstr ""
193
 
194
- #: limit-login-attempts.php:780
195
  msgid "Yes"
196
  msgstr ""
197
 
198
- #: limit-login-attempts.php:780
199
  msgid "No"
200
  msgstr ""
201
 
202
- #: limit-login-attempts.php:785
203
  msgid "Notify on lockout"
204
  msgstr ""
205
 
206
- #: limit-login-attempts.php:787
207
  msgid "Log IP"
208
  msgstr ""
209
 
210
- #: limit-login-attempts.php:788
211
  msgid "Email to admin after"
212
  msgstr ""
213
 
214
- #: limit-login-attempts.php:788
215
  msgid "lockouts"
216
  msgstr ""
217
 
218
- #: limit-login-attempts.php:793
219
  msgid "Change Options"
220
  msgstr ""
221
 
222
- #: limit-login-attempts.php:801
223
  msgid "Lockout log"
224
  msgstr ""
225
 
226
- #: limit-login-attempts.php:805
227
  msgid "Clear Log"
228
  msgstr ""
229
 
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/limit-login-attempts\n"
11
+ "POT-Creation-Date: 2009-01-28 17:17+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
19
 
20
+ #: limit-login-attempts.php:372
21
  #, php-format
22
  msgid "%d hour"
23
  msgid_plural "%d hours"
24
  msgstr[0] ""
25
  msgstr[1] ""
26
 
27
+ #: limit-login-attempts.php:378
28
  #, php-format
29
  msgid "%d minute"
30
  msgid_plural "%d minutes"
31
  msgstr[0] ""
32
  msgstr[1] ""
33
 
34
+ #: limit-login-attempts.php:381
35
  #, php-format
36
  msgid "[%s] Too many failed login attempts"
37
  msgstr ""
38
 
39
+ #: limit-login-attempts.php:383
40
  #, php-format
41
  msgid ""
42
+ "%d failed login attempts (%d lockout(s)) from IP: %s"
 
43
  msgstr ""
44
 
45
+ #: limit-login-attempts.php:387
46
  #, php-format
47
  msgid ""
48
+ "Last user attempted: %s"
 
49
  msgstr ""
50
 
51
+ #: limit-login-attempts.php:390
52
  #, php-format
53
  msgid "IP was blocked for %s"
54
  msgstr ""
55
 
56
+ #: limit-login-attempts.php:445
57
  msgid "<strong>ERROR</strong>: Too many failed login attempts."
58
  msgstr ""
59
 
60
+ #: limit-login-attempts.php:449
61
  msgid "Please try again later."
62
  msgstr ""
63
 
64
+ #: limit-login-attempts.php:456
65
  #, php-format
66
  msgid "Please try again in %d hour."
67
  msgid_plural "Please try again in %d hours."
68
  msgstr[0] ""
69
  msgstr[1] ""
70
 
71
+ #: limit-login-attempts.php:458
72
  #, php-format
73
  msgid "Please try again in %d minute."
74
  msgid_plural "Please try again in %d minutes."
75
  msgstr[0] ""
76
  msgstr[1] ""
77
 
78
+ #: limit-login-attempts.php:487
79
  #, php-format
80
  msgid "<strong>%d</strong> attempt remaining."
81
  msgid_plural "<strong>%d</strong> attempts remaining."
82
  msgstr[0] ""
83
  msgstr[1] ""
84
 
85
+ #: limit-login-attempts.php:551
86
  msgid "<strong>ERROR</strong>: Incorrect username or password."
87
  msgstr ""
88
 
89
+ #: limit-login-attempts.php:714
90
  msgid "IP|Internet address"
91
  msgstr ""
92
 
93
+ #: limit-login-attempts.php:714
94
  msgid "Tried to log in as"
95
  msgstr ""
96
 
97
+ #: limit-login-attempts.php:719
98
  #, php-format
99
  msgid "%d lockout"
100
  msgid_plural "%d lockouts"
101
  msgstr[0] ""
102
  msgstr[1] ""
103
 
104
+ #: limit-login-attempts.php:743
105
  msgid "Cleared IP log"
106
  msgstr ""
107
 
108
+ #: limit-login-attempts.php:751
109
  msgid "Reset lockout count"
110
  msgstr ""
111
 
112
+ #: limit-login-attempts.php:759
113
  msgid "Cleared current lockouts"
114
  msgstr ""
115
 
116
+ #: limit-login-attempts.php:788
117
  msgid "Options changed"
118
  msgstr ""
119
 
120
+ #: limit-login-attempts.php:799
121
  msgid "<strong>NOTE:</strong> Only works in Wordpress 2.7 or later"
122
  msgstr ""
123
 
124
+ #: limit-login-attempts.php:815
125
+ #, php-format
126
+ msgid "It appears the site is reached directly (from your IP: %s)"
127
+ msgstr ""
128
+
129
+ #: limit-login-attempts.php:817
130
+ #, php-format
131
+ msgid ""
132
+ "It appears the site is reached through a proxy server (proxy IP: %s, your "
133
+ "IP: %s)"
134
+ msgstr ""
135
+
136
+ #: limit-login-attempts.php:825
137
+ #, php-format
138
+ msgid ""
139
+ "<strong>Current setting appears to be invalid</strong>. Please make sure it "
140
+ "is correct. Further information can be found <a href=\"%s\" title=\"FAQ"
141
+ "\">here</a>"
142
+ msgstr ""
143
+
144
+ #: limit-login-attempts.php:833
145
  msgid "Limit Login Attempts Settings"
146
  msgstr ""
147
 
148
+ #: limit-login-attempts.php:834
149
  msgid "Statistics"
150
  msgstr ""
151
 
152
+ #: limit-login-attempts.php:838
153
  msgid "Total lockouts"
154
  msgstr ""
155
 
156
+ #: limit-login-attempts.php:841
157
  msgid "Reset Counter"
158
  msgstr ""
159
 
160
+ #: limit-login-attempts.php:842
161
  #, php-format
162
  msgid "%d lockout since last reset"
163
  msgid_plural "%d lockouts since last reset"
164
  msgstr[0] ""
165
  msgstr[1] ""
166
 
167
+ #: limit-login-attempts.php:843
168
  msgid "No lockouts yet"
169
  msgstr ""
170
 
171
+ #: limit-login-attempts.php:848
172
  msgid "Active lockouts"
173
  msgstr ""
174
 
175
+ #: limit-login-attempts.php:850
176
  msgid "Restore Lockouts"
177
  msgstr ""
178
 
179
+ #: limit-login-attempts.php:851
180
  #, php-format
181
  msgid "%d IP is currently blocked from trying to log in"
182
  msgstr ""
183
 
184
+ #: limit-login-attempts.php:857
185
+ msgid "Options"
186
+ msgstr ""
187
+
188
+ #: limit-login-attempts.php:861
189
  msgid "Lockout"
190
  msgstr ""
191
 
192
+ #: limit-login-attempts.php:863
193
  msgid "allowed retries"
194
  msgstr ""
195
 
196
+ #: limit-login-attempts.php:864
197
  msgid "minutes lockout"
198
  msgstr ""
199
 
200
+ #: limit-login-attempts.php:865
201
  msgid "lockouts increase lockout time to"
202
  msgstr ""
203
 
204
+ #: limit-login-attempts.php:865
205
  msgid "hours"
206
  msgstr ""
207
 
208
+ #: limit-login-attempts.php:866
209
  msgid "hours until retries are reset"
210
  msgstr ""
211
 
212
+ #: limit-login-attempts.php:870
213
+ msgid "Site connection"
214
+ msgstr ""
215
+
216
+ #: limit-login-attempts.php:876
217
+ msgid "Direct connection"
218
+ msgstr ""
219
+
220
+ #: limit-login-attempts.php:881
221
+ msgid "From behind a reversy proxy"
222
+ msgstr ""
223
+
224
+ #: limit-login-attempts.php:887
225
  msgid "Handle cookie login"
226
  msgstr ""
227
 
228
+ #: limit-login-attempts.php:889
229
  msgid "Yes"
230
  msgstr ""
231
 
232
+ #: limit-login-attempts.php:889
233
  msgid "No"
234
  msgstr ""
235
 
236
+ #: limit-login-attempts.php:894
237
  msgid "Notify on lockout"
238
  msgstr ""
239
 
240
+ #: limit-login-attempts.php:896
241
  msgid "Log IP"
242
  msgstr ""
243
 
244
+ #: limit-login-attempts.php:897
245
  msgid "Email to admin after"
246
  msgstr ""
247
 
248
+ #: limit-login-attempts.php:897
249
  msgid "lockouts"
250
  msgstr ""
251
 
252
+ #: limit-login-attempts.php:902
253
  msgid "Change Options"
254
  msgstr ""
255
 
256
+ #: limit-login-attempts.php:910
257
  msgid "Lockout log"
258
  msgstr ""
259
 
260
+ #: limit-login-attempts.php:914
261
  msgid "Clear Log"
262
  msgstr ""
263
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: johanee
3
  Tags: login, security, authentication
4
  Requires at least: 2.5
5
  Tested up to: 2.7
6
- Stable tag: 1.2
7
 
8
  Limit rate of login attempts, including by way of cookies, for each IP.
9
 
@@ -21,17 +21,30 @@ Features
21
  * (WordPress 2.7+) Limit the number of attempts to log in using auth cookies in same way
22
  * Informs user about remaining retries or lockout time on login page
23
  * Optional logging, optional email notification
 
24
 
25
- Note: Cookie handling reimplemented without replacing pluggable function. Plugin now using standard actions and filters only.
26
 
27
  == Installation ==
28
 
29
  1. Download and extract plugin files to a folder in your wp-content/plugin directory.
30
  2. Activate the plugin through the WordPress admin interface.
31
- 3. Customize the settings from the options page, if desired.
32
 
33
  If you have any questions or problems please make a post here: http://wordpress.org/tags/limit-login-attempts
34
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  == Screenshots ==
36
 
37
  1. Loginscreen after failed login with retries remaining
@@ -41,6 +54,9 @@ If you have any questions or problems please make a post here: http://wordpress.
41
 
42
  == Version History ==
43
 
 
 
 
44
  * Version 1.2
45
  * No longer replaces pluggable function when cookie handling active. Re-implemented using available actions and filters
46
  * Filter error messages during login to avoid information leak regarding available usernames
3
  Tags: login, security, authentication
4
  Requires at least: 2.5
5
  Tested up to: 2.7
6
+ Stable tag: 1.3
7
 
8
  Limit rate of login attempts, including by way of cookies, for each IP.
9
 
21
  * (WordPress 2.7+) Limit the number of attempts to log in using auth cookies in same way
22
  * Informs user about remaining retries or lockout time on login page
23
  * Optional logging, optional email notification
24
+ * Handles server behind reverse proxy
25
 
26
+ Plugin uses standard actions and filters only.
27
 
28
  == Installation ==
29
 
30
  1. Download and extract plugin files to a folder in your wp-content/plugin directory.
31
  2. Activate the plugin through the WordPress admin interface.
32
+ 3. Customize the settings from the options page, if desired. If your server is located behind a reverse proxy make sure to change this setting.
33
 
34
  If you have any questions or problems please make a post here: http://wordpress.org/tags/limit-login-attempts
35
 
36
+ == Frequently Asked Questions ==
37
+
38
+ = What is this option about site connection and reverse proxy? =
39
+
40
+ A reverse proxy is a server in between the site and the Internet (perhaps handling caching or load-balancing). This makes getting the correct client IP to block slightly more complicated.
41
+
42
+ The option default to NOT being behind a proxy -- which should be by far the common case.
43
+
44
+ = How do I know if my site is behind a reverse proxy? =
45
+
46
+ You probably are not or you would know. We show a pretty good guess on the option page. Set the option using this unless you are sure you know better.
47
+
48
  == Screenshots ==
49
 
50
  1. Loginscreen after failed login with retries remaining
54
 
55
  == Version History ==
56
 
57
+ * Version 1.3
58
+ * Support for getting the correct IP for clients while server is behind reverse proxy, thanks to Michael Skerwiderski
59
+ * Added German translation, thanks to Michael Skerwiderski
60
  * Version 1.2
61
  * No longer replaces pluggable function when cookie handling active. Re-implemented using available actions and filters
62
  * Filter error messages during login to avoid information leak regarding available usernames
screenshot-3.gif CHANGED
Binary file
screenshot-4.gif CHANGED
Binary file