IP Geo Block - Version 2.2.9.1

Version Description

  • Bug fix: Blocking Wordfence scanning. (@)
  • Bug fix: Illegal elimination of colon in text field for IP address. (@)
  • Improved: Compatibility with PHP 7 that cause to feel relaxed. (@)
  • Improved: Avoid resetting whitelist on update by InfiniteWP. (@)
  • Trial feature: X-Robots-Tag HTTP header with noindex, nofollow for login page. (@)
Download this release

Release Info

Developer tokkonopapa
Plugin Icon 128x128 IP Geo Block
Version 2.2.9.1
Comparing to
See all releases

Code changes from version 3.0.0 to 2.2.9.1

README.txt CHANGED
@@ -4,38 +4,46 @@ Donate link:
4
  Tags: buddypress, bbPress, comment, pingback, trackback, spam, IP address, geo, geolocation, xmlrpc, login, wp-admin, admin, ajax, security, brute force, firewall, vulnerability
5
  Requires at least: 3.7
6
  Tested up to: 4.6.1
7
- Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- It blocks spam posts, login attempts and malicious access to the back-end
12
- requested from the specific countries, and also prevents zero-day exploit.
13
 
14
  == Description ==
15
 
16
- A considerable number of WordPress vulnerabilities in plugins and themes have
17
- been disclosed every month. You can easily find them at
18
- [WPScan Vulnerability Database](https://wpvulndb.com/ "WPScan Vulnerability Database")
19
- and
20
- [Exploits Database](https://www.exploit-db.com/ "Exploits Database by Offensive Security")
21
- for example. It means that many WordPress sites can be always exposed to the
22
- threats of being exploited caused by those vulnerabilities.
23
 
24
- This plugin protects your site against such threats of attack to the back-end
25
- of your site not only by blocking requests from undesired countries but also
26
- with the original feature 'Zero-day Exploit Prevention' (WP-ZEP).
27
 
28
- And it also blocks undesired requests to the login form (login attempt),
29
- comment form (spam and trackback) and XML-RPC (login attempt and pingback).
 
 
 
 
 
30
 
31
- Up to version 2.x, this plugin had been dedicated to protect the back-end of
32
- your site. From version 3.x, it becomes to be able to block access to your
33
- public facing pages, aka front-end. See
34
- [this analysis](http://www.ipgeoblock.com/codex/analysis-of-attack-vectors.html "Analysis of Attack Vectors | IP Geo Block")
35
- about protection performance against 50 samples of vulnerable plugins.
 
36
 
37
  = Features =
38
 
 
 
 
 
 
 
 
39
  * **Immigration control:**
40
  Access to the basic and important entrances into the back-end such as
41
  `wp-comments-post.php`, `xmlrpc.php`, `wp-login.php`, `wp-signup.php`,
@@ -48,15 +56,16 @@ about protection performance against 50 samples of vulnerable plugins.
48
  (WP-ZEP) is simple but still smart and strong enough to block any malicious
49
  accesses to `wp-admin/*.php`, `plugins/*.php` and `themes/*.php` even from
50
  the permitted countries. It will protect your site against certain types of
51
- attack such as CSRF, LFI, SQLi, XSS and so on, **even if you have some in
52
- your site**. Find more details in
 
53
  [FAQ](https://wordpress.org/plugins/ip-geo-block/faq/ "IP Geo Block - WordPress Plugins")
54
  and
55
  [this plugin's blog](http://www.ipgeoblock.com/article/how-wpzep-works.html "How does WP-ZEP prevent zero-day attack? | IP Geo Block").
56
 
57
  * **Guard against login attempts:**
58
- In order to prevent hacking through the login form and XML-RPC by
59
- brute-force and the reverse-brute-force attacks, the number of login
60
  attempts will be limited per IP address even from the permitted countries.
61
 
62
  * **Protection of wp-config.php:**
@@ -66,9 +75,10 @@ about protection performance against 50 samples of vulnerable plugins.
66
 
67
  * ** Minimize server load against brute-force attacks:**
68
  You can configure this plugin as a
69
- [Must Use Plugins](https://codex.wordpress.org/Must_Use_Plugins "Must Use Plugins « WordPress Codex")
70
  which would be loaded prior to regular plugins and can massively
71
- [reduce the load on server](http://www.ipgeoblock.com/codex/validation-timing.html "Validation timing | IP Geo Block").
 
72
  And furthermore, a cache mechanism for the fetched IP addresses and country
73
  code can help to reduce load on the server against the burst accesses with
74
  a short period of time.
@@ -88,11 +98,15 @@ about protection performance against 50 samples of vulnerable plugins.
88
 
89
  * **Multiple source of IP Geolocation databases:**
90
  Free IP Geolocation database and REST APIs are installed into this plugin to
91
- get a country code from an IP address.
92
- [MaxMind](http://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention")
 
 
 
 
93
  GeoLite free databases and
94
- [IP2Location](http://www.ip2location.com/ "IP Address Geolocation to Identify Website Visitor's Geographical Location")
95
- LITE databases can be available in this plugin. Those will be downloaded
96
  and updated (once a month) automatically.
97
 
98
  * **Customizing response:**
@@ -109,9 +123,7 @@ about protection performance against 50 samples of vulnerable plugins.
109
  This plugin is simple and lite enough to be able to cooperate with other
110
  full spec security plugin such as
111
  [Wordfence Security](https://wordpress.org/plugins/wordfence/ "WordPress › Wordfence Security « WordPress Plugins")
112
- (because country bloking is available only for premium users). See
113
- [this report](http://www.ipgeoblock.com/codex/page-speed-performance.html "Page speed performance | IP Geo Block")
114
- about page speed performance.
115
 
116
  * **Extendability:**
117
  "Settings minimum, Customizability maximum" is the basic concept of this
@@ -124,10 +136,10 @@ about protection performance against 50 samples of vulnerable plugins.
124
 
125
  * **Self blocking prevention and easy rescue:**
126
  Most of users do not prefer themselves to be blocked. This plugin prevents
127
- such a sad thing unless you force it. And futhermore, if such a situation
128
- occurs, you can
129
- [rescue yourself](http://www.ipgeoblock.com/codex/what-should-i-do-when-i-m-locked-out.html "What should I do when I'm locked out? | IP Geo Block")
130
- easily.
131
 
132
  * **Clean uninstallation:**
133
  Nothing is left in your precious mySQL database after uninstallation. So you
@@ -138,9 +150,9 @@ about protection performance against 50 samples of vulnerable plugins.
138
  = Attribution =
139
 
140
  This package includes GeoLite library distributed by MaxMind, available from
141
- [MaxMind](http://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention"),
142
  and also includes IP2Location open source libraries available from
143
- [IP2Location](http://www.ip2location.com "IP Address Geolocation to Identify Website Visitor's Geographical Location").
144
 
145
  Also thanks for providing the following great services and REST APIs for free.
146
 
@@ -155,12 +167,12 @@ Also thanks for providing the following great services and REST APIs for free.
155
  = Development =
156
 
157
  Development of this plugin is promoted at
158
- [WordPress-IP-Geo-Block](https://github.com/tokkonopapa/WordPress-IP-Geo-Block "tokkonopapa/WordPress-IP-Geo-Block - GitHub")
159
- and class libraries to handle geo-location database are developed separately
160
- as "add-in"s at
161
- [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API "tokkonopapa/WordPress-IP-Geo-API - GitHub").
162
  All contributions will always be welcome. Or visit my
163
- [development blog](http://www.ipgeoblock.com/ "IP Geo Block").
164
 
165
  == Installation ==
166
 
@@ -170,12 +182,6 @@ All contributions will always be welcome. Or visit my
170
  2. Search for 'IP Geo Block'
171
  3. Click 'Install Now'
172
  4. Activate the plugin on the Plugin dashboard
173
- 5. Try 'Best practice' button for easy setup at the bottom of this plugin's
174
- setting page.
175
-
176
- Please refer to
177
- [the document](http://www.ipgeoblock.com/codex/ "Codex | IP Geo Block")
178
- or following descriptions for your best setup.
179
 
180
  = Validation rule settings =
181
 
@@ -216,7 +222,7 @@ or following descriptions for your best setup.
216
  Choose **"init" action hook** or **"mu-plugins" (ip-geo-block-mu.php)** to
217
  specify the timing of validation.
218
 
219
- = Back-end target settings =
220
 
221
  * **Comment post**
222
  Validate post to `wp-comment-post.php`. Comment post and trackback will be
@@ -241,25 +247,6 @@ or following descriptions for your best setup.
241
  * **Themes area**
242
  Validate direct access to themes. Typically `wp-content/themes/…/*.php`.
243
 
244
- = Front-end target settings =
245
-
246
- * **Block by country**
247
- Enables validation of country code on public facing pages.
248
-
249
- * **Matching rule**
250
- Same as **Validation target settings** but can be set independently.
251
-
252
- * **Validation target**
253
- Specify the single and archive page by post type, category and tag as
254
- blocking target.
255
-
256
- * **UA string and qualification**
257
- Additional rules targeted at SEO which can specify acceptable requests
258
- based on user agent.
259
-
260
- * **Simulation mode**
261
- You can simulate the 'blocking on front-end' functionality before deploying.
262
-
263
  = Geolocation API settings =
264
 
265
  * **API selection and key settings**
@@ -294,12 +281,12 @@ or following descriptions for your best setup.
294
 
295
  = Cache settings =
296
 
 
 
 
297
  * **Expiration time [sec]**
298
  Maximum time in sec to keep cache.
299
 
300
- * **Garbage collection period [sec]**
301
- Period of garbage collection to clean cache.
302
-
303
  = Submission settings =
304
 
305
  * **Text position on comment form**
@@ -322,10 +309,8 @@ it via FTP.
322
 
323
  `/**
324
  * Invalidate blocking behavior in case yourself is locked out.
325
- *
326
- * How to use: Activate the following code and upload this file via FTP.
327
- */
328
- /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTION -- */
329
  function ip_geo_block_emergency( $validate ) {
330
  $validate['result'] = 'passed';
331
  return $validate;
@@ -337,7 +322,7 @@ add_filter( 'ip-geo-block-admin', 'ip_geo_block_emergency' );
337
  Then "**Clear cache**" at "**Statistics**" tab on your dashborad. Remember
338
  that you should upload the original one to deactivate above feature.
339
 
340
- [This document](http://www.ipgeoblock.com/codex/what-should-i-do-when-i-m-locked-out.html "What should I do when I'm locked out? | IP Geo Block")
341
  can also help you.
342
 
343
  = How can I fix "Unable to write" error? =
@@ -355,48 +340,6 @@ Please refer to
355
  "[How can I fix permission troubles?](http://www.ipgeoblock.com/codex/how-can-i-fix-permission-troubles.html 'How can I fix permission troubles? | IP Geo Block')"
356
  in order to fix this error.
357
 
358
- = Does this plugin works well with caching? =
359
-
360
- For the back-end protection, the answer is YES if you disable caching on
361
- back-end. But for the front-end, the answer depends on the caching method
362
- you are employing.
363
-
364
- Currently, the following cache plugins and configurations can be supported:
365
-
366
- - [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/ "WP Super Cache — WordPress Plugins")
367
- Select "**Use PHP to serve cache files**" and enable "**Late init**".
368
-
369
- - [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/ "W3 Total Cache — WordPress Plugins")
370
- Select "**Disk: Basic**" and enable "**Late initialization**" for page cache.
371
- "**Disk: Enhanced**" (where "**Late initialization**" is not available) in
372
- W3TC 0.9.5.1 seems to work good without any imcompatibility with this plugin.
373
-
374
- - [Vendi Cache](https://wordpress.org/plugins/vendi-cache/ "Vendi Cache — WordPress Plugins")
375
- This was formerly built in Wordfence. Select "**basic caching**" for
376
- Vendi Cache and **"mu-plugin" (ip-geo-block-mu.php)** for IP Geo Block.
377
-
378
- If your plugin serves page caching by `mod_rewrite` via `.htaccess`
379
- (e.g. WP Fastest Cache) or caching by `advanced-cache.php` drop-in
380
- (e.g. Comet Cache) or your hosting provider serves page caching at
381
- server side, "**Blocking on front-end**" might lead to generate
382
- inconsistent pages.
383
-
384
- For more details, please refer to some documents at
385
- "[Blocking on front-end](http://www.ipgeoblock.com/codex/#blocking-on-front-end 'Codex | IP Geo Block')".
386
-
387
- = How can I test this plugin works? =
388
-
389
- The easiest way is to use
390
- [free proxy browser addon](https://www.google.com/search?q=free+proxy+browser+addon "free proxy browser addon - Google Search").
391
- Another one is to use
392
- [http header browser addon](https://www.google.com/search?q=browser+add+on+modify+http+header "browser add on modify http header - Google Search").
393
- You can add an IP address to the `X-Forwarded-For` header to emulate the
394
- access behind the proxy. In this case, you should add `HTTP_X_FORWARDED_FOR`
395
- into the "**$_SERVER keys for extra IPs**" on "**Settings**" tab.
396
-
397
- See more details at
398
- "[How to test prevention of attacks](http://www.ipgeoblock.com/codex/#how-to-test-prevention-of-attacks 'Codex | IP Geo Block')".
399
-
400
  = Do I have to turn on all the selection to enhance security? =
401
 
402
  Yes. Roughly speaking, the strategy of this plugin has been constructed as
@@ -414,21 +357,35 @@ follows:
414
  - **Bad signatures in query**
415
  It blocks the request which has not been covered in the above three.
416
 
417
- Please try "**Best practice**" button at the bottom of this plugin's setting
418
- page for easy setup. And also see more details in
419
  "[The best practice of target settings](http://www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html 'The best practice of target settings | IP Geo Block')".
420
 
421
- = Does this plugin validate all the requests? =
422
 
423
  Unfortunately, no. This plugin can't handle the requests that are not
424
  parsed by WordPress. In other words, a standalone file (PHP, CGI or
425
  something excutable) that is unrelated to WordPress can't be validated
426
- by this plugin even if it is in the WordPress install directory.
427
 
428
  But there're exceptions: When you enable "**Force to load WP core**" for
429
  **Plugins area** or **Themes area**, a standalone PHP file becomes to be
430
- able to be blocked. Sometimes this kind of file has some vulnerabilities.
431
- This function protects your site against such a case.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
 
433
  = Some admin function doesn't work when WP-ZEP is enabled. =
434
 
@@ -439,20 +396,43 @@ location object or meta tag for refresh).
439
  Another is the case related to the content type. This plugin will only support
440
  `application/x-www-form-urlencoded` and `multipart/form-data`.
441
 
442
- The last case is that a ajax/post request comes from not jQuery but flash or
443
  something.
444
 
445
  In those cases, this plugin should bypass WP-ZEP. So please find the unique
446
  strings in the requested queries and add it into the safe query list via the
447
  filter hook `ip-geo-block-bypass-admins`.
448
 
449
- If you can not figure out your troubles, please let me know your issues and
450
- the name of plugins you are using at support forum.
451
 
452
  = Are there any other useful filter hooks? =
453
 
454
- Yes, you can find the list of all hooks and useful samples
455
- [here](http://www.ipgeoblock.com/codex/#filter-hooks "Codex | IP Geo Block").
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
 
457
  == Other Notes ==
458
 
@@ -465,9 +445,15 @@ Yes, you can find the list of all hooks and useful samples
465
  * From [WordPress 4.5](https://make.wordpress.org/core/2016/03/09/comment-changes-in-wordpress-4-5/ "Comment Changes in WordPress 4.5 – Make WordPress Core"),
466
  `rel=nofollow` attribute and value pair had no longer be added to relative
467
  or same domain links within `comment_content`. This change prevents to block
468
- "Server Side Request Forgeries" (not Cross Site but a malicious link in the
469
  comment field of own site).
470
 
 
 
 
 
 
 
471
  == Screenshots ==
472
 
473
  1. **IP Geo Plugin** - Settings.
@@ -478,21 +464,6 @@ Yes, you can find the list of all hooks and useful samples
478
 
479
  == Changelog ==
480
 
481
- = 3.0.0 =
482
- * **New feature:** Add the function of blocking on front-end.
483
- * **New filter hook:** Add `ip-geo-block-public` to extend validation on
484
- front-end.
485
- * **Improvement:** Avoid conflict with "Open external links in a new window"
486
- plugin and some other reason to prevent duplicated window open. For more
487
- detail, see
488
- [this discussion at support forum](https://wordpress.org/support/topic/ip-geoblock-opens-2-windows-on-link-clicks-when-user-is-logged-in/ "Topic: IP Geoblock opens 2 windows on link clicks when user is logged in « WordPress.org Forums").
489
- * **Improvement:** Better compatibility with some plugins, themes and widgets.
490
- * **Improvement:** Deferred execution of SQL command to improve the response.
491
- * **Improvement:** Make the response compatible with WP original when it is
492
- requested by GET method.
493
- * See some details at
494
- [release 3.0.0](http://www.ipgeoblock.com/changelog/release-3.0.0.html "3.0.0 Release Note | IP Geo Block").
495
-
496
  = 2.2.9.1 =
497
  * **Bug fix:** Blocking Wordfence scanning.
498
  ([@](https://wordpress.org/support/topic/wordfence-conflict-2/ "WordFence Conflict"))
@@ -864,6 +835,68 @@ This is a maintenance release.
864
  Malicious access can try to login only 5 times per IP address. This retry
865
  counter can be reset to zero by `Clear statistics` on `Statistics` tab.
866
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
  = 1.0.0 =
868
  * Ready to release.
869
 
4
  Tags: buddypress, bbPress, comment, pingback, trackback, spam, IP address, geo, geolocation, xmlrpc, login, wp-admin, admin, ajax, security, brute force, firewall, vulnerability
5
  Requires at least: 3.7
6
  Tested up to: 4.6.1
7
+ Stable tag: 2.2.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ It blocks any spams, login attempts and malicious access to the admin area
12
+ posted from the specific countries, and also prevents zero-day exploit.
13
 
14
  == Description ==
15
 
16
+ There're some cases of a site being infected. The first one is the case that
17
+ contaminated files are uploaded via FTP or something. In this case, scaning
18
+ and verifing integrity of files in the site is needed to detect the infection.
 
 
 
 
19
 
20
+ The second one is cracking of the login username and password. In this case,
21
+ the rule of right is to strengthen the password.
 
22
 
23
+ The third one may be caused by malicious accesses to the core files. The major
24
+ issue in this case is that a plugin or theme in your site can potentially has
25
+ some vulnerability such as XSS, CSRF, SQLi, LFI and so on. For example, if a
26
+ plugin has Local File Inclusion (LFI) vulnerability, the attackers can easily
27
+ download the `wp-config.php` by simply hitting
28
+ [wp-admin/admin-ajax.php?action=show&file=../wp-config.php](http://blog.sucuri.net/2014/09/slider-revolution-plugin-critical-vulnerability-being-exploited.html "Slider Revolution Plugin Critical Vulnerability Being Exploited | Sucuri Blog")
29
+ on their browser instead of cracking username and password.
30
 
31
+ For these cases, the protection based on the IP address is not a perfect
32
+ solution for everyone. But for some site owners or some certain cases such
33
+ as 'zero-day attack', combination with the original feature 'Zero-day Exploit
34
+ Prevention' can reduce the risk of infection against the specific attacks.
35
+
36
+ That's why this plugin is here.
37
 
38
  = Features =
39
 
40
+ This plugin will examine a country code based on the IP address. If a
41
+ comment, pingback or trackback comes from the specific country, it can be
42
+ blocked before Akismet validate it.
43
+
44
+ With the same mechanism, it fights against burst accesses by brute-force
45
+ and reverse-brute-force attacks to the login form and XML-RPC.
46
+
47
  * **Immigration control:**
48
  Access to the basic and important entrances into the back-end such as
49
  `wp-comments-post.php`, `xmlrpc.php`, `wp-login.php`, `wp-signup.php`,
56
  (WP-ZEP) is simple but still smart and strong enough to block any malicious
57
  accesses to `wp-admin/*.php`, `plugins/*.php` and `themes/*.php` even from
58
  the permitted countries. It will protect your site against certain types of
59
+ attack such as CSRF, LFI, SQLi, XSS and so on, **even if you have some
60
+ [vulnerable plugins or themes](https://wpvulndb.com/ "WPScan Vulnerability Database")
61
+ in your site**. Find more details in
62
  [FAQ](https://wordpress.org/plugins/ip-geo-block/faq/ "IP Geo Block - WordPress Plugins")
63
  and
64
  [this plugin's blog](http://www.ipgeoblock.com/article/how-wpzep-works.html "How does WP-ZEP prevent zero-day attack? | IP Geo Block").
65
 
66
  * **Guard against login attempts:**
67
+ In order to prevent the invasion through the login form and XML-RPC by
68
+ the brute-force and the reverse-brute-force attacks, the number of login
69
  attempts will be limited per IP address even from the permitted countries.
70
 
71
  * **Protection of wp-config.php:**
75
 
76
  * ** Minimize server load against brute-force attacks:**
77
  You can configure this plugin as a
78
+ [Must Use Plugins](https://codex.wordpress.org/Must_Use_Plugins "Must Use Plugins « WordPress Codex")
79
  which would be loaded prior to regular plugins and can massively
80
+ [reduce the load on server](http://www.ipgeoblock.com/codex/validation-timing.html "Validation timing | IP Geo Block")
81
+ especially against brute-force attacks.
82
  And furthermore, a cache mechanism for the fetched IP addresses and country
83
  code can help to reduce load on the server against the burst accesses with
84
  a short period of time.
98
 
99
  * **Multiple source of IP Geolocation databases:**
100
  Free IP Geolocation database and REST APIs are installed into this plugin to
101
+ get a country code from an IP address. There are two types of API which
102
+ support only IPv4 or both IPv4 and IPv6. This plugin will automatically
103
+ choose an appropriate API.
104
+
105
+ * **Database auto updater:**
106
+ [MaxMind](http://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention")
107
  GeoLite free databases and
108
+ [IP2Location](http://www.ip2location.com/ "IP Address Geolocation to Identify Website Visitor's Geographical Location")
109
+ LITE databases can be incorporated with this plugin. Those will be downloaded
110
  and updated (once a month) automatically.
111
 
112
  * **Customizing response:**
123
  This plugin is simple and lite enough to be able to cooperate with other
124
  full spec security plugin such as
125
  [Wordfence Security](https://wordpress.org/plugins/wordfence/ "WordPress › Wordfence Security « WordPress Plugins")
126
+ (because the function of country bloking is available only for premium users).
 
 
127
 
128
  * **Extendability:**
129
  "Settings minimum, Customizability maximum" is the basic concept of this
136
 
137
  * **Self blocking prevention and easy rescue:**
138
  Most of users do not prefer themselves to be blocked. This plugin prevents
139
+ such a sad thing unless you force it.
140
+ ([release 2.1.4](http://www.ipgeoblock.com/changelog/release-2.1.4.html "2.1.4 Release Note"))
141
+ And futhermore, if such a situation occurs, you can rescue yourself easily.
142
+ ([release 2.1.3](http://www.ipgeoblock.com/changelog/release-2.1.3.html "2.1.3 Release Note"))
143
 
144
  * **Clean uninstallation:**
145
  Nothing is left in your precious mySQL database after uninstallation. So you
150
  = Attribution =
151
 
152
  This package includes GeoLite library distributed by MaxMind, available from
153
+ [MaxMind](http://www.maxmind.com "MaxMind - IP Geolocation and Online Fraud Prevention"),
154
  and also includes IP2Location open source libraries available from
155
+ [IP2Location](http://www.ip2location.com "IP Address Geolocation to Identify Website Visitor's Geographical Location").
156
 
157
  Also thanks for providing the following great services and REST APIs for free.
158
 
167
  = Development =
168
 
169
  Development of this plugin is promoted at
170
+ [WordPress-IP-Geo-Block](https://github.com/tokkonopapa/WordPress-IP-Geo-Block "tokkonopapa/WordPress-IP-Geo-Block - GitHub")
171
+ and class libraries to handle geo-location database for Maxmind and IP2Location
172
+ are developed separately as "add-in"s at
173
+ [WordPress-IP-Geo-API](https://github.com/tokkonopapa/WordPress-IP-Geo-API "tokkonopapa/WordPress-IP-Geo-API - GitHub").
174
  All contributions will always be welcome. Or visit my
175
+ [development blog](http://www.ipgeoblock.com/ "IP Geo Block").
176
 
177
  == Installation ==
178
 
182
  2. Search for 'IP Geo Block'
183
  3. Click 'Install Now'
184
  4. Activate the plugin on the Plugin dashboard
 
 
 
 
 
 
185
 
186
  = Validation rule settings =
187
 
222
  Choose **"init" action hook** or **"mu-plugins" (ip-geo-block-mu.php)** to
223
  specify the timing of validation.
224
 
225
+ = Validation target settings =
226
 
227
  * **Comment post**
228
  Validate post to `wp-comment-post.php`. Comment post and trackback will be
247
  * **Themes area**
248
  Validate direct access to themes. Typically `wp-content/themes/…/*.php`.
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  = Geolocation API settings =
251
 
252
  * **API selection and key settings**
281
 
282
  = Cache settings =
283
 
284
+ * **Number of entries**
285
+ Maximum number of IPs to be cached.
286
+
287
  * **Expiration time [sec]**
288
  Maximum time in sec to keep cache.
289
 
 
 
 
290
  = Submission settings =
291
 
292
  * **Text position on comment form**
309
 
310
  `/**
311
  * Invalidate blocking behavior in case yourself is locked out.
312
+ * @note: activate the following code and upload this file via FTP.
313
+ */ /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTION -- */
 
 
314
  function ip_geo_block_emergency( $validate ) {
315
  $validate['result'] = 'passed';
316
  return $validate;
322
  Then "**Clear cache**" at "**Statistics**" tab on your dashborad. Remember
323
  that you should upload the original one to deactivate above feature.
324
 
325
+ [This release note](http://www.ipgeoblock.com/changelog/release-2.1.3.html "2.1.3 Release Note")
326
  can also help you.
327
 
328
  = How can I fix "Unable to write" error? =
340
  "[How can I fix permission troubles?](http://www.ipgeoblock.com/codex/how-can-i-fix-permission-troubles.html 'How can I fix permission troubles? | IP Geo Block')"
341
  in order to fix this error.
342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  = Do I have to turn on all the selection to enhance security? =
344
 
345
  Yes. Roughly speaking, the strategy of this plugin has been constructed as
357
  - **Bad signatures in query**
358
  It blocks the request which has not been covered in the above three.
359
 
360
+ See more details in
 
361
  "[The best practice of target settings](http://www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html 'The best practice of target settings | IP Geo Block')".
362
 
363
+ = Does this plugin validate all the requests to the server? =
364
 
365
  Unfortunately, no. This plugin can't handle the requests that are not
366
  parsed by WordPress. In other words, a standalone file (PHP, CGI or
367
  something excutable) that is unrelated to WordPress can't be validated
368
+ by this plugin even if it is is in the WordPress install directory.
369
 
370
  But there're exceptions: When you enable "**Force to load WP core**" for
371
  **Plugins area** or **Themes area**, a standalone PHP file becomes to be
372
+ able to be blocked. Sometimes this kind of file in a plugin or theme has
373
+ vulnerability. This function is provided against such a case.
374
+
375
+ = How can I test this plugin works? =
376
+
377
+ The easiest way is to use
378
+ [free proxy browser addon](https://www.google.com/search?q=free+proxy+browser+addon "free proxy browser addon - Google Search").
379
+ Another one is to use
380
+ [http header browser addon](https://www.google.com/search?q=browser+add+on+modify+http+header "browser add on modify http header - Google Search").
381
+ You can add an IP address to the `X-Forwarded-For` header to emulate the
382
+ access behind the proxy. In this case, you should add `HTTP_X_FORWARDED_FOR`
383
+ into the "**$_SERVER keys for extra IPs**" on "**Settings**" tab.
384
+
385
+ See more details in
386
+ "[Using VPN browser addon](http://www.ipgeoblock.com/codex/using-vpn-browser-addon.html 'Using VPN browser addon | IP Geo Block')"
387
+ and
388
+ "[Using WordPress post simulator](http://www.ipgeoblock.com/codex/using-post-simulator.html 'Using WordPress post simulator | IP Geo Block')".
389
 
390
  = Some admin function doesn't work when WP-ZEP is enabled. =
391
 
396
  Another is the case related to the content type. This plugin will only support
397
  `application/x-www-form-urlencoded` and `multipart/form-data`.
398
 
399
+ The other case is that a ajax/post request comes from not jQuery but flash or
400
  something.
401
 
402
  In those cases, this plugin should bypass WP-ZEP. So please find the unique
403
  strings in the requested queries and add it into the safe query list via the
404
  filter hook `ip-geo-block-bypass-admins`.
405
 
406
+ If you can not figure out your troubles, please let me know about the plugin
407
+ you are using at the support forum.
408
 
409
  = Are there any other useful filter hooks? =
410
 
411
+ Yes, here is the list of all hooks to extend the feature of this plugin.
412
+
413
+ * `ip-geo-block-ip-addr` : IP address of accessor.
414
+ * `ip-geo-block-headers` : compose http request headers.
415
+ * `ip-geo-block-comment` : validate IP address at `wp-comments-post.php`.
416
+ * `ip-geo-block-xmlrpc` : validate IP address at `xmlrpc.php`.
417
+ * `ip-geo-block-login` : validate IP address at `wp-login.php`.
418
+ * `ip-geo-block-admin` : validate IP address at `wp-admin/*.php`.
419
+ * `ip-geo-block-extra-ips` : white/black list of extra IPs for prior validation.
420
+ * `ip-geo-block-xxxxxx-status` : http response status code for comment|xmlrpc|login|admin.
421
+ * `ip-geo-block-xxxxxx-reason` : http response reason for comment|xmlrpc|login|admin.
422
+ * `ip-geo-block-bypass-admins` : array of admin queries which should bypass WP-ZEP.
423
+ * `ip-geo-block-bypass-plugins` : array of plugin name which should bypass WP-ZEP.
424
+ * `ip-geo-block-bypass-themes` : array of theme name which should bypass WP-ZEP.
425
+ * `ip-geo-block-backup-dir` : full path where log files should be saved.
426
+ * `ip-geo-block-api-dir` : full path to the API class libraries and local DB files.
427
+ * `ip-geo-block-maxmind-dir` : full path where Maxmind GeoLite DB files should be saved.
428
+ * `ip-geo-block-maxmind-zip-ipv4` : url to Maxmind GeoLite DB zip file for IPv4.
429
+ * `ip-geo-block-maxmind-zip-ipv6` : url to Maxmind GeoLite DB zip file for IPv6.
430
+ * `ip-geo-block-ip2location-dir` : full path where IP2Location LITE DB files should be saved.
431
+ * `ip-geo-block-ip2location-path` : full path to IP2Location LITE DB file (IPv4).
432
+ * `ip-geo-block-record-logs` : change the condition of recording logs
433
+
434
+ For more details, see
435
+ [the documents](http://www.ipgeoblock.com/codex/ "Codex | IP Geo Block").
436
 
437
  == Other Notes ==
438
 
445
  * From [WordPress 4.5](https://make.wordpress.org/core/2016/03/09/comment-changes-in-wordpress-4-5/ "Comment Changes in WordPress 4.5 – Make WordPress Core"),
446
  `rel=nofollow` attribute and value pair had no longer be added to relative
447
  or same domain links within `comment_content`. This change prevents to block
448
+ "Self Site Request Forgeries" (not Cross Site but a malicious link in the
449
  comment field of own site).
450
 
451
+ * Wordfence makes an ajax request whose action is `wordfence_testAjax` using
452
+ `wp_remote_post()` and would receive 403 forbidden (it depends on your
453
+ configuration) when you enable "**Prevent Zero-day Exploit**" at "**Admin
454
+ ajax/post**". It does't affect its functionality because the response code
455
+ never be verified.
456
+
457
  == Screenshots ==
458
 
459
  1. **IP Geo Plugin** - Settings.
464
 
465
  == Changelog ==
466
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  = 2.2.9.1 =
468
  * **Bug fix:** Blocking Wordfence scanning.
469
  ([@](https://wordpress.org/support/topic/wordfence-conflict-2/ "WordFence Conflict"))
835
  Malicious access can try to login only 5 times per IP address. This retry
836
  counter can be reset to zero by `Clear statistics` on `Statistics` tab.
837
 
838
+ = 1.4.0 =
839
+ * **New feature:** Added a new class for recording the validation logs to
840
+ analyze posting pattern.
841
+ * Fixed an issue of not being set the own country code at first installation.
842
+ * Fixed an error which occurs when ip address is unknown.
843
+
844
+ = 1.3.1 =
845
+ * **New feature:** Added validation of trackback spam.
846
+ * Added `$_SERVER keys for extra IPs` into options to validate additional
847
+ IP addresses.
848
+ * Removed some redundant codes and corrected all PHP notices and warnings
849
+ which had been suppressed by WordPress.
850
+
851
+ = 1.3.0 =
852
+ * **New feature:** Added validation of pingback.ping through `xmlrpc.php` and
853
+ new option to validate all the IP addresses in HTTP_X_FORWARDED_FOR.
854
+ * **Fixed an issue:** Maxmind database file may be downloaded automatically
855
+ without deactivate/re-activate when upgrade is finished.
856
+ * This is the final version on 1.x. On next release, accesses to `login.php`
857
+ and admin area will be also validated for security purpose.
858
+
859
+ = 1.2.1 =
860
+ * **Fixed an issue:** Option table will be updated automatically without
861
+ deactivate/re-activate when this plugin is upgraded.
862
+ * **A little bit performance improvement:**
863
+ Less memory footprint at the time of downloading Maxmind database file.
864
+ Less sql queries when `Save statistics` is enabled.
865
+
866
+ = 1.2.0 =
867
+ * **New feature:** Added Maxmind GeoLite database auto downloader and updater.
868
+ * The filter hook `ip-geo-block-validate` was discontinued.
869
+ Instead of it, the new filter hook `ip-geo-block-comment` is introduced.
870
+ * **Performance improvement:** IP address is verified at an earlier stage
871
+ than before.
872
+ * **Others:** Fix a bug of handling cache, update status of some REST APIs.
873
+
874
+ = 1.1.1 =
875
+ * Fixed issue of default country code.
876
+ When activating this plugin for the first time, get the country code
877
+ from admin's IP address and set it into white list.
878
+ * Add number of calls in cache of IP address.
879
+
880
+ = 1.1.0 =
881
+ * Implement the cache mechanism to reduce load on the server.
882
+ * Better handling of errors on the search tab so as to facilitate the
883
+ analysis of the service problems.
884
+ * Fixed a bug of setting user agent strings in 1.0.2.
885
+ Now the user agent strings (`WordPress/3.9.2; http://example.com/`)
886
+ becomes to its own (`WordPress/3.9.2; ip-geo-block 1.1.0`).
887
+
888
+ = 1.0.3 =
889
+ * Temporarily stop setting user agent strings to supress a bug in 1.0.2.
890
+
891
+ = 1.0.2 =
892
+ * Update provider settings. Smart-IP.net was terminated, ipinfo.io is now
893
+ available for IPv6.
894
+ * Set the own user agent strings for `WP_Http`.
895
+
896
+ = 1.0.1 =
897
+ * Modify Plugin URL.
898
+ * Add `apply_filters()` to be able to change headers.
899
+
900
  = 1.0.0 =
901
  * Ready to release.
902
 
admin/class-ip-geo-block-admin.php CHANGED
@@ -157,15 +157,6 @@ class IP_Geo_Block_Admin {
157
  'action' => 'ip_geo_block',
158
  'url' => admin_url( 'admin-ajax.php' ),
159
  'nonce' => IP_Geo_Block_Util::create_nonce( $this->get_ajax_action() ),
160
- 'msg' => array(
161
- __( 'Import settings ?', 'ip-geo-block' ),
162
- __( 'Create table ?', 'ip-geo-block' ),
163
- __( 'Delete table ?', 'ip-geo-block' ),
164
- __( 'Clear statistics ?', 'ip-geo-block' ),
165
- __( 'Clear cache ?', 'ip-geo-block' ),
166
- __( 'Clear logs ?', 'ip-geo-block' ),
167
- __( 'This feature is available with HTML5 compliant browsers.', 'ip-geo-block' ),
168
- ),
169
  )
170
  );
171
  wp_enqueue_script( $handle );
@@ -217,7 +208,7 @@ class IP_Geo_Block_Admin {
217
  /**
218
  * Display global notice
219
  *
220
- * Note: Sanitization should be done at the caller
221
  */
222
  public function show_admin_notices() {
223
  $key = IP_Geo_Block::PLUGIN_NAME . '-notice';
@@ -565,11 +556,11 @@ class IP_Geo_Block_Admin {
565
  $default = IP_Geo_Block::get_default();
566
 
567
  // checkboxes not on the form (added after 2.0.0, just in case)
568
- foreach ( array( 'anonymize', 'network_wide' ) as $key )
569
  $output[ $key ] = 0;
570
 
571
  // checkboxes not on the form
572
- foreach ( array( 'admin', 'ajax', 'plugins', 'themes', 'public' ) as $key )
573
  $output['validation'][ $key ] = 0;
574
 
575
  // restore the 'signature' that might be transformed to avoid self blocking
@@ -684,7 +675,7 @@ class IP_Geo_Block_Admin {
684
  else {
685
  $output[ $key ][ $sub ] = ( is_int( $default[ $key ][ $sub ] ) ?
686
  (int)$input[ $key ][ $sub ] :
687
- IP_Geo_Block_Util::kses( trim( $input[ $key ][ $sub ] ), FALSE )
688
  );
689
  }
690
  }
@@ -712,33 +703,12 @@ class IP_Geo_Block_Admin {
712
  array_shift( $val );
713
  $output['signature'] = preg_replace( $key, $val, trim( $output['signature'] ) );
714
 
715
- // 3.0.0 convert country code to upper case, remove redundant spaces
716
- $output['public']['ua_list'] = preg_replace( $key, $val, trim( $output['public']['ua_list'] ) );
717
- $output['public']['ua_list'] = preg_replace( '/([:#]) *([!]+) *([^ ]+) *([,\n]+)/', '$1$2$3$4', $output['public']['ua_list'] );
718
- $output['public']['ua_list'] = preg_replace_callback( '/[:#]\w+/', array( $this, 'strtoupper' ), $output['public']['ua_list'] );
719
-
720
  // reject invalid signature which potentially blocks itself
721
  $output['signature'] = implode( ',', $this->trim( $output['signature'] ) );
722
 
723
  // 2.2.5 exception : convert associative array to simple array
724
- foreach ( array( 'plugins', 'themes' ) as $key ) {
725
  $output['exception'][ $key ] = array_keys( $output['exception'][ $key ] );
726
- }
727
-
728
- // 3.0.0 public : convert country code to upper case
729
- foreach ( array( 'white_list', 'black_list' ) as $key ) {
730
- $output['public'][ $key ] = strtoupper( preg_replace( '/\s/', '', $output['public'][ $key ] ) );
731
- }
732
-
733
- // 3.0.0 exception : trim extra space and comma
734
- foreach ( array( 'admin', 'public', 'includes', 'uploads', 'languages' ) as $key ) {
735
- if ( empty( $output['exception'][ $key ] ) ) {
736
- $output['exception'][ $key ] = $default['exception'][ $key ];
737
- } else {
738
- $output['exception'][ $key ] = ( is_array( $output['exception'][ $key ] ) ?
739
- $output['exception'][ $key ] : $this->trim( $output['exception'][ $key ] ) );
740
- }
741
- }
742
 
743
  return $output;
744
  }
@@ -892,7 +862,7 @@ class IP_Geo_Block_Admin {
892
 
893
  case 'clear-logs':
894
  // Delete logs in MySQL DB
895
- $hook = array( 'comment', 'login', 'admin', 'xmlrpc', 'public' );
896
  $which = in_array( $which, $hook ) ? $which : NULL;
897
  IP_Geo_Block_Logs::clear_logs( $which );
898
  $res = array(
157
  'action' => 'ip_geo_block',
158
  'url' => admin_url( 'admin-ajax.php' ),
159
  'nonce' => IP_Geo_Block_Util::create_nonce( $this->get_ajax_action() ),
 
 
 
 
 
 
 
 
 
160
  )
161
  );
162
  wp_enqueue_script( $handle );
208
  /**
209
  * Display global notice
210
  *
211
+ * @notice: Sanitization should be done at the caller
212
  */
213
  public function show_admin_notices() {
214
  $key = IP_Geo_Block::PLUGIN_NAME . '-notice';
556
  $default = IP_Geo_Block::get_default();
557
 
558
  // checkboxes not on the form (added after 2.0.0, just in case)
559
+ foreach ( array( 'anonymize' ) as $key )
560
  $output[ $key ] = 0;
561
 
562
  // checkboxes not on the form
563
+ foreach ( array( 'admin', 'ajax', 'plugins', 'themes' ) as $key )
564
  $output['validation'][ $key ] = 0;
565
 
566
  // restore the 'signature' that might be transformed to avoid self blocking
675
  else {
676
  $output[ $key ][ $sub ] = ( is_int( $default[ $key ][ $sub ] ) ?
677
  (int)$input[ $key ][ $sub ] :
678
+ IP_Geo_Block_Util::kses( preg_replace( '/[^-,:!*#+=\.\/\w\s]/', '', $input[ $key ][ $sub ] ), FALSE )
679
  );
680
  }
681
  }
703
  array_shift( $val );
704
  $output['signature'] = preg_replace( $key, $val, trim( $output['signature'] ) );
705
 
 
 
 
 
 
706
  // reject invalid signature which potentially blocks itself
707
  $output['signature'] = implode( ',', $this->trim( $output['signature'] ) );
708
 
709
  // 2.2.5 exception : convert associative array to simple array
710
+ foreach ( array( 'plugins', 'themes' ) as $key )
711
  $output['exception'][ $key ] = array_keys( $output['exception'][ $key ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
712
 
713
  return $output;
714
  }
862
 
863
  case 'clear-logs':
864
  // Delete logs in MySQL DB
865
+ $hook = array( 'comment', 'login', 'admin', 'xmlrpc' );
866
  $which = in_array( $which, $hook ) ? $which : NULL;
867
  IP_Geo_Block_Logs::clear_logs( $which );
868
  $res = array(
admin/css/admin.css CHANGED
@@ -57,13 +57,13 @@ textarea.regular-text {
57
  }
58
 
59
  ul.ip_geo_block_settings_folding {
60
- margin: 0.5em 0;
61
  }
62
  ul.ip_geo_block_settings_folding ul {
63
  margin-bottom: 0;
64
  }
65
  ul.ip_geo_block_settings_folding li:first-child {
66
- margin-top: 0.5em;
67
  }
68
  .folding-disable {
69
  pointer-events: none;
@@ -74,10 +74,6 @@ ul.ip_geo_block_settings_folding li:first-child {
74
  font-style:oblique !important;
75
  }
76
 
77
- .ip-geo-block-hide {
78
- display: none;
79
- }
80
-
81
  .ip-geo-block-sup {
82
  margin-left: 0.2em;
83
  display: inline-block;
@@ -301,10 +297,6 @@ table.ip-geo-block-table {
301
  word-wrap: break-word;
302
  word-break: break-all;
303
  }
304
- input#ip_geo_block_settings_filter_logs {
305
- width: 16em;
306
- padding-top: 3px;
307
- }
308
 
309
  /* Scan the country code */
310
  #ip-geo-block-scan-code {
57
  }
58
 
59
  ul.ip_geo_block_settings_folding {
60
+ margin: 0.3em 0;
61
  }
62
  ul.ip_geo_block_settings_folding ul {
63
  margin-bottom: 0;
64
  }
65
  ul.ip_geo_block_settings_folding li:first-child {
66
+ margin-top: 0.6em;
67
  }
68
  .folding-disable {
69
  pointer-events: none;
74
  font-style:oblique !important;
75
  }
76
 
 
 
 
 
77
  .ip-geo-block-sup {
78
  margin-left: 0.2em;
79
  display: inline-block;
297
  word-wrap: break-word;
298
  word-break: break-all;
299
  }
 
 
 
 
300
 
301
  /* Scan the country code */
302
  #ip-geo-block-scan-code {
admin/css/admin.min.css CHANGED
@@ -1,2 +1,2 @@
1
  /* This stylesheet is used to style the admin option form of the plugin. */
2
- .ip-geo-block-log .footable-row-detail-value,table.ip-geo-block-table{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-scan-code,.ip-geo-block-loading,.ip-geo-block-log *{vertical-align:middle}#ip-geo-block-cycle,.ip-geo-block-loading{background-size:16px 16px;background-position:center center;background-repeat:no-repeat}dfn{cursor:help;border-bottom:1px dotted #888}.form-table{margin:0 1em}fieldset.ip-geo-block-field{border:1px solid #ccc;padding:.35em .625em .75em 1em;margin:1.35em 0 1.5em}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:3px;top:15%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:0;top:35%}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.45em}fieldset.ip-geo-block-field .form-table{margin:.5em 0 0}textarea.regular-text{width:25em}ul.ip_geo_block_settings_folding{margin:.5em 0}ul.ip_geo_block_settings_folding ul{margin-bottom:0}ul.ip_geo_block_settings_folding li:first-child{margin-top:.5em}.ip-geo-block-desc,ul.ip-geo-block-list{margin-top:.25em;margin-bottom:.25em}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-hide{display:none}.ip-geo-block-desc,.ip-geo-block-loading,.ip-geo-block-result,.ip-geo-block-sup,.ip-geo-block-title,ul.ip-geo-block-list label{display:inline-block}.ip-geo-block-sup{margin-left:.2em}ul.ip-geo-block-note{list-style:disc;margin-left:1em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPIGAAAAAMLCwkJCQpKSkmJiYoKCgv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAGACwAAAAAEAAQAAADM2i63P4wyklrC0IEKgAQnAdOmGYFBLExwboQWcG2rlHEwTDQLUsUOd2mBxkUCgNKa+dIAAAh+QQJCgAGACwAAAIACgAOAAADLWgWIqHQCABEVLPe1R4MBOFFRFNsRUNsYDFewTC8iixvQ1EMyxjEvyBLODQkAAAh+QQJCgAGACwAAAAACgAOAAADLWi6IRJrCQCECoU0ag1xxeBARuEQ0UUU5DUM7fK+qTEUYR0EcM3Ev51uB7wAEwAh+QQJCgAGACwAAAAADgAKAAADLWi6URQrLiJEkSaM0eqrkLFtAVEEAgAIylAUQ5SuSqCFNZjhWG3zmB8wOJQkAAAh+QQJCgAGACwCAAAADgAKAAADK2hqMRMrLuekCnCU8gqBDCZ2glBcYkSUxIJJgQdaUVDOtAAAAr3oPN/llgAAIfkECQoABgAsBgAAAAoADgAAAytoEdauiz0Yx5BQFTvN2EMXWNgUFETZFIJQdERLiGgZtKohAIDQ7T0RrpEAACH5BAkKAAYALAYAAgAKAA4AAAMqaKoR+609Fie1K4zhZiibNRSg1XAQUXQPIQgE835voQgAIARqh+ummSUBACH5BAUKAAYALAIABgAOAAoAAAMsaLpsES2+F9mEddEgBFbBMGACAAiMOCrlGRBFWBQD2L0dYYjfUuQZEKynSAAAOw==);height:16px;width:16px;margin-left:1em;margin-top:.2em}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px}.ip-geo-block-result{color:#2786C2}#ip-geo-block-map{height:400px;margin:1em auto}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}ul.ip-geo-block-statistics-countries li{width:12em;float:left;text-align:right;padding:.2em}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#f7f7f7}.ip-geo-block-log{width:100%!important}.ip-geo-block-log *{font-size:13px!important;line-height:1.5em}.ip-geo-block-log .pagination ul{border-radius:4px;display:inline-block;margin-bottom:0;margin-left:0;padding-left:0}.ip-geo-block-log .pagination ul>li{display:inline}.ip-geo-block-log .pagination ul>li:first-child>a,.ip-geo-block-log .pagination ul>li:first-child>span{border-bottom-left-radius:4px;border-left-width:1px;border-top-left-radius:4px}.ip-geo-block-log .pagination ul>li:last-child>a,.ip-geo-block-log .pagination ul>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.ip-geo-block-log .pagination ul>.disabled>a,.ip-geo-block-log .pagination ul>.disabled>a:focus,.ip-geo-block-log .pagination ul>.disabled>a:hover,.ip-geo-block-log .pagination ul>.disabled>span{background-color:transparent;color:#999;cursor:default}.ip-geo-block-log .pagination ul>li>a,.ip-geo-block-log .pagination ul>li>span{border-color:#ddd;border-image:none;border-style:solid;border-width:1px 1px 1px 0;float:left;line-height:20px;padding:4px;width:20px;text-decoration:none}.ip-geo-block-log .pagination ul>.active>a,.ip-geo-block-log .pagination ul>.active>span{color:#999;cursor:default}.ip-geo-block-log .pagination ul>.active>a,.ip-geo-block-log .pagination ul>.active>span,.ip-geo-block-log .pagination ul>li>a:focus,.ip-geo-block-log .pagination ul>li>a:hover{background-color:#f7f7f7}.ip-geo-block-log .pagination-centered{text-align:center}.ip-geo-block-log.breakpoint>tbody>tr>td>span.footable-toggle{font-size:60%!important;position:relative;top:-1px;left:2px}.ip-geo-block-log>tbody>tr>td,.ip-geo-block-log>thead>tr>th{padding:4px 0;word-wrap:break-word;width:20%}.ip-geo-block-log>tbody>tr>td:first-child,.ip-geo-block-log>thead>tr>th:first-child{width:25%}.ip-geo-block-log>tbody>tr>td:first-child+td,.ip-geo-block-log>thead>tr>th:first-child+th{width:35%}.ip-geo-block-log>tbody>tr>td:nth-child(5),.ip-geo-block-log>tbody>tr>td:nth-child(5)+td,.ip-geo-block-log>thead>tr>th:nth-child(5),.ip-geo-block-log>thead>tr>th:nth-child(5)+th{width:60%;text-align:left}@media screen and (min-width:1024px){.ip-geo-block-log>tbody>tr>td:nth-child(3),.ip-geo-block-log>tbody>tr>td:nth-child(3)+td,.ip-geo-block-log>thead>tr>th:nth-child(3),.ip-geo-block-log>thead>tr>th:nth-child(3)+th{width:10%}}.ip-geo-block-log>thead>tr>th>span.footable-sort-indicator{color:#888}.ip-geo-block-log>tbody>tr>td{text-align:center}.ip-geo-block-log>tbody>tr>td:first-child{text-align:left}.ip-geo-block-log .footable-row-detail-name,.ip-geo-block-log .footable-row-detail-row,.ip-geo-block-log .footable-row-detail-value{display:block}.ip-geo-block-log .footable-row-detail-value{padding:0 1em 4px}input#ip_geo_block_settings_filter_logs{width:16em;padding-top:3px}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-countries,#ip-geo-block-targets{display:none}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_plugins,#ip_geo_block_settings_validation_themes{margin-top:.5em}#ip-geo-block-back-to-top,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-decode{box-shadow:none;text-decoration:none}#ip-geo-block-decode:active{position:relative;top:1px}#ip-geo-block-cycle{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:text-bottom;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}
1
  /* This stylesheet is used to style the admin option form of the plugin. */
2
+ .ip-geo-block-desc,.ip-geo-block-loading,.ip-geo-block-result,.ip-geo-block-sup,.ip-geo-block-title,ul.ip-geo-block-list label{display:inline-block}.ip-geo-block-log .footable-row-detail-value,table.ip-geo-block-table{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-scan-code,.ip-geo-block-loading,.ip-geo-block-log *{vertical-align:middle}#ip-geo-block-cycle,.ip-geo-block-loading{background-size:16px 16px;background-position:center center;background-repeat:no-repeat}dfn{cursor:help;border-bottom:1px dotted #888}.form-table{margin:0 1em}fieldset.ip-geo-block-field{border:1px solid #ccc;padding:.35em .625em .75em 1em;margin:1.35em 0 1.5em}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:3px;top:15%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:0;top:35%}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.45em}fieldset.ip-geo-block-field .form-table{margin:.5em 0 0}textarea.regular-text{width:25em}ul.ip_geo_block_settings_folding{margin:.3em 0}ul.ip_geo_block_settings_folding ul{margin-bottom:0}ul.ip_geo_block_settings_folding li:first-child{margin-top:.6em}.ip-geo-block-desc,ul.ip-geo-block-list{margin-top:.25em;margin-bottom:.25em}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-sup{margin-left:.2em}ul.ip-geo-block-note{list-style:disc;margin-left:1em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPIGAAAAAMLCwkJCQpKSkmJiYoKCgv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAGACwAAAAAEAAQAAADM2i63P4wyklrC0IEKgAQnAdOmGYFBLExwboQWcG2rlHEwTDQLUsUOd2mBxkUCgNKa+dIAAAh+QQJCgAGACwAAAIACgAOAAADLWgWIqHQCABEVLPe1R4MBOFFRFNsRUNsYDFewTC8iixvQ1EMyxjEvyBLODQkAAAh+QQJCgAGACwAAAAACgAOAAADLWi6IRJrCQCECoU0ag1xxeBARuEQ0UUU5DUM7fK+qTEUYR0EcM3Ev51uB7wAEwAh+QQJCgAGACwAAAAADgAKAAADLWi6URQrLiJEkSaM0eqrkLFtAVEEAgAIylAUQ5SuSqCFNZjhWG3zmB8wOJQkAAAh+QQJCgAGACwCAAAADgAKAAADK2hqMRMrLuekCnCU8gqBDCZ2glBcYkSUxIJJgQdaUVDOtAAAAr3oPN/llgAAIfkECQoABgAsBgAAAAoADgAAAytoEdauiz0Yx5BQFTvN2EMXWNgUFETZFIJQdERLiGgZtKohAIDQ7T0RrpEAACH5BAkKAAYALAYAAgAKAA4AAAMqaKoR+609Fie1K4zhZiibNRSg1XAQUXQPIQgE835voQgAIARqh+ummSUBACH5BAUKAAYALAIABgAOAAoAAAMsaLpsES2+F9mEddEgBFbBMGACAAiMOCrlGRBFWBQD2L0dYYjfUuQZEKynSAAAOw==);height:16px;width:16px;margin-left:1em;margin-top:.2em}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px}.ip-geo-block-result{color:#2786C2}#ip-geo-block-map{height:400px;margin:1em auto}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}ul.ip-geo-block-statistics-countries li{width:12em;float:left;text-align:right;padding:.2em}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#f7f7f7}.ip-geo-block-log{width:100%!important}.ip-geo-block-log *{font-size:13px!important;line-height:1.5em}.ip-geo-block-log .pagination ul{border-radius:4px;display:inline-block;margin-bottom:0;margin-left:0;padding-left:0}.ip-geo-block-log .pagination ul>li{display:inline}.ip-geo-block-log .pagination ul>li:first-child>a,.ip-geo-block-log .pagination ul>li:first-child>span{border-bottom-left-radius:4px;border-left-width:1px;border-top-left-radius:4px}.ip-geo-block-log .pagination ul>li:last-child>a,.ip-geo-block-log .pagination ul>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.ip-geo-block-log .pagination ul>.disabled>a,.ip-geo-block-log .pagination ul>.disabled>a:focus,.ip-geo-block-log .pagination ul>.disabled>a:hover,.ip-geo-block-log .pagination ul>.disabled>span{background-color:transparent;color:#999;cursor:default}.ip-geo-block-log .pagination ul>li>a,.ip-geo-block-log .pagination ul>li>span{border-color:#ddd;border-image:none;border-style:solid;border-width:1px 1px 1px 0;float:left;line-height:20px;padding:4px;width:20px;text-decoration:none}.ip-geo-block-log .pagination ul>.active>a,.ip-geo-block-log .pagination ul>.active>span{color:#999;cursor:default}.ip-geo-block-log .pagination ul>.active>a,.ip-geo-block-log .pagination ul>.active>span,.ip-geo-block-log .pagination ul>li>a:focus,.ip-geo-block-log .pagination ul>li>a:hover{background-color:#f7f7f7}.ip-geo-block-log .pagination-centered{text-align:center}.ip-geo-block-log.breakpoint>tbody>tr>td>span.footable-toggle{font-size:60%!important;position:relative;top:-1px;left:2px}.ip-geo-block-log>tbody>tr>td,.ip-geo-block-log>thead>tr>th{padding:4px 0;word-wrap:break-word;width:20%}.ip-geo-block-log>tbody>tr>td:first-child,.ip-geo-block-log>thead>tr>th:first-child{width:25%}.ip-geo-block-log>tbody>tr>td:first-child+td,.ip-geo-block-log>thead>tr>th:first-child+th{width:35%}.ip-geo-block-log>tbody>tr>td:nth-child(5),.ip-geo-block-log>tbody>tr>td:nth-child(5)+td,.ip-geo-block-log>thead>tr>th:nth-child(5),.ip-geo-block-log>thead>tr>th:nth-child(5)+th{width:60%;text-align:left}@media screen and (min-width:1024px){.ip-geo-block-log>tbody>tr>td:nth-child(3),.ip-geo-block-log>tbody>tr>td:nth-child(3)+td,.ip-geo-block-log>thead>tr>th:nth-child(3),.ip-geo-block-log>thead>tr>th:nth-child(3)+th{width:10%}}.ip-geo-block-log>thead>tr>th>span.footable-sort-indicator{color:#888}.ip-geo-block-log>tbody>tr>td{text-align:center}.ip-geo-block-log>tbody>tr>td:first-child{text-align:left}.ip-geo-block-log .footable-row-detail-name,.ip-geo-block-log .footable-row-detail-row,.ip-geo-block-log .footable-row-detail-value{display:block}.ip-geo-block-log .footable-row-detail-value{padding:0 1em 4px}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-countries,#ip-geo-block-targets{display:none}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_plugins,#ip_geo_block_settings_validation_themes{margin-top:.5em}#ip-geo-block-back-to-top,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-decode{box-shadow:none;text-decoration:none}#ip-geo-block-decode:active{position:relative;top:1px}#ip-geo-block-cycle{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:text-bottom;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}
admin/css/fonts/LICENSE DELETED
@@ -1,4 +0,0 @@
1
- Copyright 2012 Steven Usher & Brad Vincent
2
-
3
- Released under the MIT license
4
- You are free to use FooTable in commercial projects as long as this copyright header is left intact.
 
 
 
 
admin/css/footable.core.min.css CHANGED
@@ -1,10 +1 @@
1
- /*!
2
- * FooTable - Awesome Responsive Tables
3
- * Version : 2.0.3
4
- * http://fooplugins.com/plugins/footable-jquery/
5
- *
6
- * Copyright 2014 Steven Usher & Brad Vincent
7
- * Released under the MIT license
8
- * You are free to use FooTable in commercial projects as long as this copyright header is left intact.
9
- */
10
  @font-face{font-family:'footable';src:url('fonts/footable.eot');src:url('fonts/footable.eot?#iefix') format('embedded-opentype'),url('fonts/footable.woff') format('woff'),url('fonts/footable.ttf') format('truetype'),url('fonts/footable.svg#footable') format('svg');font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:'footable';src:url('fonts/footable.svg#footable') format('svg');font-weight:normal;font-style:normal}}.footable{width:100%}.footable.breakpoint>tbody>tr.footable-detail-show>td{border-bottom:0}.footable.breakpoint>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e001"}.footable.breakpoint>tbody>tr:hover:not(.footable-row-detail){cursor:pointer}.footable.breakpoint>tbody>tr>td.footable-cell-detail{background:#eee;border-top:0}.footable.breakpoint>tbody>tr>td>span.footable-toggle{display:inline-block;font-family:'footable';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-right:5px;font-size:14px;color:#888}.footable.breakpoint>tbody>tr>td>span.footable-toggle:before{content:"\e000"}.footable.breakpoint.toggle-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e005"}.footable.breakpoint.toggle-circle>tbody>tr>td>span.footable-toggle:before{content:"\e004"}.footable.breakpoint.toggle-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e003"}.footable.breakpoint.toggle-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e002"}.footable.breakpoint.toggle-square>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e007"}.footable.breakpoint.toggle-square>tbody>tr>td>span.footable-toggle:before{content:"\e006"}.footable.breakpoint.toggle-square-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e009"}.footable.breakpoint.toggle-square-filled>tbody>tr>td>span.footable-toggle:before{content:"\e008"}.footable.breakpoint.toggle-arrow>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00f"}.footable.breakpoint.toggle-arrow>tbody>tr>td>span.footable-toggle:before{content:"\e011"}.footable.breakpoint.toggle-arrow-small>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e013"}.footable.breakpoint.toggle-arrow-small>tbody>tr>td>span.footable-toggle:before{content:"\e015"}.footable.breakpoint.toggle-arrow-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01b"}.footable.breakpoint.toggle-arrow-circle>tbody>tr>td>span.footable-toggle:before{content:"\e01d"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00b"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e00d"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01f"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr>td>span.footable-toggle:before{content:"\e021"}.footable.breakpoint.toggle-arrow-alt>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e017"}.footable.breakpoint.toggle-arrow-alt>tbody>tr>td>span.footable-toggle:before{content:"\e019"}.footable.breakpoint.toggle-medium>tbody>tr>td>span.footable-toggle{font-size:18px}.footable.breakpoint.toggle-large>tbody>tr>td>span.footable-toggle{font-size:24px}.footable>thead>tr>th{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.footable>thead>tr>th.footable-sortable:hover{cursor:pointer}.footable>thead>tr>th.footable-sorted>span.footable-sort-indicator:before{content:"\e013"}.footable>thead>tr>th.footable-sorted-desc>span.footable-sort-indicator:before{content:"\e012"}.footable>thead>tr>th>span.footable-sort-indicator{display:inline-block;font-family:'footable';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-left:5px}.footable>thead>tr>th>span.footable-sort-indicator:before{content:"\e022"}.footable>tfoot .pagination{margin:0}.footable.no-paging .hide-if-no-paging{display:none}.footable-row-detail-inner{display:table}.footable-row-detail-row{display:table-row;line-height:1.5em}.footable-row-detail-group{display:block;line-height:2em;font-size:1.2em;font-weight:bold}.footable-row-detail-name{display:table-cell;font-weight:bold;padding-right:.5em}.footable-row-detail-value{display:table-cell}.footable-odd{background-color:#f7f7f7}
 
 
 
 
 
 
 
 
 
1
  @font-face{font-family:'footable';src:url('fonts/footable.eot');src:url('fonts/footable.eot?#iefix') format('embedded-opentype'),url('fonts/footable.woff') format('woff'),url('fonts/footable.ttf') format('truetype'),url('fonts/footable.svg#footable') format('svg');font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio:0){@font-face{font-family:'footable';src:url('fonts/footable.svg#footable') format('svg');font-weight:normal;font-style:normal}}.footable{width:100%}.footable.breakpoint>tbody>tr.footable-detail-show>td{border-bottom:0}.footable.breakpoint>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e001"}.footable.breakpoint>tbody>tr:hover:not(.footable-row-detail){cursor:pointer}.footable.breakpoint>tbody>tr>td.footable-cell-detail{background:#eee;border-top:0}.footable.breakpoint>tbody>tr>td>span.footable-toggle{display:inline-block;font-family:'footable';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-right:5px;font-size:14px;color:#888}.footable.breakpoint>tbody>tr>td>span.footable-toggle:before{content:"\e000"}.footable.breakpoint.toggle-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e005"}.footable.breakpoint.toggle-circle>tbody>tr>td>span.footable-toggle:before{content:"\e004"}.footable.breakpoint.toggle-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e003"}.footable.breakpoint.toggle-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e002"}.footable.breakpoint.toggle-square>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e007"}.footable.breakpoint.toggle-square>tbody>tr>td>span.footable-toggle:before{content:"\e006"}.footable.breakpoint.toggle-square-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e009"}.footable.breakpoint.toggle-square-filled>tbody>tr>td>span.footable-toggle:before{content:"\e008"}.footable.breakpoint.toggle-arrow>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00f"}.footable.breakpoint.toggle-arrow>tbody>tr>td>span.footable-toggle:before{content:"\e011"}.footable.breakpoint.toggle-arrow-small>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e013"}.footable.breakpoint.toggle-arrow-small>tbody>tr>td>span.footable-toggle:before{content:"\e015"}.footable.breakpoint.toggle-arrow-circle>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01b"}.footable.breakpoint.toggle-arrow-circle>tbody>tr>td>span.footable-toggle:before{content:"\e01d"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e00b"}.footable.breakpoint.toggle-arrow-circle-filled>tbody>tr>td>span.footable-toggle:before{content:"\e00d"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e01f"}.footable.breakpoint.toggle-arrow-tiny>tbody>tr>td>span.footable-toggle:before{content:"\e021"}.footable.breakpoint.toggle-arrow-alt>tbody>tr.footable-detail-show>td>span.footable-toggle:before{content:"\e017"}.footable.breakpoint.toggle-arrow-alt>tbody>tr>td>span.footable-toggle:before{content:"\e019"}.footable.breakpoint.toggle-medium>tbody>tr>td>span.footable-toggle{font-size:18px}.footable.breakpoint.toggle-large>tbody>tr>td>span.footable-toggle{font-size:24px}.footable>thead>tr>th{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.footable>thead>tr>th.footable-sortable:hover{cursor:pointer}.footable>thead>tr>th.footable-sorted>span.footable-sort-indicator:before{content:"\e013"}.footable>thead>tr>th.footable-sorted-desc>span.footable-sort-indicator:before{content:"\e012"}.footable>thead>tr>th>span.footable-sort-indicator{display:inline-block;font-family:'footable';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;padding-left:5px}.footable>thead>tr>th>span.footable-sort-indicator:before{content:"\e022"}.footable>tfoot .pagination{margin:0}.footable.no-paging .hide-if-no-paging{display:none}.footable-row-detail-inner{display:table}.footable-row-detail-row{display:table-row;line-height:1.5em}.footable-row-detail-group{display:block;line-height:2em;font-size:1.2em;font-weight:bold}.footable-row-detail-name{display:table-cell;font-weight:bold;padding-right:.5em}.footable-row-detail-value{display:table-cell}.footable-odd{background-color:#f7f7f7}
admin/includes/class-admin-ajax.php CHANGED
@@ -238,10 +238,8 @@ class IP_Geo_Block_Admin_Ajax {
238
  '[extra_ips][white_list]',
239
  '[extra_ips][black_list]',
240
  '[signature]',
241
- '[login_fails]',
242
  '[response_code]',
243
- '[response_msg]', // 3.0.0
244
- '[redirect_uri]', // 3.0.0
245
  '[validation][timing]', // 2.2.9
246
  '[validation][proxy]',
247
  '[validation][comment]',
@@ -258,32 +256,10 @@ class IP_Geo_Block_Admin_Ajax {
258
  '[validation][ajax][2]',
259
  '[validation][plugins]',
260
  '[validation][themes]',
261
- '[validation][includes]', // 3.0.0
262
- '[validation][uploads]', // 3.0.0
263
- '[validation][languages]', // 3.0.0
264
- '[validation][public]', // 3.0.0
265
  '[rewrite][plugins]',
266
  '[rewrite][themes]',
267
- '[rewrite][includes]', // 3.0.0
268
- '[rewrite][uploads]', // 3.0.0
269
- '[rewrite][languages]', // 3.0.0
270
  '[exception][plugins][*]', // 2.2.5
271
  '[exception][themes][*]', // 2.2.5
272
- '[exception][admin][$]', // 3.0.0
273
- '[exception][public][$]', // 3.0.0
274
- '[exception][includes][$]', // 3.0.0
275
- '[exception][uploads][$]', // 3.0.0
276
- '[exception][languages][$]', // 3.0.0
277
- '[public][matching_rule]', // 3.0.0
278
- '[public][white_list]', // 3.0.0
279
- '[public][black_list]', // 3.0.0
280
- '[public][target_rule]', // 3.0.0
281
- '[public][target_pages][$]', // 3.0.0
282
- '[public][target_posts][$]', // 3.0.0
283
- '[public][target_cates][$]', // 3.0.0
284
- '[public][target_tags][$]', // 3.0.0
285
- '[public][ua_list]', // 3.0.0
286
- '[public][simulate]', // 3.0.0
287
  '[providers][Maxmind]',
288
  '[providers][IP2Location]',
289
  '[providers][freegeoip.net]',
@@ -301,14 +277,12 @@ class IP_Geo_Block_Admin_Ajax {
301
  '[validation][postkey]',
302
  '[update][auto]',
303
  '[anonymize]',
304
- '[cache_time_gc]', // 3.0.0
305
  '[cache_hold]',
306
  '[cache_time]',
307
  '[comment][pos]',
308
  '[comment][msg]',
309
  '[clean_uninstall]',
310
  '[api_key][GoogleMap]', // 2.2.7
311
- '[network_wide]', // 3.0.0
312
  );
313
  $json = array();
314
  $prfx = IP_Geo_Block::OPTION_NAME;
@@ -343,7 +317,7 @@ class IP_Geo_Block_Admin_Ajax {
343
  foreach ( $input[ $m[1] ][ $m[2] ] as $val ) {
344
  $json[ $prfx.'['.$m[1].']['.$m[2].']'.'['.$val.']' ] = 1;
345
  }
346
- } elseif ( is_array( $input[ $m[1] ][ $m[2] ] ) ) {
347
  $json[ $prfx.'['.$m[1].']['.$m[2].']' ] = implode( ',', $input[ $m[1] ][ $m[2] ] );
348
  }
349
  }
238
  '[extra_ips][white_list]',
239
  '[extra_ips][black_list]',
240
  '[signature]',
 
241
  '[response_code]',
242
+ '[login_fails]',
 
243
  '[validation][timing]', // 2.2.9
244
  '[validation][proxy]',
245
  '[validation][comment]',
256
  '[validation][ajax][2]',
257
  '[validation][plugins]',
258
  '[validation][themes]',
 
 
 
 
259
  '[rewrite][plugins]',
260
  '[rewrite][themes]',
 
 
 
261
  '[exception][plugins][*]', // 2.2.5
262
  '[exception][themes][*]', // 2.2.5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  '[providers][Maxmind]',
264
  '[providers][IP2Location]',
265
  '[providers][freegeoip.net]',
277
  '[validation][postkey]',
278
  '[update][auto]',
279
  '[anonymize]',
 
280
  '[cache_hold]',
281
  '[cache_time]',
282
  '[comment][pos]',
283
  '[comment][msg]',
284
  '[clean_uninstall]',
285
  '[api_key][GoogleMap]', // 2.2.7
 
286
  );
287
  $json = array();
288
  $prfx = IP_Geo_Block::OPTION_NAME;
317
  foreach ( $input[ $m[1] ][ $m[2] ] as $val ) {
318
  $json[ $prfx.'['.$m[1].']['.$m[2].']'.'['.$val.']' ] = 1;
319
  }
320
+ } else {
321
  $json[ $prfx.'['.$m[1].']['.$m[2].']' ] = implode( ',', $input[ $m[1] ][ $m[2] ] );
322
  }
323
  }
admin/includes/tab-accesslog.php CHANGED
@@ -24,23 +24,6 @@ if ( $settings['validation']['reclogs'] ) :
24
  $option_slug
25
  );
26
 
27
- // footable filter
28
- $field = 'filter_logs';
29
- add_settings_field(
30
- $option_name.'_'.$field,
31
- __( 'Filter logs', 'ip-geo-block' ),
32
- array( $context, 'callback_field' ),
33
- $option_slug,
34
- $section,
35
- array(
36
- 'type' => 'text',
37
- 'option' => $option_name,
38
- 'field' => $field,
39
- 'value' => '',
40
- 'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="' . __( 'Reset', 'ip-geo-block' ) . '" href="javascript:void(0)">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
41
- )
42
- );
43
-
44
  $field = 'clear_logs';
45
  add_settings_field(
46
  $option_name.'_'.$field,
@@ -112,12 +95,11 @@ endif;
112
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
113
  'login' => sprintf( $dfn, 'wp-login.php', __( 'Login form', 'ip-geo-block' ) ),
114
  'admin' => sprintf( $dfn, 'wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
115
- 'public' => sprintf( $dfn, 'public facing pages', __( 'Pubic facing pages', 'ip-geo-block' ) ),
116
  );
117
 
118
  foreach ( $target as $key => $val ) {
119
  echo '<h4>', $val, '</h4>', "\n";
120
- echo '<table class="fixed ', IP_Geo_Block::PLUGIN_NAME, '-log" data-page-size="10" data-limit-navigation="5" data-filter="#', IP_Geo_Block::OPTION_NAME, '_filter_logs" data-filter-text-only="true"><thead><tr>', "\n";
121
  echo '<th data-type="numeric">', __( 'Date', 'ip-geo-block' ), '</th>', "\n";
122
  echo '<th>', __( 'IP address', 'ip-geo-block' ), '</th>', "\n";
123
  echo '<th>', __( 'Code', 'ip-geo-block' ), '</th>', "\n";
24
  $option_slug
25
  );
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  $field = 'clear_logs';
28
  add_settings_field(
29
  $option_name.'_'.$field,
95
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
96
  'login' => sprintf( $dfn, 'wp-login.php', __( 'Login form', 'ip-geo-block' ) ),
97
  'admin' => sprintf( $dfn, 'wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
 
98
  );
99
 
100
  foreach ( $target as $key => $val ) {
101
  echo '<h4>', $val, '</h4>', "\n";
102
+ echo '<table class="fixed ', IP_Geo_Block::PLUGIN_NAME, '-log" data-page-size="10" data-limit-navigation="5"><thead><tr>', "\n";
103
  echo '<th data-type="numeric">', __( 'Date', 'ip-geo-block' ), '</th>', "\n";
104
  echo '<th>', __( 'IP address', 'ip-geo-block' ), '</th>', "\n";
105
  echo '<th>', __( 'Code', 'ip-geo-block' ), '</th>', "\n";
admin/includes/tab-settings.php CHANGED
@@ -247,54 +247,21 @@ class IP_Geo_Block_Admin_Tab {
247
  'value' => $options[ $field ],
248
  'list' => array(
249
  200 => '200 OK',
 
250
  301 => '301 Moved Permanently',
251
  302 => '302 Found',
252
- 303 => '303 See Other',
253
  307 => '307 Temporary Redirect',
254
  400 => '400 Bad Request',
255
  403 => '403 Forbidden',
256
  404 => '404 Not Found',
257
  406 => '406 Not Acceptable',
 
258
  500 => '500 Internal Server Error',
259
  503 => '503 Service Unavailable',
260
  ),
261
  )
262
  );
263
 
264
- // Redirect URI
265
- $field = 'redirect_uri';
266
- add_settings_field(
267
- $option_name.'_'.$field,
268
- __( '<dfn title="Specify the URL for response code 2xx and 3xx. Front-end URL on your site would not be blocked to prevent loop of redirection even when you enable [Front-end target settings]. Empty URL is altered to your home.">Redirect URL</dfn>', 'ip-geo-block' ),
269
- array( $context, 'callback_field' ),
270
- $option_slug,
271
- $section,
272
- array(
273
- 'class' => 'ip-geo-block-hide',
274
- 'type' => 'text',
275
- 'option' => $option_name,
276
- 'field' => $field,
277
- 'value' => $options[ $field ],
278
- )
279
- );
280
-
281
- // Response message
282
- $field = 'response_msg';
283
- add_settings_field(
284
- $option_name.'_'.$field,
285
- __( '<dfn title="Specify the message for response code 4xx and 5xx.">Response message</dfn>', 'ip-geo-block' ),
286
- array( $context, 'callback_field' ),
287
- $option_slug,
288
- $section,
289
- array(
290
- 'class' => 'ip-geo-block-hide',
291
- 'type' => 'text',
292
- 'option' => $option_name,
293
- 'field' => $field,
294
- 'value' => $options[ $field ],
295
- )
296
- );
297
-
298
  // Max number of failed login attempts per IP address
299
  $field = 'login_fails';
300
  add_settings_field(
@@ -349,12 +316,12 @@ class IP_Geo_Block_Admin_Tab {
349
  );
350
 
351
  /*----------------------------------------*
352
- * Back-end target settings
353
  *----------------------------------------*/
354
  $section = $plugin_slug . '-validation-target';
355
  add_settings_section(
356
  $section,
357
- __( 'Back-end target settings', 'ip-geo-block' ),
358
  array( __CLASS__, 'note_target' ),
359
  $option_slug
360
  );
@@ -366,8 +333,6 @@ class IP_Geo_Block_Admin_Tab {
366
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
367
  'login' => sprintf( $dfn, 'wp-login.php', __( 'Login form', 'ip-geo-block' ) ),
368
  'admin' => sprintf( $dfn, 'wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
369
- 'others' => sprintf( $dfn, 'executable files', __( 'Other areas', 'ip-geo-block' ) ),
370
- 'public' => sprintf( $dfn, 'public facing pages', __( 'Pubic facing pages', 'ip-geo-block' ) ),
371
  );
372
 
373
  // Comment post
@@ -447,7 +412,6 @@ class IP_Geo_Block_Admin_Tab {
447
  1 => __( 'Block by country', 'ip-geo-block' ),
448
  2 => __( 'Prevent Zero-day Exploit', 'ip-geo-block' ),
449
  );
450
-
451
  $desc = array(
452
  1 => __( 'It will block a request related to the services for both public facing pages and the dashboard.', 'ip-geo-block' ),
453
  2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for the dashboard.', 'ip-geo-block' ),
@@ -492,25 +456,6 @@ class IP_Geo_Block_Admin_Tab {
492
  )
493
  );
494
 
495
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
496
- // Excluded request for specific action or page to bypass WP-ZEP
497
- $key = 'admin';
498
- add_settings_field(
499
- $option_name.'_exception_'.$key,
500
- __( 'Exception for admin action and page', 'ip-geo-block' ),
501
- array( $context, 'callback_field' ),
502
- $option_slug,
503
- $section,
504
- array(
505
- 'type' => 'text',
506
- 'option' => $option_name,
507
- 'field' => 'exception',
508
- 'sub-field' => $key,
509
- 'value' => implode( ',', $options['exception'][ $key ] ),
510
- )
511
- );
512
- endif;
513
-
514
  array_unshift( $list, __( 'Disable', 'ip-geo-block' ) );
515
  $desc = array(
516
  __( 'Regardless of the country code, it will block a malicious request to <code>%s&hellip;/*.php</code>.', 'ip-geo-block' ),
@@ -631,220 +576,6 @@ endif;
631
  )
632
  );
633
 
634
- /*----------------------------------------*
635
- * Front-end settings
636
- *----------------------------------------*/
637
- $section = $plugin_slug . '-public';
638
- add_settings_section(
639
- $section,
640
- __( 'Front-end target settings', 'ip-geo-block' ),
641
- array( __CLASS__, 'note_public' ),
642
- $option_slug
643
- );
644
-
645
- // Public facing pages
646
- $key = 'public';
647
- add_settings_field(
648
- $option_name.'_'.$field.'_'.$key,
649
- $target[ $key ],
650
- array( $context, 'callback_field' ),
651
- $option_slug,
652
- $section,
653
- array(
654
- 'type' => 'checkbox',
655
- 'option' => $option_name,
656
- 'field' => $field,
657
- 'sub-field' => $key,
658
- 'value' => $options[ $field ][ $key ],
659
- 'text' => __( 'Block by country', 'ip-geo-block' ),
660
- )
661
- );
662
-
663
- // Default for matching rule on front-end
664
- $rule[-1] = __( 'Follow &#8220;Validation rule settings&#8221;', 'ip-geo-block' );
665
-
666
- // Matching rule
667
- $field = 'public';
668
- $key = 'matching_rule';
669
- add_settings_field(
670
- $option_name.'_'.$field.'_'.$key,
671
- '<dfn title="' . $rule_desc[0] . '">' . __( 'Matching rule', 'ip-geo-block' ) . '</dfn>',
672
- array( $context, 'callback_field' ),
673
- $option_slug,
674
- $section,
675
- array(
676
- 'type' => 'select',
677
- 'option' => $option_name,
678
- 'field' => $field,
679
- 'sub-field' => $key,
680
- 'value' => $options[ $field ][ $key ],
681
- 'list' => $rule,
682
- )
683
- );
684
-
685
- // Country code for matching rule (ISO 3166-1 alpha-2)
686
- $key = 'white_list';
687
- add_settings_field(
688
- $option_name.'_'.$field.'_'.$key,
689
- $rule_desc[1],
690
- array( $context, 'callback_field' ),
691
- $option_slug,
692
- $section,
693
- array(
694
- 'type' => 'text',
695
- 'option' => $option_name,
696
- 'field' => $field,
697
- 'sub-field' => $key,
698
- 'value' => $options[ $field ][ $key ],
699
- 'after' => $comma[0],
700
- )
701
- );
702
-
703
- $key = 'black_list';
704
- add_settings_field(
705
- $option_name.'_'.$field.'_'.$key,
706
- $rule_desc[2],
707
- array( $context, 'callback_field' ),
708
- $option_slug,
709
- $section,
710
- array(
711
- 'type' => 'text',
712
- 'option' => $option_name,
713
- 'field' => $field,
714
- 'sub-field' => $key,
715
- 'value' => $options[ $field ][ $key ],
716
- 'after' => $comma[0],
717
- )
718
- );
719
-
720
- // List of page
721
- $exception = '<ul class="ip_geo_block_settings_folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual page as a blocking target.">Page</dfn>', 'ip-geo-block' ) . "<li style='display:none'><ul>\n";
722
- $tmp = get_pages();
723
- if ( ! empty( $tmp ) ) {
724
- foreach ( $tmp as $key ) {
725
- $val = esc_attr( $key->post_name );
726
- $exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_pages_' . $val . '" name="ip_geo_block_settings[public][target_pages][' . $val . ']" value="1"' . checked( isset( $options[ $field ]['target_pages'][ $val ] ), TRUE, FALSE ) . ' />';
727
- $exception .= '<label for="ip_geo_block_settings_public_target_pages_' . $val . '">' . esc_html( $key->post_title ) . '</label></li>' . "\n";
728
- }
729
- }
730
- $exception .= '</ul></li></ul>' . "\n";
731
-
732
- // List of post type
733
- $exception .= '<ul class="ip_geo_block_settings_folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual post type on a single page as a blocking target.">Post type</dfn>', 'ip-geo-block' ) . "<li style='display:none'><ul>\n";
734
- $tmp = get_post_types( array( 'public' => TRUE ) );
735
- if ( ! empty( $tmp ) ) {
736
- foreach ( $tmp as $key ) {
737
- $val = esc_attr( $key );
738
- $exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_posts_' . $val . '" name="ip_geo_block_settings[public][target_posts][' . $val . ']" value="1"' . checked( isset( $options[ $field ]['target_posts'][ $val ] ), TRUE, FALSE ) . ' />';
739
- $exception .= '<label for="ip_geo_block_settings_public_target_posts_' . $val . '">' . esc_html( $key ) . '</label></li>' . "\n";
740
- }
741
- }
742
- $exception .= '</ul></li></ul>' . "\n";
743
-
744
- // List of category
745
- $exception .= '<ul class="ip_geo_block_settings_folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual category on a single page or archive page as a blocking target.">Category</dfn>', 'ip-geo-block' ) . "<li style='display:none'><ul>\n";
746
- $tmp = get_categories( array( 'hide_empty' => FALSE ) );
747
- if ( ! empty( $tmp ) ) {
748
- foreach ( $tmp as $key ) {
749
- $val = esc_attr( $key->slug );
750
- $exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_cates_' . $val . '" name="ip_geo_block_settings[public][target_cates][' . $val . ']" value="1"' . checked( isset( $options[ $field ]['target_cates'][ $val ] ), TRUE, FALSE ) . ' />';
751
- $exception .= '<label for="ip_geo_block_settings_public_target_cates_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
752
- }
753
- }
754
- $exception .= '</ul></li></ul>' . "\n";
755
-
756
- // List of tag
757
- $exception .= '<ul class="ip_geo_block_settings_folding ip-geo-block-dropup">' . __( '<dfn title="Specify the individual tag on a single page or archive page as a blocking target.">Tag</dfn>', 'ip-geo-block' ) . "<li style='display:none'><ul>\n";
758
- $tmp = get_tags( array( 'hide_empty' => FALSE ) );
759
- if ( ! empty( $tmp ) ) {
760
- foreach ( $tmp as $key ) {
761
- $val = esc_attr( $key->slug );
762
- $exception .= '<li><input type="checkbox" id="ip_geo_block_settings_public_target_tags_' . $val . '" name="ip_geo_block_settings[public][target_tags][' . $val . ']" value="1"' . checked( isset( $options[ $field ]['target_tags'][ $val ] ), TRUE, FALSE ) . ' />';
763
- $exception .= '<label for="ip_geo_block_settings_public_target_tags_' . $val . '">' . esc_html( $key->name ) . '</label></li>' . "\n";
764
- }
765
- }
766
- $exception .= '</ul></li></ul>' . "\n";
767
-
768
- // Validation target
769
- $key = 'target_rule';
770
- add_settings_field(
771
- $option_name.'_'.$field.'_'.$key,
772
- '<dfn title="' . __( 'Specify the validation target on front-end.', 'ip-geo-block' ) . '">' . __( 'Validation target', 'ip-geo-block' ) . '</dfn>',
773
- array( $context, 'callback_field' ),
774
- $option_slug,
775
- $section,
776
- array(
777
- 'type' => 'select',
778
- 'option' => $option_name,
779
- 'field' => $field,
780
- 'sub-field' => $key,
781
- 'value' => $options[ $field ][ $key ],
782
- 'list' => array(
783
- 0 => __( 'All requests', 'ip-geo-block' ),
784
- 1 => __( 'Specify the targets', 'ip-geo-block' ),
785
- ),
786
- 'desc' => array(
787
- 1 => __( "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;wp&#8221; action hook. It means that this feature would not be compatible with any page caching.", 'ip-geo-block' ),
788
- ),
789
- 'after' => '<div class="ip-geo-block-desc"></div>' . "\n" . $exception,
790
- )
791
- );
792
-
793
- // UA string and qualification
794
- $key = 'ua_list';
795
- add_settings_field(
796
- $option_name.'_'.$field.'_'.$key,
797
- '<dfn title="' . __( 'A part of user agent string and a qualification connected with a separator that indicates an applicable rule and can be &#8220;:&#8221; (pass) or &#8220;#&#8221; (block). A &#8220;qualification&#8221; can be &#8220;DNS&#8221;, &#8220;FEED&#8221;, country code or IP address with CIDR. A negative operator &#8220;!&#8221; can be placed just before a &#8220;qualification&#8221;.', 'ip-geo-block' ) . '">' . __( 'UA string and qualification', 'ip-geo-block' ) . '</dfn>',
798
- array( $context, 'callback_field' ),
799
- $option_slug,
800
- $section,
801
- array(
802
- 'type' => 'textarea',
803
- 'option' => $option_name,
804
- 'field' => $field,
805
- 'sub-field' => $key,
806
- 'value' => $options[ $field ][ $key ],
807
- 'after' => $comma[1],
808
- )
809
- );
810
-
811
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
812
- // Excluded action
813
- $key = 'exception';
814
- add_settings_field(
815
- $option_name.'_'.$key.'_'.$field,
816
- '<dfn title="' . __( 'Specify the name of action that is invariably blocked.', 'ip-geo-block' ) . '">' . __( 'Excluded actions', 'ip-geo-block' ) . '</dfn>',
817
- array( $context, 'callback_field' ),
818
- $option_slug,
819
- $section,
820
- array(
821
- 'type' => 'text',
822
- 'option' => $option_name,
823
- 'field' => $key,
824
- 'sub-field' => $field,
825
- 'value' => implode( ',', $options[ $key ][ $field ] ),
826
- 'after' => $comma[0],
827
- )
828
- );
829
- endif;
830
-
831
- // Simulation mode
832
- $key = 'simulate';
833
- add_settings_field(
834
- $option_name.'_'.$field.'_'.$key,
835
- '<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found at &#8220;Pubic facing pages&#8221; in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
836
- array( $context, 'callback_field' ),
837
- $option_slug,
838
- $section,
839
- array(
840
- 'type' => 'checkbox',
841
- 'option' => $option_name,
842
- 'field' => $field,
843
- 'sub-field' => $key,
844
- 'value' => $options[ $field ][ $key ],
845
- )
846
- );
847
-
848
  /*----------------------------------------*
849
  * Geolocation service settings
850
  *----------------------------------------*/
@@ -1072,7 +803,7 @@ endif;
1072
  $section = $plugin_slug . '-cache';
1073
  add_settings_section(
1074
  $section,
1075
- __( 'IP address cache settings', 'ip-geo-block' ),
1076
  NULL,
1077
  $option_slug
1078
  );
@@ -1093,23 +824,6 @@ endif;
1093
  )
1094
  );
1095
 
1096
- // Garbage collection period [sec]
1097
- $field = 'cache_time_gc';
1098
- add_settings_field(
1099
- $option_name.'_'.$field,
1100
- __( 'Garbage collection period [sec]', 'ip-geo-block' ),
1101
- array( $context, 'callback_field' ),
1102
- $option_slug,
1103
- $section,
1104
- array(
1105
- 'type' => 'text',
1106
- 'option' => $option_name,
1107
- 'field' => $field,
1108
- 'value' => $options[ $field ],
1109
- )
1110
- );
1111
-
1112
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1113
  // Number of entries
1114
  $field = 'cache_hold';
1115
  add_settings_field(
@@ -1125,7 +839,6 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1125
  'value' => $options[ $field ],
1126
  )
1127
  );
1128
- endif;
1129
 
1130
  /*----------------------------------------*
1131
  * Submission settings
@@ -1195,7 +908,8 @@ endif;
1195
  // Google Maps API key
1196
  $field = 'api_key';
1197
  $key = 'GoogleMap';
1198
- if ( 'default' !== $options[ $field ][ $key ] or defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ) {
 
1199
  add_settings_field(
1200
  $option_name.'_'.$field,
1201
  __( '<dfn title="Valid key for Google Maps JavaScript API">Google Maps API key</dfn>', 'ip-geo-block' ),
@@ -1305,12 +1019,4 @@ endif;
1305
  '</ul>', "\n";
1306
  }
1307
 
1308
- public static function note_public() {
1309
- echo
1310
- '<ul class="ip-geo-block-note">', "\n",
1311
- '<li>', __( 'Please refer to the document &#8220;<a href="http://www.ipgeoblock.com/codex/#blocking-on-front-end" title="Codex | IP Geo Block" target=_blank>Blocking on front-end</a>&#8221; for details, including restrictions on cache plugin.', 'ip-geo-block' ), '</li>', "\n",
1312
- '<li>', __( 'If you find any issues or have something to suggest, please feel free to open an issue at <a class="ip-geo-block-link" href="http://wordpress.org/support/plugin/ip-geo-block" title="WordPress &#8250; Support &raquo; IP Geo Block" target=_blank>support forum</a>.', 'ip-geo-block' ), '</li>', "\n",
1313
- '</ul>', "\n";
1314
- }
1315
-
1316
  }
247
  'value' => $options[ $field ],
248
  'list' => array(
249
  200 => '200 OK',
250
+ 205 => '205 Reset Content',
251
  301 => '301 Moved Permanently',
252
  302 => '302 Found',
 
253
  307 => '307 Temporary Redirect',
254
  400 => '400 Bad Request',
255
  403 => '403 Forbidden',
256
  404 => '404 Not Found',
257
  406 => '406 Not Acceptable',
258
+ 410 => '410 Gone',
259
  500 => '500 Internal Server Error',
260
  503 => '503 Service Unavailable',
261
  ),
262
  )
263
  );
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  // Max number of failed login attempts per IP address
266
  $field = 'login_fails';
267
  add_settings_field(
316
  );
317
 
318
  /*----------------------------------------*
319
+ * Validation target settings
320
  *----------------------------------------*/
321
  $section = $plugin_slug . '-validation-target';
322
  add_settings_section(
323
  $section,
324
+ __( 'Validation target settings', 'ip-geo-block' ),
325
  array( __CLASS__, 'note_target' ),
326
  $option_slug
327
  );
333
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
334
  'login' => sprintf( $dfn, 'wp-login.php', __( 'Login form', 'ip-geo-block' ) ),
335
  'admin' => sprintf( $dfn, 'wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
 
 
336
  );
337
 
338
  // Comment post
412
  1 => __( 'Block by country', 'ip-geo-block' ),
413
  2 => __( 'Prevent Zero-day Exploit', 'ip-geo-block' ),
414
  );
 
415
  $desc = array(
416
  1 => __( 'It will block a request related to the services for both public facing pages and the dashboard.', 'ip-geo-block' ),
417
  2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for the dashboard.', 'ip-geo-block' ),
456
  )
457
  );
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  array_unshift( $list, __( 'Disable', 'ip-geo-block' ) );
460
  $desc = array(
461
  __( 'Regardless of the country code, it will block a malicious request to <code>%s&hellip;/*.php</code>.', 'ip-geo-block' ),
576
  )
577
  );
578
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  /*----------------------------------------*
580
  * Geolocation service settings
581
  *----------------------------------------*/
803
  $section = $plugin_slug . '-cache';
804
  add_settings_section(
805
  $section,
806
+ __( 'Cache settings', 'ip-geo-block' ),
807
  NULL,
808
  $option_slug
809
  );
824
  )
825
  );
826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
  // Number of entries
828
  $field = 'cache_hold';
829
  add_settings_field(
839
  'value' => $options[ $field ],
840
  )
841
  );
 
842
 
843
  /*----------------------------------------*
844
  * Submission settings
908
  // Google Maps API key
909
  $field = 'api_key';
910
  $key = 'GoogleMap';
911
+ if ( 'default' !== $options[ $field ][ $key ] or
912
+ defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ) {
913
  add_settings_field(
914
  $option_name.'_'.$field,
915
  __( '<dfn title="Valid key for Google Maps JavaScript API">Google Maps API key</dfn>', 'ip-geo-block' ),
1019
  '</ul>', "\n";
1020
  }
1021
 
 
 
 
 
 
 
 
 
1022
  }
admin/includes/tab-statistics.php CHANGED
@@ -73,7 +73,7 @@ if ( $options['save_statistics'] ) :
73
  $html = '<div id="'.$plugin_slug.'-chart-daily"><table id="'.$plugin_slug.'-targets">';
74
 
75
  $prev = 0;
76
- $targets = array( 'comment', 'xmlrpc', 'login', 'admin', 'public' );
77
  foreach ( $statistics['daystats'] as $key => $val ) {
78
  while( $prev && $key - $prev > DAY_IN_SECONDS ) {
79
  $prev += DAY_IN_SECONDS;
@@ -226,19 +226,21 @@ endif;
226
  foreach ( $cache as $key => $val ) {
227
  if ( $options['anonymize'] )
228
  $key = preg_replace( '/\d{1,3}$/', '***', $key );
229
- $html .= '<tr><td>' . esc_html( $key ) . '</td>';
230
- $html .= '<td>' . esc_html( $val['code'] ) . ' / ';
231
- $html .= '<small>' . esc_html( $val['hook'] ) . '</small></td>';
232
- $html .= '<td>' . ( $time - (int)$val['time'] ) . ' / ';
233
- $html .= $options['save_statistics'] ? (int)$val['call'] : '-';
234
- if ( $debug ) {
235
- $user = get_user_by( 'id', intval( $val['auth'] ) );
236
- $html .= ' ' . esc_html( $user ? $user->get( 'user_login' ) : '' );
237
- $html .= ' / fail:' . intval( $val['fail'] );
238
- }
239
- $html .= '</td></tr>';
240
- if ( ++$count >= $options['cache_hold'] )
241
- break;
 
 
242
  }
243
  }
244
 
73
  $html = '<div id="'.$plugin_slug.'-chart-daily"><table id="'.$plugin_slug.'-targets">';
74
 
75
  $prev = 0;
76
+ $targets = array( 'comment', 'xmlrpc', 'login', 'admin' );
77
  foreach ( $statistics['daystats'] as $key => $val ) {
78
  while( $prev && $key - $prev > DAY_IN_SECONDS ) {
79
  $prev += DAY_IN_SECONDS;
226
  foreach ( $cache as $key => $val ) {
227
  if ( $options['anonymize'] )
228
  $key = preg_replace( '/\d{1,3}$/', '***', $key );
229
+ // if ( empty( $val['auth'] ) || $debug ) { // hide authenticated user
230
+ $html .= '<tr><td>' . esc_html( $key ) . '</td>';
231
+ $html .= '<td>' . esc_html( $val['code'] ) . ' / ';
232
+ $html .= '<small>' . esc_html( $val['hook'] ) . '</small></td>';
233
+ $html .= '<td>' . ( $time - (int)$val['time'] ) . ' / ';
234
+ $html .= $options['save_statistics'] ? (int)$val['call'] : '-';
235
+ if ( $debug ) {
236
+ $user = get_user_by( 'id', intval( $val['auth'] ) );
237
+ $html .= ' ' . esc_html( $user ? $user->get( 'user_login' ) : '' );
238
+ $html .= ' / fail:' . intval( $val['fail'] );
239
+ }
240
+ $html .= '</td></tr>';
241
+ if ( ++$count >= $options['cache_hold'] )
242
+ break;
243
+ // }
244
  }
245
  }
246
 
admin/js/admin.js CHANGED
@@ -47,11 +47,11 @@ var ip_geo_block_time = new Date();
47
  }
48
 
49
  function warning(status, msg) {
50
- window.alert(status ? sanitize(status + ': ' + msg) : msg);
51
  }
52
 
53
  function notice_html5() {
54
- warning(null, IP_GEO_BLOCK.msg[6]);
55
  }
56
 
57
  function redirect(page, tab) {
@@ -183,28 +183,11 @@ var ip_geo_block_time = new Date();
183
  }
184
  };
185
  reader.onerror = function (event) {
186
- warning('Error', event.target.error.code);
187
  };
188
  reader.readAsText(file);
189
  }
190
 
191
- // Enable / Disable at front-end target settings
192
- function set_front_end($this) {
193
- var field = ID('%', 'settings'),
194
- checked = $this.is(':checked'),
195
- select = $(ID('@', 'public_target_rule')),
196
- parent = $this.closest('tr').nextAll('tr');
197
-
198
- // Enable / Disable descendent items
199
- parent.find('[name^="' + field + '"]').prop('disabled', !checked);
200
-
201
- // Enable / Disable description
202
- parent.find(ID('.', 'desc')).css('opacity', checked ? 1.0 : 0.5);
203
-
204
- // Show / Hide validation target
205
- show_folding_list($this, select, field, '1' === select.val() ? true : false);
206
- }
207
-
208
  /**
209
  * jQuery deserialize plugin based on https://gist.github.com/nissuk/835256
210
  *
@@ -250,9 +233,6 @@ var ip_geo_block_time = new Date();
250
  $(ID('@', key)).trigger('change');
251
  });
252
 
253
- // Public facing pages
254
- set_front_end($(ID('@', 'validation_public')));
255
-
256
  // Additional edge case
257
  var i = ID('%', 'settings[providers][IPInfoDB]');
258
  $(ID('@', 'providers_IPInfoDB')).prop('checked', json[i] ? true : false);
@@ -311,7 +291,6 @@ var ip_geo_block_time = new Date();
311
  self.dataLine.addColumn('number', 'xmlrpc');
312
  self.dataLine.addColumn('number', 'login');
313
  self.dataLine.addColumn('number', 'admin');
314
- self.dataLine.addColumn('number', 'public');
315
  var i, j, k, m, n, cells, arr = [],
316
  tr = $(ID('#', 'targets tr'));
317
  for (m = tr.length, i = 0; i < m; i++) {
@@ -369,7 +348,7 @@ var ip_geo_block_time = new Date();
369
 
370
  // Get tab number and check wpCookies in wp-includes/js/utils.js
371
  var cookie = ('undefined' !== typeof wpCookies && wpCookies.getHash(ID('%', 'admin'))) || {},
372
- tabIndex = [0, 9, 10],
373
  tabNo = /&tab=(\d)/.exec(window.location.href);
374
 
375
  tabNo = Number(tabNo && tabNo[1]);
@@ -562,12 +541,6 @@ var ip_geo_block_time = new Date();
562
  return false;
563
  }).trigger('change');
564
 
565
- // Enable / Disable for Public facing pages
566
- $(ID('@', 'validation_public')).on('change', function (event) {
567
- set_front_end($(this));
568
- return false;
569
- }).trigger('change');
570
-
571
  // Export / Import settings
572
  add_hidden_form('validate');
573
 
@@ -624,7 +597,7 @@ var ip_geo_block_time = new Date();
624
 
625
  // Import pre-defined settings
626
  $(ID('#', 'default')).on('click', function (event) {
627
- confirm(IP_GEO_BLOCK.msg[0], function () {
628
  ajax_post('pre-defined', {
629
  cmd: 'import-default'
630
  }, deserialize_json);
@@ -637,7 +610,7 @@ var ip_geo_block_time = new Date();
637
  });
638
 
639
  $(ID('#', 'preferred')).on('click', function (event) {
640
- confirm(IP_GEO_BLOCK.msg[0], function () {
641
  ajax_post('pre-defined', {
642
  cmd: 'import-preferred'
643
  }, deserialize_json);
@@ -647,14 +620,14 @@ var ip_geo_block_time = new Date();
647
 
648
  // Manipulate DB table for validation logs
649
  $(ID('@', 'create_table')).on('click', function (event) {
650
- confirm(IP_GEO_BLOCK.msg[1], function () {
651
  ajax_table('create-table');
652
  });
653
  return false;
654
  });
655
 
656
  $(ID('@', 'delete_table')).on('click', function (event) {
657
- confirm(IP_GEO_BLOCK.msg[2], function () {
658
  ajax_table('delete-table');
659
  });
660
  return false;
@@ -680,24 +653,6 @@ var ip_geo_block_time = new Date();
680
  return false;
681
  });
682
 
683
- // Response message and Redirect URL
684
- $(ID('@', 'response_code')).on('change', function (event) {
685
- var res = parseInt($(this).val() / 100, 10),
686
- elm = $(this).closest('tr').nextAll('tr');
687
- if (res <= 3) { // 2xx, 3xx
688
- elm.each(function (index) {
689
- if (0 === index) { $(this).show(); } // redirect_uri
690
- else if (1 === index) { $(this).hide(); } // response_msg
691
- });
692
- }
693
- else { // 4xx, 5xx
694
- elm.each(function (index) {
695
- if (0 === index) { $(this).hide(); } // redirect_uri
696
- else if (1 === index) { $(this).show(); } // response_msg
697
- });
698
- }
699
- }).trigger('change');
700
-
701
  // Submit
702
  $('#submit').on('click', function (event) {
703
  var elm = $(ID('@', 'signature')),
@@ -707,6 +662,7 @@ var ip_geo_block_time = new Date();
707
  }
708
  return true;
709
  });
 
710
  break;
711
 
712
  /*----------------------------------------
@@ -725,7 +681,7 @@ var ip_geo_block_time = new Date();
725
 
726
  // Statistics
727
  $(ID('@', 'clear_statistics')).on('click', function (event) {
728
- confirm(IP_GEO_BLOCK.msg[3], function () {
729
  ajax_clear('statistics', null);
730
  });
731
  return false;
@@ -733,7 +689,7 @@ var ip_geo_block_time = new Date();
733
 
734
  // Statistics
735
  $(ID('@', 'clear_cache')).on('click', function (event) {
736
- confirm(IP_GEO_BLOCK.msg[4], function () {
737
  ajax_clear('cache', null);
738
  });
739
  return false;
@@ -895,15 +851,9 @@ var ip_geo_block_time = new Date();
895
  });
896
  }
897
 
898
- // Clear filter logs
899
- $(ID('#', 'reset-filter')).on('click', function (event) {
900
- $('.footable').trigger('footable_clear_filter');
901
- return false;
902
- });
903
-
904
  // Validation logs
905
  $(ID('@', 'clear_logs')).on('click', function (event) {
906
- confirm(IP_GEO_BLOCK.msg[5], function () {
907
  ajax_clear('logs', null);
908
  });
909
  return false;
47
  }
48
 
49
  function warning(status, msg) {
50
+ window.alert(sanitize(status + ' ' + msg));
51
  }
52
 
53
  function notice_html5() {
54
+ warning('Notice:', 'This feature is available with HTML5 compliant browsers.');
55
  }
56
 
57
  function redirect(page, tab) {
183
  }
184
  };
185
  reader.onerror = function (event) {
186
+ warning('Error: ', event.target.error.code);
187
  };
188
  reader.readAsText(file);
189
  }
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  /**
192
  * jQuery deserialize plugin based on https://gist.github.com/nissuk/835256
193
  *
233
  $(ID('@', key)).trigger('change');
234
  });
235
 
 
 
 
236
  // Additional edge case
237
  var i = ID('%', 'settings[providers][IPInfoDB]');
238
  $(ID('@', 'providers_IPInfoDB')).prop('checked', json[i] ? true : false);
291
  self.dataLine.addColumn('number', 'xmlrpc');
292
  self.dataLine.addColumn('number', 'login');
293
  self.dataLine.addColumn('number', 'admin');
 
294
  var i, j, k, m, n, cells, arr = [],
295
  tr = $(ID('#', 'targets tr'));
296
  for (m = tr.length, i = 0; i < m; i++) {
348
 
349
  // Get tab number and check wpCookies in wp-includes/js/utils.js
350
  var cookie = ('undefined' !== typeof wpCookies && wpCookies.getHash(ID('%', 'admin'))) || {},
351
+ tabIndex = [0, 8, 9],
352
  tabNo = /&tab=(\d)/.exec(window.location.href);
353
 
354
  tabNo = Number(tabNo && tabNo[1]);
541
  return false;
542
  }).trigger('change');
543
 
 
 
 
 
 
 
544
  // Export / Import settings
545
  add_hidden_form('validate');
546
 
597
 
598
  // Import pre-defined settings
599
  $(ID('#', 'default')).on('click', function (event) {
600
+ confirm('Import settings ?', function () {
601
  ajax_post('pre-defined', {
602
  cmd: 'import-default'
603
  }, deserialize_json);
610
  });
611
 
612
  $(ID('#', 'preferred')).on('click', function (event) {
613
+ confirm('Import settings ?', function () {
614
  ajax_post('pre-defined', {
615
  cmd: 'import-preferred'
616
  }, deserialize_json);
620
 
621
  // Manipulate DB table for validation logs
622
  $(ID('@', 'create_table')).on('click', function (event) {
623
+ confirm('Create table ?', function () {
624
  ajax_table('create-table');
625
  });
626
  return false;
627
  });
628
 
629
  $(ID('@', 'delete_table')).on('click', function (event) {
630
+ confirm('Delete table ?', function () {
631
  ajax_table('delete-table');
632
  });
633
  return false;
653
  return false;
654
  });
655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
656
  // Submit
657
  $('#submit').on('click', function (event) {
658
  var elm = $(ID('@', 'signature')),
662
  }
663
  return true;
664
  });
665
+
666
  break;
667
 
668
  /*----------------------------------------
681
 
682
  // Statistics
683
  $(ID('@', 'clear_statistics')).on('click', function (event) {
684
+ confirm('Clear statistics ?', function () {
685
  ajax_clear('statistics', null);
686
  });
687
  return false;
689
 
690
  // Statistics
691
  $(ID('@', 'clear_cache')).on('click', function (event) {
692
+ confirm('Clear cache ?', function () {
693
  ajax_clear('cache', null);
694
  });
695
  return false;
851
  });
852
  }
853
 
 
 
 
 
 
 
854
  // Validation logs
855
  $(ID('@', 'clear_logs')).on('click', function (event) {
856
+ confirm('Clear logs ?', function () {
857
  ajax_clear('logs', null);
858
  });
859
  return false;
admin/js/admin.min.js CHANGED
@@ -1,6 +1,6 @@
1
- /*
2
- Project: WordPress IP Geo Block
3
- Copyright (c) 2015-2016 tokkonopapa (tokkonopapa@yahoo.com)
4
- This software is released under the MIT License.
5
- */
6
- var ip_geo_block_time=new Date;(function(a,h,t){function b(a,b){var c={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_"};return b?c[a]+b:c.$+a}function d(a){return a?a.toString().replace(/[&<>"']/g,function(a){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[a]}):""}function u(c,l){l?a(b("#",c)).addClass(b("loading")):a(b("#",c)).removeClass(b("loading"))}function n(a,b){h.confirm(d(a))&&b()}function w(a,b){h.alert(a?d(a+": "+b):b)}function x(a,b){if(-1!==location.href.indexOf(a)){var c=d(a)+(b?"&"+d(b):"");"undefined"===typeof IP_GEO_BLOCK_ZEP?h.location.href=c:IP_GEO_BLOCK_ZEP.redirect(c)}}function m(b,l,f,p){b&&u(b,!0);l.action=IP_GEO_BLOCK.action;l.nonce=IP_GEO_BLOCK.nonce;a.post(IP_GEO_BLOCK.url,l).done(function(a,b,c){f(a)}).fail(function(a,b,c){w(b,a.responseText)}).always(function(){b&&(p?a.when.apply(a,p).then(function(){u(b,!1)}):u(b,!1))})}function y(a,b){m(a,{cmd:"clear-"+a,which:b},function(a){x(a.page,a.tab)})}function B(a){m(a,{cmd:a},function(a){x(a.page,a.tab)})}function z(c,l,f,p){var d=!1,d=d|(0===c.prop("type").indexOf("checkbox")&&c.is(":checked")),d=d|(0===c.prop("type").indexOf("select")&&"0"!==c.val());l.nextAll("."+f+"_folding").each(function(c,f){f=a(f);d&&p?f.removeClass("folding-disable"):(f.children("li").hide(),f.addClass("folding-disable"),f.removeClass(b("dropdown")).addClass(b("dropup")))})}function v(a){return String(a).replace(/[a-z]/gi,function(a){return String.fromCharCode(a.charCodeAt(0)+("n">a.toLowerCase()?13:-13))})}function F(a,b){var c=new FileReader;c.onload=function(a){b&&b(a.target.result)};c.onerror=function(a){w("Error",a.target.error.code)};c.readAsText(a)}function C(c){var d=b("%","settings"),f=c.is(":checked"),p=a(b("@","public_target_rule")),h=c.closest("tr").nextAll("tr");h.find('[name^="'+d+'"]').prop("disabled",!f);h.find(b(".","desc")).css("opacity",f?1:.5);z(c,p,d,"1"===p.val()?!0:!1)}function A(c){if(c){"string"===typeof c&&(c=JSON.parse(c));a(b("#","import")).closest("form").deserialize(c);a.each(["matching_rule","validation_login","validation_plugins","validation_themes"],function(c,d){a(b("@",d)).trigger("change")});C(a(b("@","validation_public")));var d=b("%","settings[providers][IPInfoDB]");a(b("@","providers_IPInfoDB")).prop("checked",c[d]?!0:!1)}}function D(c){a("body").append('<div style="display:none"><form method="POST" id="'+b("export-form")+'" action="'+IP_GEO_BLOCK.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+IP_GEO_BLOCK.action+'" /><input type="hidden" name="nonce" value="'+IP_GEO_BLOCK.nonce+'" /><input type="hidden" name="cmd" value="'+c+'" /><input type="hidden" name="data" value="" id="'+b("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+b("file-dialog")+'" /></div>')}a.fn.deserialize=function(b,d){return this.each(function(){var c,d,l,h=this,k={};for(c in b)b.hasOwnProperty(c)&&(d=decodeURIComponent(c),l=decodeURIComponent(b[c]),d in k||(k[d]=[]),k[d].push(l));a.each(k,function(b,e){a('[name="'+b+'"]:input',h).val(e)})})};var E={self:this,drawChart:function(){this.drawPie();this.drawLine()},dataPie:null,viewPie:null,drawPie:function(){if(!self.dataPie){self.dataPie=new google.visualization.DataTable;self.dataPie.addColumn("string","Country");self.dataPie.addColumn("number","Requests");var c;a(b("#","countries li")).each(function(){c=a(this).text().split(":");self.dataPie.addRow([c[0]||"",Number(c[1])])})}self.viewPie||(self.viewPie=new google.visualization.PieChart(t.getElementById(b("chart-countries"))));a(b("#","chart-countries")).width()&&self.viewPie.draw(self.dataPie,{backgroundColor:"#f1f1f1",chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:null,viewLine:null,drawLine:function(){if(!self.dataLine){self.dataLine=new google.visualization.DataTable;self.dataLine.addColumn("date","Date");self.dataLine.addColumn("number","comment");self.dataLine.addColumn("number","xmlrpc");self.dataLine.addColumn("number","login");self.dataLine.addColumn("number","admin");self.dataLine.addColumn("number","public");var c,d,f,h,m,n,k=[],r=a(b("#","targets tr"));h=r.length;for(c=0;c<h;c++)for(k[c]=[],n=r.eq(c).children(),m=n.length,d=0;d<m;d++)f=n.eq(d).text(),k[c].push(d?Number(f):new Date(f));self.dataLine.addRows(k)}self.viewLine||(self.viewLine=new google.visualization.LineChart(t.getElementById(b("chart-daily"))));if(c=a(b("#","chart-daily")).width())c=320<c?!0:!1,self.viewLine.draw(self.dataLine,{backgroundColor:"#f1f1f1",legend:{position:"bottom"},hAxis:{format:"MM/dd"},vAxis:{textPosition:c?"out":"in"},chartArea:{left:c?"10%":0,top:"5%",width:"100%",height:"75%"}})}};a(function(){ip_geo_block_time=new Date-ip_geo_block_time;var c="undefined"!==typeof wpCookies&&wpCookies.getHash(b("%","admin"))||{},l=[0,9,10],f=/&tab=(\d)/.exec(h.location.href),f=Number(f&&f[1]),p=a('<fieldset class="'+b("field")+'"></fieldset>'),u=a("<legend></legend>");a(".form-table").each(function(e){var g=a(this),q=g.prevAll("h2,h3:first"),d=q.nextUntil(g);g.wrap(p).parent().attr("id",b("settings-"+e)).data("ip-geo-block",e).prepend(q.wrap(u).parent());d.insertBefore(g);1>=f&&(e+=l[f],"undefined"===typeof c[e]||c[e]?q.addClass(b("dropdown")).parent().nextAll().show():q.addClass(b("dropup")).parent().nextAll().hide())});var t=function(){a(b("#","chart-countries")).length&&E.drawChart()};1>=f&&(a("form").on("click","h2,h3",function(e){e=a(this);var g=e.closest("fieldset").data("ip-geo-block");e.parent().nextAll().toggle();e.toggleClass(b("dropup")).toggleClass(b("dropdown"));"undefined"!==typeof wpCookies&&(c[g+l[f]]=e.hasClass(b("dropdown"))?"o":"",wpCookies.setHash(b("%","admin"),c,new Date(Date.now()+2592E6)));t();return!1}),a(b("#","toggle-sections")).on("click",function(e){var g,q=0,d=[b("dropdown"),b("dropup")];e=a(b(".","field")).find("h2,h3");e.each(function(b){q+=a(this).hasClass(d[0])});e.each(function(b){g=a(this);g.parent().nextAll().toggle(q?!1:!0);g.removeClass(d.join(" ")).addClass(q?d[1]:d[0]);c[b+l[f]]=q?"":"o"});"undefined"!==typeof wpCookies&&wpCookies.setHash(b("%","admin"),c,new Date(Date.now()+2592E6));t();return!1}));a(b("#","inhibit")).on("submit",function(){return!1});switch(f){case 0:a(b("#","scan-code")).on("click",function(e){var c=a(this).parent();m("scanning",{cmd:"scan-code"},function(a){c.children("ul").length||c.append('<ul id="'+b("code-list")+'"></ul>');c=c.children("ul").empty();var e,g;for(e in a)a.hasOwnProperty(e)&&(e=d(e),"string"===typeof a[e]?g=d(a[e]):(g=d(a[e].code),e='<abbr title="'+d(a[e].type)+'">'+e+"</abbr>"),c.append("<li>"+e+' : <span class="'+b("notice")+'">'+g+"</span></li>"));c.show("slow")});return!1});a(b("@","matching_rule")).on("change",function(){a(b("@","white_list")).closest("tr").toggle("0"===this.value);a(b("@","black_list")).closest("tr").toggle("1"===this.value);return!1}).trigger("change");a(b("@","public_matching_rule")).on("change",function(){a(b("@","public_white_list")).closest("tr").toggle("0"===this.value);a(b("@","public_black_list")).closest("tr").toggle("1"===this.value);return!1}).trigger("change");a(b("@","update")).on("click",function(e){m("download",{cmd:"download"},function(e){var c,g,f;for(c in e)if(e.hasOwnProperty(c))for(g in f=e[c],f)f.hasOwnProperty(g)&&(g=d(g),f[g].filename&&a(b("@",c+"_"+g+"_path")).val(d(f[g].filename)),f[g].message&&a(b("#",c+"-"+g)).text(d(f[g].message)))});return!1});var k=b("%","settings");a(b("@","validation_login")).on("change",function(b){b=a(this);z(b,b,k,!0);return!1}).trigger("change");a('select[name^="'+k+'"]').on("change",function(e){e=a(this);var c,d=b(".","desc");e.next(d).empty();(c=e.children("option:selected").data("desc"))&&e.next(d).html(a.parseHTML(c));z(e,e,k,!0);return!1}).trigger("change");a(b("@","validation_public")).on("change",function(b){C(a(this));return!1}).trigger("change");D("validate");a(b("#","export")).on("click",function(e){if("undefined"===typeof JSON)return w(null,IP_GEO_BLOCK.msg[6]),!1;var c=k,d={};a.each(a(this).closest("form").serializeArray(),function(a,b){-1!==b.name.indexOf(c)&&(d[b.name]=b.value)});d[c+="[signature]"]=h.btoa(v(d[c]));a(b("#","export-data")).val(JSON.stringify(d));a(b("#","export-form")).trigger("submit");return!1});a(b("#","file-dialog")).on("change",function(a){if("undefined"===typeof FileReader)return w(null,IP_GEO_BLOCK.msg[6]),!1;var b;(a=a.target.files[0])&&F(a,function(a){a=JSON.parse(a);b=k+"[signature]";"undefined"!==typeof a[b]&&(a[b]=h.btoa(v(a[b])));m("export-import",{cmd:"validate",data:JSON.stringify(a)},A)});return!1});a(b("#","import")).on("click",function(c){a(b("#","file-dialog")).trigger("click");return!1});a(b("#","default")).on("click",function(a){n(IP_GEO_BLOCK.msg[0],function(){m("pre-defined",{cmd:"import-default"},A)});return!1});a(b("#","preferred")).on("click",function(a){n(IP_GEO_BLOCK.msg[0],function(){m("pre-defined",{cmd:"import-preferred"},A)});return!1});a(b("@","create_table")).on("click",function(a){n(IP_GEO_BLOCK.msg[1],function(){B("create-table")});return!1});a(b("@","delete_table")).on("click",function(a){n(IP_GEO_BLOCK.msg[2],function(){B("delete-table")});return!1});a("ul."+k+"_folding dfn").on("click",function(c){c=a(this).parent();c.children("li").toggle();c.toggleClass(b("dropup")).toggleClass(b("dropdown"));return!1});a(b("#","decode")).on("click",function(c){c=a(b("@","signature"));var e=c.val();-1===e.search(/,/)?c.val(v(h.atob(e))):c.val(h.btoa(v(e)));return!1});a(b("@","response_code")).on("change",function(b){b=parseInt(a(this).val()/100,10);var c=a(this).closest("tr").nextAll("tr");3>=b?c.each(function(b){0===b?a(this).show():1===b&&a(this).hide()}):c.each(function(b){0===b?a(this).hide():1===b&&a(this).show()})}).trigger("change");a("#submit").on("click",function(c){c=a(b("@","signature"));var e=c.val();-1!==e.search(/,/)&&c.val(h.btoa(v(e)));return!0});break;case 1:a(b("#","chart-countries")).length&&"object"===typeof google&&google.load("visualization","1",{packages:["corechart"],callback:function(){E.drawChart()}});a(b("@","clear_statistics")).on("click",function(a){n(IP_GEO_BLOCK.msg[3],function(){y("statistics",null)});return!1});a(b("@","clear_cache")).on("click",function(a){n(IP_GEO_BLOCK.msg[4],function(){y("cache",null)});return!1});break;case 2:a(h).on(b("gmap-error"),function(){m(null,{cmd:"gmap-error"},function(a){x(a.page,a.tab)})});var r=a(b("#","map"));"object"===typeof google?r.each(function(){a(this).GmapRS()}):r.each(function(){a(this).empty().html('<iframe src="//maps.google.com/maps?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});a(b("@","get_location")).on("click",function(c){var e=a(b("#","whois")),f=a(b("@","ip_address")).val();f&&(e.hide().empty(),c=a.whois(f,function(c){var d,f="";for(d=0;d<c.length;d++)f+="<tr><td>"+c[d].name+"</td><td>"+c[d].value+"</td></tr>";e.html('<fieldset class="'+b("field")+'"><legend><h2 id="'+b("whois-title")+'" class="'+b("dropdown")+'">Whois</h2></legend><table class="'+b("table")+'">'+f+"</table><fieldset>").fadeIn("slow");a(b("#","whois-title")).on("click",function(c){c=a(this);c.parent().nextAll().toggle();c.toggleClass(b("dropup")).toggleClass(b("dropdown"));return!1})}),m("loading",{cmd:"search",ip:f,which:a(b("@","service")).val()},function(a){var c,e="",g=d(a.latitude||"0"),h=d(a.longitude||"0"),k=a.latitude||a.longitude?8:2;for(c in a)a.hasOwnProperty(c)&&(c=d(c),e+='<li><span class="'+b("title")+'">'+c+' : </span><span class="'+b("result")+'">'+d(a[c])+"</span></li>");"object"===typeof google?r.GmapRS("addMarker",{latitude:g,longitude:h,title:f,content:"<ul>"+e+"</ul>",show:!0,zoom:k}):r.css({height:"600px",backgroundColor:"transparent"}).empty().html('<ul style="margin-top:0; margin-left:1em;"><li><span class="'+b("title")+'">IP address : </span><span class="'+b("result")+'">'+d(f)+"</span></li>"+e+'</ul><iframe src="//maps.google.com/maps?q='+g+","+h+"&z="+k+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')},[c]));return!1});a(b("@","ip_address")).val()&&a(b("@","get_location")).trigger("click");break;case 4:a(b(".","log")).hide().length&&m("logs",{cmd:"restore",which:null,time:ip_geo_block_time},function(c){for(var e in c)c.hasOwnProperty(e)&&(e=d(e),a(b("#","log-"+e)).html(c[e]));"function"===typeof a.fn.footable&&a(b(".","log")).fadeIn("slow").footable();a('tbody[id^="'+b("$","log-")+'"]').on("click","a",function(b){h.open(h.location.href.replace(/tab=\d/,"tab=2")+"&ip="+a(this).text().replace(/[^\w\.\:\*]/,""));return!1})}),a(b("#","reset-filter")).on("click",function(b){a(".footable").trigger("footable_clear_filter");return!1}),a(b("@","clear_logs")).on("click",function(a){n(IP_GEO_BLOCK.msg[5],function(){y("logs",null)});return!1}),D("export-logs"),a(b("#","export-logs")).on("click",function(c){a(b("#","export-form")).trigger("submit");return!1})}})})(jQuery,window,document);
1
+ /*!
2
+ * Project: WordPress IP Geo Block
3
+ * Copyright (c) 2015-2016 tokkonopapa (tokkonopapa@yahoo.com)
4
+ * This software is released under the MIT License.
5
+ */
6
+ var ip_geo_block_time=new Date;(function(b,h,u){function a(a,b){var c={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_"};return b?c[a]+b:c.$+a}function e(a){return a?a.toString().replace(/[&<>"']/g,function(a){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[a]}):""}function v(c,l){l?b(a("#",c)).addClass(a("loading")):b(a("#",c)).removeClass(a("loading"))}function n(a,b){h.confirm(e(a))&&b()}function A(){h.alert(e("Notice: This feature is available with HTML5 compliant browsers."))}function x(a,b){if(-1!==location.href.indexOf(a)){var c=e(a)+(b?"&"+e(b):"");"undefined"===typeof IP_GEO_BLOCK_ZEP?h.location.href=c:IP_GEO_BLOCK_ZEP.redirect(c)}}function m(a,l,f,r){a&&v(a,!0);l.action=IP_GEO_BLOCK.action;l.nonce=IP_GEO_BLOCK.nonce;b.post(IP_GEO_BLOCK.url,l).done(function(a,b,c){f(a)}).fail(function(a,b,c){h.alert(e(b+" "+a.responseText))}).always(function(){a&&(r?b.when.apply(b,r).then(function(){v(a,!1)}):v(a,!1))})}function y(a,b){m(a,{cmd:"clear-"+a,which:b},function(a){x(a.page,a.tab)})}function B(a){m(a,{cmd:a},function(a){x(a.page,a.tab)})}function C(c,l,f,r){var e=!1,e=e|(0===c.prop("type").indexOf("checkbox")&&c.is(":checked")),e=e|(0===c.prop("type").indexOf("select")&&"0"!==c.val());l.nextAll("."+f+"_folding").each(function(c,f){f=b(f);e&&r?f.removeClass("folding-disable"):(f.children("li").hide(),f.addClass("folding-disable"),f.removeClass(a("dropdown")).addClass(a("dropup")))})}function w(a){return String(a).replace(/[a-z]/gi,function(a){return String.fromCharCode(a.charCodeAt(0)+("n">a.toLowerCase()?13:-13))})}function F(a,b){var c=new FileReader;c.onload=function(a){b&&b(a.target.result)};c.onerror=function(a){h.alert(e("Error: "+a.target.error.code))};c.readAsText(a)}function z(c){if(c){"string"===typeof c&&(c=JSON.parse(c));b(a("#","import")).closest("form").deserialize(c);b.each(["matching_rule","validation_login","validation_plugins","validation_themes"],function(c,e){b(a("@",e)).trigger("change")});var e=a("%","settings[providers][IPInfoDB]");b(a("@","providers_IPInfoDB")).prop("checked",c[e]?!0:!1)}}function D(c){b("body").append('<div style="display:none"><form method="POST" id="'+a("export-form")+'" action="'+IP_GEO_BLOCK.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+IP_GEO_BLOCK.action+'" /><input type="hidden" name="nonce" value="'+IP_GEO_BLOCK.nonce+'" /><input type="hidden" name="cmd" value="'+c+'" /><input type="hidden" name="data" value="" id="'+a("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+a("file-dialog")+'" /></div>')}b.fn.deserialize=function(a,e){return this.each(function(){var c,e,l,h=this,k={};for(c in a)a.hasOwnProperty(c)&&(e=decodeURIComponent(c),l=decodeURIComponent(a[c]),e in k||(k[e]=[]),k[e].push(l));b.each(k,function(a,d){b('[name="'+a+'"]:input',h).val(d)})})};var E={self:this,drawChart:function(){this.drawPie();this.drawLine()},dataPie:null,viewPie:null,drawPie:function(){if(!self.dataPie){self.dataPie=new google.visualization.DataTable;self.dataPie.addColumn("string","Country");self.dataPie.addColumn("number","Requests");var c;b(a("#","countries li")).each(function(){c=b(this).text().split(":");self.dataPie.addRow([c[0]||"",Number(c[1])])})}self.viewPie||(self.viewPie=new google.visualization.PieChart(u.getElementById(a("chart-countries"))));b(a("#","chart-countries")).width()&&self.viewPie.draw(self.dataPie,{backgroundColor:"#f1f1f1",chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:null,viewLine:null,drawLine:function(){if(!self.dataLine){self.dataLine=new google.visualization.DataTable;self.dataLine.addColumn("date","Date");self.dataLine.addColumn("number","comment");self.dataLine.addColumn("number","xmlrpc");self.dataLine.addColumn("number","login");self.dataLine.addColumn("number","admin");var c,e,f,h,m,n,k=[],q=b(a("#","targets tr"));h=q.length;for(c=0;c<h;c++)for(k[c]=[],n=q.eq(c).children(),m=n.length,e=0;e<m;e++)f=n.eq(e).text(),k[c].push(e?Number(f):new Date(f));self.dataLine.addRows(k)}self.viewLine||(self.viewLine=new google.visualization.LineChart(u.getElementById(a("chart-daily"))));if(c=b(a("#","chart-daily")).width())c=320<c?!0:!1,self.viewLine.draw(self.dataLine,{backgroundColor:"#f1f1f1",legend:{position:"bottom"},hAxis:{format:"MM/dd"},vAxis:{textPosition:c?"out":"in"},chartArea:{left:c?"10%":0,top:"5%",width:"100%",height:"75%"}})}};b(function(){ip_geo_block_time=new Date-ip_geo_block_time;var c="undefined"!==typeof wpCookies&&wpCookies.getHash(a("%","admin"))||{},l=[0,8,9],f=/&tab=(\d)/.exec(h.location.href),f=Number(f&&f[1]),r=b('<fieldset class="'+a("field")+'"></fieldset>'),v=b("<legend></legend>");b(".form-table").each(function(d){var g=b(this),p=g.prevAll("h2,h3:first"),t=p.nextUntil(g);g.wrap(r).parent().attr("id",a("settings-"+d)).data("ip-geo-block",d).prepend(p.wrap(v).parent());t.insertBefore(g);1>=f&&(d+=l[f],"undefined"===typeof c[d]||c[d]?p.addClass(a("dropdown")).parent().nextAll().show():p.addClass(a("dropup")).parent().nextAll().hide())});var u=function(){b(a("#","chart-countries")).length&&E.drawChart()};1>=f&&(b("form").on("click","h2,h3",function(d){d=b(this);var g=d.closest("fieldset").data("ip-geo-block");d.parent().nextAll().toggle();d.toggleClass(a("dropup")).toggleClass(a("dropdown"));"undefined"!==typeof wpCookies&&(c[g+l[f]]=d.hasClass(a("dropdown"))?"o":"",wpCookies.setHash(a("%","admin"),c,new Date(Date.now()+2592E6)));u();return!1}),b(a("#","toggle-sections")).on("click",function(d){var g,p=0,t=[a("dropdown"),a("dropup")];d=b(a(".","field")).find("h2,h3");d.each(function(a){p+=b(this).hasClass(t[0])});d.each(function(a){g=b(this);g.parent().nextAll().toggle(p?!1:!0);g.removeClass(t.join(" ")).addClass(p?t[1]:t[0]);c[a+l[f]]=p?"":"o"});"undefined"!==typeof wpCookies&&wpCookies.setHash(a("%","admin"),c,new Date(Date.now()+2592E6));u();return!1}));b(a("#","inhibit")).on("submit",function(){return!1});switch(f){case 0:b(a("#","scan-code")).on("click",function(d){var c=b(this).parent();m("scanning",{cmd:"scan-code"},function(b){c.children("ul").length||c.append('<ul id="'+a("code-list")+'"></ul>');c=c.children("ul").empty();var d,g;for(d in b)b.hasOwnProperty(d)&&(d=e(d),"string"===typeof b[d]?g=e(b[d]):(g=e(b[d].code),d='<abbr title="'+e(b[d].type)+'">'+d+"</abbr>"),c.append("<li>"+d+' : <span class="'+a("notice")+'">'+g+"</span></li>"));c.show("slow")});return!1});b(a("@","matching_rule")).on("change",function(){b(a("@","white_list")).closest("tr").toggle("0"===this.value);b(a("@","black_list")).closest("tr").toggle("1"===this.value);return!1}).trigger("change");b(a("@","public_matching_rule")).on("change",function(){b(a("@","public_white_list")).closest("tr").toggle("0"===this.value);b(a("@","public_black_list")).closest("tr").toggle("1"===this.value);return!1}).trigger("change");b(a("@","update")).on("click",function(d){m("download",{cmd:"download"},function(d){var c,g,f;for(c in d)if(d.hasOwnProperty(c))for(g in f=d[c],f)f.hasOwnProperty(g)&&(g=e(g),f[g].filename&&b(a("@",c+"_"+g+"_path")).val(e(f[g].filename)),f[g].message&&b(a("#",c+"-"+g)).text(e(f[g].message)))});return!1});var k=a("%","settings");b(a("@","validation_login")).on("change",function(a){a=b(this);C(a,a,k,!0);return!1}).trigger("change");b('select[name^="'+k+'"]').on("change",function(d){d=b(this);var c,e=a(".","desc");d.next(e).empty();(c=d.children("option:selected").data("desc"))&&d.next(e).html(b.parseHTML(c));C(d,d,k,!0);return!1}).trigger("change");D("validate");b(a("#","export")).on("click",function(d){if("undefined"===typeof JSON)return A(),!1;var c=k,e={};b.each(b(this).closest("form").serializeArray(),function(a,b){-1!==b.name.indexOf(c)&&(e[b.name]=b.value)});e[c+="[signature]"]=h.btoa(w(e[c]));b(a("#","export-data")).val(JSON.stringify(e));b(a("#","export-form")).trigger("submit");return!1});b(a("#","file-dialog")).on("change",function(a){if("undefined"===typeof FileReader)return A(),!1;var b;(a=a.target.files[0])&&F(a,function(a){a=JSON.parse(a);b=k+"[signature]";"undefined"!==typeof a[b]&&(a[b]=h.btoa(w(a[b])));m("export-import",{cmd:"validate",data:JSON.stringify(a)},z)});return!1});b(a("#","import")).on("click",function(c){b(a("#","file-dialog")).trigger("click");return!1});b(a("#","default")).on("click",function(a){n("Import settings ?",function(){m("pre-defined",{cmd:"import-default"},z)});return!1});b(a("#","preferred")).on("click",function(a){n("Import settings ?",function(){m("pre-defined",{cmd:"import-preferred"},z)});return!1});b(a("@","create_table")).on("click",function(a){n("Create table ?",function(){B("create-table")});return!1});b(a("@","delete_table")).on("click",function(a){n("Delete table ?",function(){B("delete-table")});return!1});b("ul."+k+"_folding dfn").on("click",function(c){c=b(this).parent();c.children("li").toggle();c.toggleClass(a("dropup")).toggleClass(a("dropdown"));return!1});b(a("#","decode")).on("click",function(c){c=b(a("@","signature"));var d=c.val();-1===d.search(/,/)?c.val(w(h.atob(d))):c.val(h.btoa(w(d)));return!1});b("#submit").on("click",function(c){c=b(a("@","signature"));var d=c.val();-1!==d.search(/,/)&&c.val(h.btoa(w(d)));return!0});break;case 1:b(a("#","chart-countries")).length&&"object"===typeof google&&google.load("visualization","1",{packages:["corechart"],callback:function(){E.drawChart()}});b(a("@","clear_statistics")).on("click",function(a){n("Clear statistics ?",function(){y("statistics",null)});return!1});b(a("@","clear_cache")).on("click",function(a){n("Clear cache ?",function(){y("cache",null)});return!1});break;case 2:b(h).on(a("gmap-error"),function(){m(null,{cmd:"gmap-error"},function(a){x(a.page,a.tab)})});var q=b(a("#","map"));"object"===typeof google?q.each(function(){b(this).GmapRS()}):q.each(function(){b(this).empty().html('<iframe src="//maps.google.com/maps?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});b(a("@","get_location")).on("click",function(c){var d=b(a("#","whois")),f=b(a("@","ip_address")).val();f&&(d.hide().empty(),c=b.whois(f,function(c){var e,f="";for(e=0;e<c.length;e++)f+="<tr><td>"+c[e].name+"</td><td>"+c[e].value+"</td></tr>";d.html('<fieldset class="'+a("field")+'"><legend><h2 id="'+a("whois-title")+'" class="'+a("dropdown")+'">Whois</h2></legend><table class="'+a("table")+'">'+f+"</table><fieldset>").fadeIn("slow");b(a("#","whois-title")).on("click",function(c){c=b(this);c.parent().nextAll().toggle();c.toggleClass(a("dropup")).toggleClass(a("dropdown"));return!1})}),m("loading",{cmd:"search",ip:f,which:b(a("@","service")).val()},function(b){var c,d="",g=e(b.latitude||"0"),h=e(b.longitude||"0"),k=b.latitude||b.longitude?8:2;for(c in b)b.hasOwnProperty(c)&&(c=e(c),d+='<li><span class="'+a("title")+'">'+c+' : </span><span class="'+a("result")+'">'+e(b[c])+"</span></li>");"object"===typeof google?q.GmapRS("addMarker",{latitude:g,longitude:h,title:f,content:"<ul>"+d+"</ul>",show:!0,zoom:k}):q.css({height:"600px",backgroundColor:"transparent"}).empty().html('<ul style="margin-top:0; margin-left:1em;"><li><span class="'+a("title")+'">IP address : </span><span class="'+a("result")+'">'+e(f)+"</span></li>"+d+'</ul><iframe src="//maps.google.com/maps?q='+g+","+h+"&z="+k+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')},[c]));return!1});b(a("@","ip_address")).val()&&b(a("@","get_location")).trigger("click");break;case 4:b(a(".","log")).hide().length&&m("logs",{cmd:"restore",which:null,time:ip_geo_block_time},function(c){for(var d in c)c.hasOwnProperty(d)&&(d=e(d),b(a("#","log-"+d)).html(c[d]));"function"===typeof b.fn.footable&&b(a(".","log")).fadeIn("slow").footable();b('tbody[id^="'+a("$","log-")+'"]').on("click","a",function(a){h.open(h.location.href.replace(/tab=\d/,"tab=2")+"&ip="+b(this).text().replace(/[^\w\.\:\*]/,""));return!1})}),b(a("@","clear_logs")).on("click",function(a){n("Clear logs ?",function(){y("logs",null)});return!1}),D("export-logs"),b(a("#","export-logs")).on("click",function(c){b(a("#","export-form")).trigger("submit");return!1})}})})(jQuery,window,document);
admin/js/authenticate.js CHANGED
@@ -188,7 +188,7 @@ var IP_GEO_BLOCK_ZEP = {
188
  var theme_featured = function (data) {
189
  var i = data.length;
190
  while (i-- > 0) {
191
- if (data[i].indexOf('request%5Bbrowse%5D=ip-geo-block-auth') !== -1) {
192
  data[i] = 'request%5Bbrowse%5D=featured'; // correct the parameter
193
  break;
194
  }
@@ -200,7 +200,7 @@ var IP_GEO_BLOCK_ZEP = {
200
  var media_library = function (data) {
201
  var i = data.length;
202
  while (i-- > 0) {
203
- if (data[i].indexOf('query%5Bip-geo-block-auth-nonce%5D=') !== -1) {
204
  delete data[i];
205
  break;
206
  }
@@ -340,13 +340,6 @@ var IP_GEO_BLOCK_ZEP = {
340
  '<meta http-equiv="refresh" content="0; url=' + sanitize(this.href) + '" />'
341
  );
342
  w.document.close();
343
-
344
- // stop event propagation
345
- $this.removeAttr('target');
346
- $this.off('click');
347
- event.preventDefault();
348
- event.stopPropagation();
349
- event.stopImmediatePropagation();
350
  return false;
351
  }
352
  });
@@ -374,14 +367,6 @@ var IP_GEO_BLOCK_ZEP = {
374
  }
375
 
376
  $(function () {
377
- // avoid conflict with "Open external links in a new window"
378
- $('a').each(function () {
379
- if(!this.hasAttribute('onClick')) {
380
- this.setAttribute('onClick', 'javascript:void(0);');
381
- }
382
- });
383
-
384
- // attach event to add nonce
385
  attach_nonce();
386
  IP_GEO_BLOCK_ZEP.init = true;
387
  });
188
  var theme_featured = function (data) {
189
  var i = data.length;
190
  while (i-- > 0) {
191
+ if (data[i].indexOf('request%5Bbrowse%5D=ip-geo-block-auth') === 0) {
192
  data[i] = 'request%5Bbrowse%5D=featured'; // correct the parameter
193
  break;
194
  }
200
  var media_library = function (data) {
201
  var i = data.length;
202
  while (i-- > 0) {
203
+ if (data[i].indexOf('query%5Bip-geo-block-auth-nonce%5D=' + IP_GEO_BLOCK_AUTH.nonce) === 0) {
204
  delete data[i];
205
  break;
206
  }
340
  '<meta http-equiv="refresh" content="0; url=' + sanitize(this.href) + '" />'
341
  );
342
  w.document.close();
 
 
 
 
 
 
 
343
  return false;
344
  }
345
  });
367
  }
368
 
369
  $(function () {
 
 
 
 
 
 
 
 
370
  attach_nonce();
371
  IP_GEO_BLOCK_ZEP.init = true;
372
  });
admin/js/authenticate.min.js CHANGED
@@ -1,6 +1,6 @@
1
- /*
2
- Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
3
- Copyright (c) 2015-2016 tokkonopapa (tokkonopapa@yahoo.com)
4
- This software is released under the MIT License.
5
- */
6
- var IP_GEO_BLOCK_ZEP={init:!1,auth:"ip-geo-block-auth-nonce",nonce:IP_GEO_BLOCK_AUTH.nonce||"",redirect:function(e){-1!==location.href.indexOf(e)&&(this.nonce&&(e+=(0<=e.indexOf("?")?"&":"?")+this.auth+"="+this.nonce),window.location.href=e)}};(function(e,t){function u(a){return a?a.toString().replace(/[&<>"']/g,function(a){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[a]}):""}function g(a){a=decodeURIComponent(a?a.toString():"");a=a.match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:a[1]||"",relative:a[2]||"",authority:a[3]||"",path:a[4]||"",query:a[5]||"",fragment:a[6]||""}}function m(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function h(a,b){"object"!==typeof a&&(a=g(a||location.href));for(var c=a.query?a.query.split("&"):[],d=c.length;0<d--;)if(0===c[d].indexOf(IP_GEO_BLOCK_ZEP.auth)){c.splice(d,1);break}c.push(IP_GEO_BLOCK_ZEP.auth+"="+m(b));a.query=c.join("&");return(a.scheme?a.scheme+":":"")+(a.relative+a.path)+(a.query?"?"+a.query:"")+(a.fragment?"#"+a.fragment:"")}function k(a){a=g(a?a.toString().toLowerCase():location.pathname);var b,c=a,d=[];"object"!==typeof c&&(c=g(c));c=c.path;"/"!==c.charAt(0)&&(b=window.location.pathname,c=b.substring(0,b.lastIndexOf("/")+1)+c);c=c.split("/");""===c[c.length-1]&&(c.pop(),c[c.length-1]+="/");for(b in c)c.hasOwnProperty(b)&&"."!==c[b]&&(".."===c[b]?0<d.length&&d.pop():(1>d.length||""!==c[b])&&d.push(c[b]));b=d.join("/").replace(/\/\//g,"/");if(/https?/.test(a.scheme)||!a.scheme){if(a.authority&&a.authority!==location.host.toLowerCase())return-1;if((a.scheme||a.path||a.query)&&v.test(b))return 1}return 0}function n(a,b,c){var d=b.split(/\s+/);a.each(function(a){for(a=0;a<d.length;a++){var b=e.trim(d[a]).match(/[^\.]+/i)[0],f=e(this),l=b,b=c,f=e._data(f[0]).events[l],l=b?f.splice(f.delegateCount-1,1)[0]:f.pop();f.splice(b?0:f.delegateCount||0,0,l)}})}function p(){var a=IP_GEO_BLOCK_ZEP.nonce;if(a){var b=e("body");b.find("img").each(function(b){b=e(this).attr("src");1===k(b)&&e(this).attr("src",h(b,a))});b.onFirst("click","a",function(b){var c=e(this),d=c.attr("href"),f=c.attr("rel"),g="undefined"!==typeof d?k(d):0;if(1===g)c.attr("href",h(d,!f||0>f.indexOf("nofollow")?a:"nofollow"));else if(-1===g)return d=window.open(),d.document.write('<meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+u(this.href)+'" />'),d.document.close(),c.removeAttr("target"),c.off("click"),b.preventDefault(),b.stopPropagation(),b.stopImmediatePropagation(),!1});b.onFirst("submit","form",function(b){b=e(this);var c=b.attr("action");1===k(c)&&b.attr("action",h(c,a))});if("undefined"!==typeof _wpRevisionsSettings)for(var c=_wpRevisionsSettings.revisionData,d=c.length,b=0;b<d;b++)-1===c[b].restoreUrl.indexOf(IP_GEO_BLOCK_ZEP.auth)&&(_wpRevisionsSettings.revisionData[b].restoreUrl=h(c[b].restoreUrl,a))}}var v=new RegExp("^(?:"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.admin+"|"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.plugins+"|"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.themes+")(?:.*.php|.*/)?$"),q=function(a){for(var b=a.length;0<b--;)if(-1!==a[b].indexOf("request%5Bbrowse%5D=ip-geo-block-auth")){a[b]="request%5Bbrowse%5D=featured";break}return a},r={"upload.php":function(a){for(var b=a.length;0<b--;)if(-1!==a[b].indexOf("query%5Bip-geo-block-auth-nonce%5D=")){delete a[b];break}return a},"theme-install.php":q,"network/theme-install.php":q};e(t).ajaxSend(function(a,b,c){if((a=IP_GEO_BLOCK_ZEP.nonce)&&1===k(c.url))if("undefined"!==typeof window.FormData&&c.data instanceof FormData)c.data.append(IP_GEO_BLOCK_ZEP.auth,a);else if(b=g(c.url),"undefined"===typeof c.data||b.query)c.url=h(b,a);else{b=c.data?c.data.split("&"):[];var d;d=location.pathname;d=d.replace(IP_GEO_BLOCK_AUTH.home+IP_GEO_BLOCK_AUTH.admin,"");(d=r.hasOwnProperty(d)?r[d]:null)&&(b=d(b));b.push(IP_GEO_BLOCK_ZEP.auth+"="+m(a));c.data=b.join("&")}});"undefined"===typeof e.fn.onFirst&&(e.fn.onFirst=function(a,b){var c,d=e(this),f="string"===typeof b;e.fn.on.apply(d,arguments);if("object"===typeof a)for(c in a)a.hasOwnProperty(c)&&n(d,c,f);else"string"===typeof a&&n(d,a,f);return d});e(function(){e("a").each(function(){this.hasAttribute("onClick")||this.setAttribute("onClick","javascript:void(0);")});p();IP_GEO_BLOCK_ZEP.init=!0});e(window).on("error",function(){IP_GEO_BLOCK_ZEP.init||p()})})(jQuery,document);
1
+ /*!
2
+ * Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
3
+ * Copyright (c) 2015-2016 tokkonopapa (tokkonopapa@yahoo.com)
4
+ * This software is released under the MIT License.
5
+ */
6
+ var IP_GEO_BLOCK_ZEP={init:!1,auth:"ip-geo-block-auth-nonce",nonce:IP_GEO_BLOCK_AUTH.nonce||"",redirect:function(e){-1!==location.href.indexOf(e)&&(this.nonce&&(e+=(0<=e.indexOf("?")?"&":"?")+this.auth+"="+this.nonce),window.location.href=e)}};(function(e,t){function u(a){return a?a.toString().replace(/[&<>"']/g,function(a){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[a]}):""}function h(a){a=decodeURIComponent(a?a.toString():"");a=a.match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:a[1]||"",relative:a[2]||"",authority:a[3]||"",path:a[4]||"",query:a[5]||"",fragment:a[6]||""}}function m(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function g(a,b){"object"!==typeof a&&(a=h(a||location.href));for(var c=a.query?a.query.split("&"):[],d=c.length;0<d--;)if(0===c[d].indexOf(IP_GEO_BLOCK_ZEP.auth)){c.splice(d,1);break}c.push(IP_GEO_BLOCK_ZEP.auth+"="+m(b));a.query=c.join("&");return(a.scheme?a.scheme+":":"")+(a.relative+a.path)+(a.query?"?"+a.query:"")+(a.fragment?"#"+a.fragment:"")}function k(a){a=h(a?a.toString().toLowerCase():location.pathname);var b,c=a,d=[];"object"!==typeof c&&(c=h(c));c=c.path;"/"!==c.charAt(0)&&(b=window.location.pathname,c=b.substring(0,b.lastIndexOf("/")+1)+c);c=c.split("/");""===c[c.length-1]&&(c.pop(),c[c.length-1]+="/");for(b in c)c.hasOwnProperty(b)&&"."!==c[b]&&(".."===c[b]?0<d.length&&d.pop():(1>d.length||""!==c[b])&&d.push(c[b]));b=d.join("/").replace(/\/\//g,"/");if(/https?/.test(a.scheme)||!a.scheme){if(a.authority&&a.authority!==location.host.toLowerCase())return-1;if((a.scheme||a.path||a.query)&&v.test(b))return 1}return 0}function n(a,b,c){var d=b.split(/\s+/);a.each(function(a){for(a=0;a<d.length;a++){var b=e.trim(d[a]).match(/[^\.]+/i)[0],f=e(this),l=b,b=c,f=e._data(f[0]).events[l],l=b?f.splice(f.delegateCount-1,1)[0]:f.pop();f.splice(b?0:f.delegateCount||0,0,l)}})}function p(){var a=IP_GEO_BLOCK_ZEP.nonce;if(a){var b=e("body");b.find("img").each(function(b){b=e(this).attr("src");1===k(b)&&e(this).attr("src",g(b,a))});b.onFirst("click","a",function(b){b=e(this);var c=b.attr("href"),d=b.attr("rel"),f="undefined"!==typeof c?k(c):0;if(1===f)b.attr("href",g(c,!d||0>d.indexOf("nofollow")?a:"nofollow"));else if(-1===f)return b=window.open(),b.document.write('<meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+u(this.href)+'" />'),b.document.close(),!1});b.onFirst("submit","form",function(b){b=e(this);var c=b.attr("action");1===k(c)&&b.attr("action",g(c,a))});if("undefined"!==typeof _wpRevisionsSettings)for(var c=_wpRevisionsSettings.revisionData,d=c.length,b=0;b<d;b++)-1===c[b].restoreUrl.indexOf(IP_GEO_BLOCK_ZEP.auth)&&(_wpRevisionsSettings.revisionData[b].restoreUrl=g(c[b].restoreUrl,a))}}var v=new RegExp("^(?:"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.admin+"|"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.plugins+"|"+(IP_GEO_BLOCK_AUTH.home||"")+IP_GEO_BLOCK_AUTH.themes+")(?:.*.php|.*/)?$"),q=function(a){for(var b=a.length;0<b--;)if(0===a[b].indexOf("request%5Bbrowse%5D=ip-geo-block-auth")){a[b]="request%5Bbrowse%5D=featured";break}return a},r={"upload.php":function(a){for(var b=a.length;0<b--;)if(0===a[b].indexOf("query%5Bip-geo-block-auth-nonce%5D="+IP_GEO_BLOCK_AUTH.nonce)){delete a[b];break}return a},"theme-install.php":q,"network/theme-install.php":q};e(t).ajaxSend(function(a,b,c){if((a=IP_GEO_BLOCK_ZEP.nonce)&&1===k(c.url))if("undefined"!==typeof window.FormData&&c.data instanceof FormData)c.data.append(IP_GEO_BLOCK_ZEP.auth,a);else if(b=h(c.url),"undefined"===typeof c.data||b.query)c.url=g(b,a);else{b=c.data?c.data.split("&"):[];var d;d=location.pathname;d=d.replace(IP_GEO_BLOCK_AUTH.home+IP_GEO_BLOCK_AUTH.admin,"");(d=r.hasOwnProperty(d)?r[d]:null)&&(b=d(b));b.push(IP_GEO_BLOCK_ZEP.auth+"="+m(a));c.data=b.join("&")}});"undefined"===typeof e.fn.onFirst&&(e.fn.onFirst=function(a,b){var c,d=e(this),f="string"===typeof b;e.fn.on.apply(d,arguments);if("object"===typeof a)for(c in a)a.hasOwnProperty(c)&&n(d,c,f);else"string"===typeof a&&n(d,a,f);return d});e(function(){p();IP_GEO_BLOCK_ZEP.init=!0});e(window).on("error",function(){IP_GEO_BLOCK_ZEP.init||p()})})(jQuery,document);
admin/js/footable.min.js CHANGED
@@ -3,6 +3,8 @@
3
  * Version : 2.0.3
4
  * http://fooplugins.com/plugins/footable-jquery/
5
  *
 
 
6
  * Copyright 2014 Steven Usher & Brad Vincent
7
  * Released under the MIT license
8
  * You are free to use FooTable in commercial projects as long as this copyright header is left intact.
@@ -10,7 +12,7 @@
10
  * Date: 11 Nov 2014
11
  *
12
  * This is a customized version for IP Geo Block.
13
- * footable.js + footable.paginate.js + footable.sort.js + footable.striping.js + footable.filter.js
14
  * https://github.com/fooplugins/FooTable/issues/298
15
  */
16
  (function(d,m,w){function t(){var d=this;d.id=null;d.busy=!1;d.start=function(g,h){d.busy||(d.stop(),d.id=setTimeout(function(){g();d.id=null;d.busy=!1},h),d.busy=!0)};d.stop=function(){null!==d.id&&(clearTimeout(d.id),d.id=null,d.busy=!1)}}function v(a,g,h){var b=this;b.id=h;b.table=a;b.options=g;b.breakpoints=[];b.breakpointNames="";b.columns={};b.plugins=m.footable.plugins.load(b);var l=b.options,e=l.classes,n=l.events,k=l.triggers,r=0;b.timers={resize:new t,register:function(c){b.timers[c]=new t;return b.timers[c]}};b.init=function(){var c=d(m),f=d(b.table);m.footable.plugins.init(b);if(f.hasClass(e.loaded))b.raise(n.alreadyInitialized);else{b.raise(n.initializing);f.addClass(e.loading);f.find(l.columnDataSelector).each(function(){var c=b.getColumnData(this);b.columns[c.index]=c});for(var a in l.breakpoints)b.breakpoints.push({name:a,width:l.breakpoints[a]}),b.breakpointNames+=a+" ";b.breakpoints.sort(function(b,c){return b.width-c.width});f.unbind(k.initialize).bind(k.initialize,function(){f.removeData("footable_info");f.data("breakpoint","");f.trigger(k.resize);f.removeClass(e.loading);f.addClass(e.loaded).addClass(e.main);b.raise(n.initialized)}).unbind(k.redraw).bind(k.redraw,function(){b.redraw()}).unbind(k.resize).bind(k.resize,function(){b.resize()}).unbind(k.expandFirstRow).bind(k.expandFirstRow,function(){f.find(l.toggleSelector).first().not("."+e.detailShow).trigger(k.toggleRow)}).unbind(k.expandAll).bind(k.expandAll,function(){f.find(l.toggleSelector).not("."+e.detailShow).trigger(k.toggleRow)}).unbind(k.collapseAll).bind(k.collapseAll,function(){f.find("."+e.detailShow).trigger(k.toggleRow)});f.trigger(k.initialize);c.bind("resize.footable",function(){b.timers.resize.stop();b.timers.resize.start(function(){b.raise(k.resize)},l.delay)})}};b.addRowToggle=function(){if(l.addRowToggle){var c=d(b.table);c.find("span."+e.toggle).remove();for(var f in b.columns){var a=b.columns[f];if(a.toggle){c=c.find("> tbody");a="> tr:not(."+e.detail+",."+e.disabled+") > td:nth-child("+(parseInt(a.index,10)+1)+"),> tr:not(."+e.detail+",."+e.disabled+") > th:nth-child("+(parseInt(a.index,10)+1)+")";c.find(a).not("."+e.detailCell).prepend(d(l.toggleHTMLElement).addClass(e.toggle));return}}c.find("> tbody > tr:not(."+e.detail+",."+e.disabled+") > td:first-child").add("> tbody > tr:not(."+e.detail+",."+e.disabled+") > th:first-child").not("."+e.detailCell).prepend(d(l.toggleHTMLElement).addClass(e.toggle))}};b.setColumnClasses=function(){var c=d(b.table),f;for(f in b.columns){var a=b.columns[f];if(null!==a.className){var q="",p=!0;d.each(a.matches,function(b,c){p||(q+=", ");q+="> tbody > tr:not(."+e.detail+") > td:nth-child("+(parseInt(c,10)+1)+")";p=!1});c.find(q).not("."+e.detailCell).addClass(a.className)}}};b.bindToggleSelectors=function(){var c=d(b.table);b.hasAnyBreakpointColumn()&&(c.find(l.toggleSelector).unbind(k.toggleRow).bind(k.toggleRow,function(c){c=d(this).is("tr")?d(this):d(this).parents("tr:first");b.toggleDetail(c)}),c.find(l.toggleSelector).unbind("click.footable").bind("click.footable",function(b){c.is(".breakpoint")&&d(b.target).is("td,th,."+e.toggle)&&d(this).trigger(k.toggleRow)}))};b.parse=function(b,f){return(l.parsers[f.type]||l.parsers.alpha)(b)};b.getColumnData=function(c){var f=d(c),a=f.data("hide"),e=f.index(),a=jQuery.map((a||"").split(","),function(b){return jQuery.trim(b)}),e={index:e,hide:{},type:f.data("type")||"alpha",name:f.data("name")||d.trim(f.text()),ignore:f.data("ignore")||!1,toggle:f.data("toggle")||!1,className:f.data("class")||null,matches:[],names:{},group:f.data("group")||null,groupName:null,isEditable:f.data("editable")};if(null!==e.group){var p=d(b.table).find('> thead > tr.footable-group-row > th[data-group="'+e.group+'"], > thead > tr.footable-group-row > td[data-group="'+e.group+'"]').first();e.groupName=b.parse(p,{type:"alpha"})}p=parseInt(f.prev().attr("colspan")||0,10);r+=1<p?p-1:0;var p=parseInt(f.attr("colspan")||0,10),g=e.index+r;if(1<p)for(var h=f.data("names"),h=(h||"").split(","),k=0;k<p;k++)e.matches.push(k+g),k<h.length&&(e.names[k+g]=h[k]);else e.matches.push(g);e.hide["default"]="all"===f.data("hide")||0<=d.inArray("default",a);var p=!1,m;for(m in l.breakpoints)e.hide[m]="all"===f.data("hide")||0<=d.inArray(m,a),p=p||e.hide[m];e.hasBreakpoint=p;return b.raise(n.columnData,{column:{data:e,th:c}}).column.data};b.getViewportWidth=function(){return window.innerWidth||(document.body?document.body.offsetWidth:0)};b.calculateWidth=function(b,f){if(jQuery.isFunction(l.calculateWidthOverride))return l.calculateWidthOverride(b,f);f.viewportWidth<f.width&&(f.width=f.viewportWidth);f.parentWidth<f.width&&(f.width=f.parentWidth);return f};b.hasBreakpointColumn=function(c){for(var f in b.columns)if(b.columns[f].hide[c]&&!b.columns[f].ignore)return!0;return!1};b.hasAnyBreakpointColumn=function(){for(var c in b.columns)if(b.columns[c].hasBreakpoint)return!0;return!1};b.resize=function(){var c=d(b.table);if(c.is(":visible"))if(b.hasAnyBreakpointColumn()){var f={width:c.width(),viewportWidth:b.getViewportWidth(),parentWidth:c.parent().width()},f=b.calculateWidth(c,f),a=c.data("footable_info");c.data("footable_info",f);b.raise(n.resizing,{old:a,info:f});if(!a||a&&a.width&&a.width!==f.width){for(var e=null,g,h=0;h<b.breakpoints.length;h++)if((g=b.breakpoints[h])&&g.width&&f.width<=g.width){e=g;break}e=null===e?"default":e.name;g=b.hasBreakpointColumn(e);h=c.data("breakpoint");c.data("breakpoint",e).removeClass("default breakpoint").removeClass(b.breakpointNames).addClass(e+(g?" breakpoint":""));e!==h&&(c.trigger(k.redraw),b.raise(n.breakpoint,{breakpoint:e,info:f}))}b.raise(n.resized,{old:a,info:f})}else c.trigger(k.redraw)};b.redraw=function(){b.addRowToggle();b.bindToggleSelectors();b.setColumnClasses();var c=d(b.table),f=c.data("breakpoint"),a=b.hasBreakpointColumn(f);c.find("> tbody > tr:not(."+e.detail+")").data("detail_created",!1).end().find("> thead > tr:last-child > th").each(function(){var a=b.columns[d(this).index()],g="",h=!0;d.each(a.matches,function(b,c){h||(g+=", ");var a=c+1;g+="> tbody > tr:not(."+e.detail+") > td:nth-child("+a+")";g+=", > tfoot > tr:not(."+e.detail+") > td:nth-child("+a+")";g+=", > colgroup > col:nth-child("+a+")";h=!1});var g=g+(', > thead > tr[data-group-row="true"] > th[data-group="'+a.group+'"]'),k=c.find(g).add(this);""!==f&&(!1===a.hide[f]?k.addClass("footable-visible").show():k.removeClass("footable-visible").hide());if(1===c.find("> thead > tr.footable-group-row").length){var k=c.find('> thead > tr:last-child > th[data-group="'+a.group+'"]:visible, > thead > tr:last-child > th[data-group="'+a.group+'"]:visible'),a=c.find('> thead > tr.footable-group-row > th[data-group="'+a.group+'"], > thead > tr.footable-group-row > td[data-group="'+a.group+'"]'),l=0;d.each(k,function(){l+=parseInt(d(this).attr("colspan")||1,10)});0<l?a.attr("colspan",l).show():a.hide()}}).end().find("> tbody > tr."+e.detailShow).each(function(){b.createOrUpdateDetailRow(this)});c.find("[data-bind-name]").each(function(){b.toggleInput(this)});c.find("> tbody > tr."+e.detailShow+":visible").each(function(){var b=d(this).next();b.hasClass(e.detail)&&(a?b.show():b.hide())});c.find("> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column").removeClass("footable-last-column");c.find("> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column").removeClass("footable-first-column");c.find("> thead > tr, > tbody > tr").find("> th.footable-visible:last, > td.footable-visible:last").addClass("footable-last-column").end().find("> th.footable-visible:first, > td.footable-visible:first").addClass("footable-first-column");b.raise(n.redrawn)};b.toggleDetail=function(c){c=c.jquery?c:d(c);var a=c.next();c.hasClass(e.detailShow)?(c.removeClass(e.detailShow),a.hasClass(e.detail)&&a.hide(),b.raise(n.rowCollapsed,{row:c[0]})):(b.createOrUpdateDetailRow(c[0]),c.addClass(e.detailShow).next().show(),b.raise(n.rowExpanded,{row:c[0]}))};b.removeRow=function(c){c=c.jquery?c:d(c);c.hasClass(e.detail)&&(c=c.prev());var a=c.next();!0===c.data("detail_created")&&a.remove();c.remove();b.raise(n.rowRemoved)};b.appendRow=function(c){c=c.jquery?c:d(c);d(b.table).find("tbody").append(c);b.redraw()};b.getColumnFromTdIndex=function(c){var a=null,e;for(e in b.columns)if(0<=d.inArray(c,b.columns[e].matches)){a=b.columns[e];break}return a};b.createOrUpdateDetailRow=function(c){c=d(c);var a=c.next(),g,h=[];if(!0===c.data("detail_created"))return!0;if(c.is(":hidden"))return!1;b.raise(n.rowDetailUpdating,{row:c,detail:a});c.find("> td:hidden").each(function(){var c=d(this).index(),a=b.getColumnFromTdIndex(c),f=a.name;if(!0===a.ignore)return!0;c in a.names&&(f=a.names[c]);var g=d(this).attr("data-bind-name");if(null!=g&&d(this).is(":empty")){var k=d("."+e.detailInnerValue+'[data-bind-value="'+g+'"]');d(this).html(d(k).contents().detach())}var l;!1!==a.isEditable&&(a.isEditable||0<d(this).find(":input").length)&&(null==g&&(g="bind-"+d.now()+"-"+c,d(this).attr("data-bind-name",g)),l=d(this).contents().detach());l||(l=d(this).contents().clone(!0,!0));h.push({name:f,value:b.parse(this,a),display:l,group:a.group,groupName:a.groupName,bindName:g});return!0});if(0===h.length)return!1;g=c.find("> td:visible").length;var k=a.hasClass(e.detail);k||(a=d('<tr class="'+e.detail+'"><td class="'+e.detailCell+'"><div class="'+e.detailInner+'"></div></td></tr>'),c.after(a));a.find("> td:first").attr("colspan",g);g=a.find("."+e.detailInner).empty();l.createDetail(g,h,l.createGroupedDetail,l.detailSeparator,e);c.data("detail_created",!0);b.raise(n.rowDetailUpdated,{row:c,detail:a});return!k};b.raise=function(a,e){!0===b.options.debug&&d.isFunction(b.options.log)&&b.options.log(a,"event");e=e||{};var g={ft:b};d.extend(!0,g,e);var h=d.Event(a,g);h.ft||d.extend(!0,h,g);d(b.table).trigger(h);return h};b.reset=function(){var a=d(b.table);a.removeData("footable_info").data("breakpoint","").removeClass(e.loading).removeClass(e.loaded);a.find(l.toggleSelector).unbind(k.toggleRow).unbind("click.footable");a.find("> tbody > tr").removeClass(e.detailShow);a.find("> tbody > tr."+e.detail).remove();b.raise(n.reset)};b.toggleInput=function(b){var a=d(b).attr("data-bind-name");null!=a&&(a=d("."+e.detailInnerValue+'[data-bind-value="'+a+'"]'),null!=a&&(d(b).is(":visible")?d(a).is(":empty")||d(b).html(d(a).contents().detach()):d(b).is(":empty")||d(a).html(d(b).contents().detach())))};b.init();return b}m.footable={options:{delay:100,breakpoints:{phone:480,tablet:1024},parsers:{alpha:function(a){return d(a).data("value")||d.trim(d(a).text())},numeric:function(a){a=d(a).data("value")||d(a).text().replace(/[^0-9.\-]/g,"");a=parseFloat(a);isNaN(a)&&(a=0);return a}},addRowToggle:!0,calculateWidthOverride:null,toggleSelector:" > tbody > tr:not(.footable-row-detail)",columnDataSelector:"> thead > tr:last-child > th, > thead > tr:last-child > td",detailSeparator:":",toggleHTMLElement:"<span />",createGroupedDetail:function(a){for(var d={_none:{name:null,data:[]}},h=0;h<a.length;h++){var b=a[h].group;null!==b?(b in d||(d[b]={name:a[h].groupName||a[h].group,data:[]}),d[b].data.push(a[h])):d._none.data.push(a[h])}return d},createDetail:function(a,g,h,b,l){g=h(g);for(var e in g)if(0!==g[e].data.length)for("_none"!==e&&a.append('<div class="'+l.detailInnerGroup+'">'+g[e].name+"</div>"),h=0;h<g[e].data.length;h++){var m=g[e].data[h].name?b:"";a.append(d("<div></div>").addClass(l.detailInnerRow).append(d("<div></div>").addClass(l.detailInnerName).append(g[e].data[h].name+m)).append(d("<div></div>").addClass(l.detailInnerValue).attr("data-bind-value",g[e].data[h].bindName).append(g[e].data[h].display)))}},classes:{main:"footable",loading:"footable-loading",loaded:"footable-loaded",toggle:"footable-toggle",disabled:"footable-disabled",detail:"footable-row-detail",detailCell:"footable-row-detail-cell",detailInner:"footable-row-detail-inner",detailInnerRow:"footable-row-detail-row",detailInnerGroup:"footable-row-detail-group",detailInnerName:"footable-row-detail-name",detailInnerValue:"footable-row-detail-value",detailShow:"footable-detail-show"},triggers:{initialize:"footable_initialize",resize:"footable_resize",redraw:"footable_redraw",toggleRow:"footable_toggle_row",expandFirstRow:"footable_expand_first_row",expandAll:"footable_expand_all",collapseAll:"footable_collapse_all"},events:{alreadyInitialized:"footable_already_initialized",initializing:"footable_initializing",initialized:"footable_initialized",resizing:"footable_resizing",resized:"footable_resized",redrawn:"footable_redrawn",breakpoint:"footable_breakpoint",columnData:"footable_column_data",rowDetailUpdating:"footable_row_detail_updating",rowDetailUpdated:"footable_row_detail_updated",rowCollapsed:"footable_row_collapsed",rowExpanded:"footable_row_expanded",rowRemoved:"footable_row_removed",reset:"footable_reset"},debug:!1,log:null},version:{major:0,minor:5,toString:function(){return m.footable.version.major+"."+m.footable.version.minor},parse:function(a){a=/(\d+)\.?(\d+)?\.?(\d+)?/.exec(a);return{major:parseInt(a[1],10)||0,minor:parseInt(a[2],10)||0,patch:parseInt(a[3],10)||0}}},plugins:{_validate:function(a){if(!d.isFunction(a))return!0===m.footable.options.debug&&console.error('Validation failed, expected type "function", received type "{0}".',typeof a),!1;a=new a;if("string"!==typeof a.name)return!0===m.footable.options.debug&&console.error('Validation failed, plugin does not implement a string property called "name".',a),!1;if(!d.isFunction(a.init))return!0===m.footable.options.debug&&console.error('Validation failed, plugin "'+a.name+'" does not implement a function called "init".',a),!1;!0===m.footable.options.debug&&console.log('Validation succeeded for plugin "'+a.name+'".',a);return!0},registered:[],register:function(a,g){m.footable.plugins._validate(a)&&(m.footable.plugins.registered.push(a),"object"===typeof g&&d.extend(!0,m.footable.options,g))},load:function(a){var d=[],h,b;for(b=0;b<m.footable.plugins.registered.length;b++)try{h=m.footable.plugins.registered[b],d.push(new h(a))}catch(l){!0===m.footable.options.debug&&console.error(l)}return d},init:function(a){for(var d=0;d<a.plugins.length;d++)try{a.plugins[d].init(a)}catch(h){!0===m.footable.options.debug&&console.error(h)}}}};var u=0;d.fn.footable=function(a){a=a||{};var g=d.extend(!0,{},m.footable.options,a);return this.each(function(){u++;var a=new v(this,g,u);d(this).data("footable",a)})}})(jQuery,window);
@@ -19,6 +21,4 @@
19
  /* sort */
20
  (function(t,e,undefined){function a(){var e=this;e.name="Footable Sortable",e.init=function(a){e.footable=a,a.options.sort===!0&&t(a.table).unbind(".sorting").bind({"footable_initialized.sorting":function(){var i,o,n=t(a.table),r=(n.find("> tbody"),a.options.classes.sort);if(n.data("sort")!==!1){n.find("> thead > tr:last-child > th, > thead > tr:last-child > td").each(function(){var e=t(this),i=a.columns[e.index()];i.sort.ignore===!0||e.hasClass(r.sortable)||(e.addClass(r.sortable),t("<span />").addClass(r.indicator).appendTo(e))}),n.find("> thead > tr:last-child > th."+r.sortable+", > thead > tr:last-child > td."+r.sortable).unbind("click.footable").bind("click.footable",function(a){a.preventDefault(),o=t(this);var i=!o.hasClass(r.sorted);return e.doSort(o.index(),i),!1});var l=!1;for(var s in a.columns)if(i=a.columns[s],i.sort.initial){var d="descending"!==i.sort.initial;e.doSort(i.index,d);break}l&&a.bindToggleSelectors()}},"footable_redrawn.sorting":function(){var i=t(a.table),o=a.options.classes.sort;i.data("sorted")>=0&&i.find("> thead > tr:last-child > th").each(function(a){var i=t(this);return i.hasClass(o.sorted)||i.hasClass(o.descending)?(e.doSort(a),undefined):undefined})},"footable_column_data.sorting":function(e){var a=t(e.column.th);e.column.data.sort=e.column.data.sort||{},e.column.data.sort.initial=a.data("sort-initial")||!1,e.column.data.sort.ignore=a.data("sort-ignore")||!1,e.column.data.sort.selector=a.data("sort-selector")||null;var i=a.data("sort-match")||0;i>=e.column.data.matches.length&&(i=0),e.column.data.sort.match=e.column.data.matches[i]}}).data("footable-sort",e)},e.doSort=function(a,i){var o=e.footable;if(t(o.table).data("sort")!==!1){var n=t(o.table),r=n.find("> tbody"),l=o.columns[a],s=n.find("> thead > tr:last-child > th:eq("+a+")"),d=o.options.classes.sort,f=o.options.events.sort;if(i=i===undefined?s.hasClass(d.sorted):"toggle"===i?!s.hasClass(d.sorted):i,l.sort.ignore===!0)return!0;var u=o.raise(f.sorting,{column:l,direction:i?"ASC":"DESC"});u&&u.result===!1||(n.data("sorted",l.index),n.find("> thead > tr:last-child > th, > thead > tr:last-child > td").not(s).removeClass(d.sorted+" "+d.descending),i===undefined&&(i=s.hasClass(d.sorted)),i?s.removeClass(d.descending).addClass(d.sorted):s.removeClass(d.sorted).addClass(d.descending),e.sort(o,r,l,i),o.bindToggleSelectors(),o.raise(f.sorted,{column:l,direction:i?"ASC":"DESC"}))}},e.rows=function(e,a,i){var o=[];return a.find("> tr").each(function(){var a=t(this),n=null;if(a.hasClass(e.options.classes.detail))return!0;a.next().hasClass(e.options.classes.detail)&&(n=a.next().get(0));var r={row:a,detail:n};return i!==undefined&&(r.value=e.parse(this.cells[i.sort.match],i)),o.push(r),!0}).detach(),o},e.sort=function(t,a,i,o){var n=e.rows(t,a,i),r=t.options.sorters[i.type]||t.options.sorters.alpha;n.sort(function(t,e){return o?r(t.value,e.value):r(e.value,t.value)});for(var l=0;n.length>l;l++)a.append(n[l].row),null!==n[l].detail&&a.append(n[l].detail)}}if(e.footable===undefined||null===e.footable)throw Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var i={sort:!0,sorters:{alpha:function(t,e){return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof e&&(e=e.toLowerCase()),t===e?0:e>t?-1:1},numeric:function(t,e){return t-e}},classes:{sort:{sortable:"footable-sortable",sorted:"footable-sorted",descending:"footable-sorted-desc",indicator:"footable-sort-indicator"}},events:{sort:{sorting:"footable_sorting",sorted:"footable_sorted"}}};e.footable.plugins.register(a,i)})(jQuery,window);
21
  /* striping */
22
- (function(t,e,undefined){function a(){var e=this;e.name="Footable Striping",e.init=function(a){e.footable=a,t(a.table).unbind("striping").bind({"footable_initialized.striping footable_row_removed.striping footable_redrawn.striping footable_sorted.striping footable_filtered.striping":function(){t(this).data("striping")!==!1&&e.setupStriping(a)}})},e.setupStriping=function(e){var a=0;t(e.table).find("> tbody > tr:not(.footable-row-detail)").each(function(){var i=t(this);i.removeClass(e.options.classes.striping.even).removeClass(e.options.classes.striping.odd),0===a%2?i.addClass(e.options.classes.striping.even):i.addClass(e.options.classes.striping.odd),a++})}}if(e.footable===undefined||null===e.foobox)throw Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var i={striping:{enabled:!0},classes:{striping:{odd:"footable-odd",even:"footable-even"}}};e.footable.plugins.register(a,i)})(jQuery,window);
23
- /* filter */
24
- (function(t,e,undefined){function a(){var e=this;e.name="Footable Filter",e.init=function(a){if(e.footable=a,a.options.filter.enabled===!0){if(t(a.table).data("filter")===!1)return;a.timers.register("filter"),t(a.table).unbind(".filtering").bind({"footable_initialized.filtering":function(){var i=t(a.table),o={input:i.data("filter")||a.options.filter.input,timeout:i.data("filter-timeout")||a.options.filter.timeout,minimum:i.data("filter-minimum")||a.options.filter.minimum,disableEnter:i.data("filter-disable-enter")||a.options.filter.disableEnter};o.disableEnter&&t(o.input).keypress(function(t){return window.event?13!==window.event.keyCode:13!==t.which}),i.bind("footable_clear_filter",function(){t(o.input).val(""),e.clearFilter()}),i.bind("footable_filter",function(t,a){e.filter(a.filter)}),t(o.input).keyup(function(i){a.timers.filter.stop(),27===i.which&&t(o.input).val(""),a.timers.filter.start(function(){var a=t(o.input).val()||"";e.filter(a)},o.timeout)})},"footable_redrawn.filtering":function(){var i=t(a.table),o=i.data("filter-string");o&&e.filter(o)}}).data("footable-filter",e)}},e.filter=function(a){var i=e.footable,o=t(i.table),n=o.data("filter-minimum")||i.options.filter.minimum,r=!a,l=i.raise("footable_filtering",{filter:a,clear:r});if(!(l&&l.result===!1||l.filter&&n>l.filter.length))if(l.clear)e.clearFilter();else{var d=l.filter.split(" ");o.find("> tbody > tr").hide().addClass("footable-filtered");var s=o.find("> tbody > tr:not(.footable-row-detail)");t.each(d,function(t,e){e&&e.length>0&&(o.data("current-filter",e),s=s.filter(i.options.filter.filterFunction))}),s.each(function(){e.showRow(this,i),t(this).removeClass("footable-filtered")}),o.data("filter-string",l.filter),i.raise("footable_filtered",{filter:l.filter,clear:!1})}},e.clearFilter=function(){var a=e.footable,i=t(a.table);i.find("> tbody > tr:not(.footable-row-detail)").removeClass("footable-filtered").each(function(){e.showRow(this,a)}),i.removeData("filter-string"),a.raise("footable_filtered",{clear:!0})},e.showRow=function(e,a){var i=t(e),o=i.next(),n=t(a.table);i.is(":visible")||(n.hasClass("breakpoint")&&i.hasClass("footable-detail-show")&&o.hasClass("footable-row-detail")?(i.add(o).show(),a.createOrUpdateDetailRow(e)):i.show())}}if(e.footable===undefined||null===e.footable)throw Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var i={filter:{enabled:!0,input:".footable-filter",timeout:300,minimum:2,disableEnter:!1,filterFunction:function(){var e=t(this),a=e.parents("table:first"),i=a.data("current-filter").toUpperCase(),o=e.find("td").text();return a.data("filter-text-only")||e.find("td[data-value]").each(function(){o+=t(this).data("value")}),o.toUpperCase().indexOf(i)>=0}}};e.footable.plugins.register(a,i)})(jQuery,window);
3
  * Version : 2.0.3
4
  * http://fooplugins.com/plugins/footable-jquery/
5
  *
6
+ * Requires jQuery - http://jquery.com/
7
+ *
8
  * Copyright 2014 Steven Usher & Brad Vincent
9
  * Released under the MIT license
10
  * You are free to use FooTable in commercial projects as long as this copyright header is left intact.
12
  * Date: 11 Nov 2014
13
  *
14
  * This is a customized version for IP Geo Block.
15
+ * footable.js + footable.paginate.js + footable.sort.js + footable.striping.js
16
  * https://github.com/fooplugins/FooTable/issues/298
17
  */
18
  (function(d,m,w){function t(){var d=this;d.id=null;d.busy=!1;d.start=function(g,h){d.busy||(d.stop(),d.id=setTimeout(function(){g();d.id=null;d.busy=!1},h),d.busy=!0)};d.stop=function(){null!==d.id&&(clearTimeout(d.id),d.id=null,d.busy=!1)}}function v(a,g,h){var b=this;b.id=h;b.table=a;b.options=g;b.breakpoints=[];b.breakpointNames="";b.columns={};b.plugins=m.footable.plugins.load(b);var l=b.options,e=l.classes,n=l.events,k=l.triggers,r=0;b.timers={resize:new t,register:function(c){b.timers[c]=new t;return b.timers[c]}};b.init=function(){var c=d(m),f=d(b.table);m.footable.plugins.init(b);if(f.hasClass(e.loaded))b.raise(n.alreadyInitialized);else{b.raise(n.initializing);f.addClass(e.loading);f.find(l.columnDataSelector).each(function(){var c=b.getColumnData(this);b.columns[c.index]=c});for(var a in l.breakpoints)b.breakpoints.push({name:a,width:l.breakpoints[a]}),b.breakpointNames+=a+" ";b.breakpoints.sort(function(b,c){return b.width-c.width});f.unbind(k.initialize).bind(k.initialize,function(){f.removeData("footable_info");f.data("breakpoint","");f.trigger(k.resize);f.removeClass(e.loading);f.addClass(e.loaded).addClass(e.main);b.raise(n.initialized)}).unbind(k.redraw).bind(k.redraw,function(){b.redraw()}).unbind(k.resize).bind(k.resize,function(){b.resize()}).unbind(k.expandFirstRow).bind(k.expandFirstRow,function(){f.find(l.toggleSelector).first().not("."+e.detailShow).trigger(k.toggleRow)}).unbind(k.expandAll).bind(k.expandAll,function(){f.find(l.toggleSelector).not("."+e.detailShow).trigger(k.toggleRow)}).unbind(k.collapseAll).bind(k.collapseAll,function(){f.find("."+e.detailShow).trigger(k.toggleRow)});f.trigger(k.initialize);c.bind("resize.footable",function(){b.timers.resize.stop();b.timers.resize.start(function(){b.raise(k.resize)},l.delay)})}};b.addRowToggle=function(){if(l.addRowToggle){var c=d(b.table);c.find("span."+e.toggle).remove();for(var f in b.columns){var a=b.columns[f];if(a.toggle){c=c.find("> tbody");a="> tr:not(."+e.detail+",."+e.disabled+") > td:nth-child("+(parseInt(a.index,10)+1)+"),> tr:not(."+e.detail+",."+e.disabled+") > th:nth-child("+(parseInt(a.index,10)+1)+")";c.find(a).not("."+e.detailCell).prepend(d(l.toggleHTMLElement).addClass(e.toggle));return}}c.find("> tbody > tr:not(."+e.detail+",."+e.disabled+") > td:first-child").add("> tbody > tr:not(."+e.detail+",."+e.disabled+") > th:first-child").not("."+e.detailCell).prepend(d(l.toggleHTMLElement).addClass(e.toggle))}};b.setColumnClasses=function(){var c=d(b.table),f;for(f in b.columns){var a=b.columns[f];if(null!==a.className){var q="",p=!0;d.each(a.matches,function(b,c){p||(q+=", ");q+="> tbody > tr:not(."+e.detail+") > td:nth-child("+(parseInt(c,10)+1)+")";p=!1});c.find(q).not("."+e.detailCell).addClass(a.className)}}};b.bindToggleSelectors=function(){var c=d(b.table);b.hasAnyBreakpointColumn()&&(c.find(l.toggleSelector).unbind(k.toggleRow).bind(k.toggleRow,function(c){c=d(this).is("tr")?d(this):d(this).parents("tr:first");b.toggleDetail(c)}),c.find(l.toggleSelector).unbind("click.footable").bind("click.footable",function(b){c.is(".breakpoint")&&d(b.target).is("td,th,."+e.toggle)&&d(this).trigger(k.toggleRow)}))};b.parse=function(b,f){return(l.parsers[f.type]||l.parsers.alpha)(b)};b.getColumnData=function(c){var f=d(c),a=f.data("hide"),e=f.index(),a=jQuery.map((a||"").split(","),function(b){return jQuery.trim(b)}),e={index:e,hide:{},type:f.data("type")||"alpha",name:f.data("name")||d.trim(f.text()),ignore:f.data("ignore")||!1,toggle:f.data("toggle")||!1,className:f.data("class")||null,matches:[],names:{},group:f.data("group")||null,groupName:null,isEditable:f.data("editable")};if(null!==e.group){var p=d(b.table).find('> thead > tr.footable-group-row > th[data-group="'+e.group+'"], > thead > tr.footable-group-row > td[data-group="'+e.group+'"]').first();e.groupName=b.parse(p,{type:"alpha"})}p=parseInt(f.prev().attr("colspan")||0,10);r+=1<p?p-1:0;var p=parseInt(f.attr("colspan")||0,10),g=e.index+r;if(1<p)for(var h=f.data("names"),h=(h||"").split(","),k=0;k<p;k++)e.matches.push(k+g),k<h.length&&(e.names[k+g]=h[k]);else e.matches.push(g);e.hide["default"]="all"===f.data("hide")||0<=d.inArray("default",a);var p=!1,m;for(m in l.breakpoints)e.hide[m]="all"===f.data("hide")||0<=d.inArray(m,a),p=p||e.hide[m];e.hasBreakpoint=p;return b.raise(n.columnData,{column:{data:e,th:c}}).column.data};b.getViewportWidth=function(){return window.innerWidth||(document.body?document.body.offsetWidth:0)};b.calculateWidth=function(b,f){if(jQuery.isFunction(l.calculateWidthOverride))return l.calculateWidthOverride(b,f);f.viewportWidth<f.width&&(f.width=f.viewportWidth);f.parentWidth<f.width&&(f.width=f.parentWidth);return f};b.hasBreakpointColumn=function(c){for(var f in b.columns)if(b.columns[f].hide[c]&&!b.columns[f].ignore)return!0;return!1};b.hasAnyBreakpointColumn=function(){for(var c in b.columns)if(b.columns[c].hasBreakpoint)return!0;return!1};b.resize=function(){var c=d(b.table);if(c.is(":visible"))if(b.hasAnyBreakpointColumn()){var f={width:c.width(),viewportWidth:b.getViewportWidth(),parentWidth:c.parent().width()},f=b.calculateWidth(c,f),a=c.data("footable_info");c.data("footable_info",f);b.raise(n.resizing,{old:a,info:f});if(!a||a&&a.width&&a.width!==f.width){for(var e=null,g,h=0;h<b.breakpoints.length;h++)if((g=b.breakpoints[h])&&g.width&&f.width<=g.width){e=g;break}e=null===e?"default":e.name;g=b.hasBreakpointColumn(e);h=c.data("breakpoint");c.data("breakpoint",e).removeClass("default breakpoint").removeClass(b.breakpointNames).addClass(e+(g?" breakpoint":""));e!==h&&(c.trigger(k.redraw),b.raise(n.breakpoint,{breakpoint:e,info:f}))}b.raise(n.resized,{old:a,info:f})}else c.trigger(k.redraw)};b.redraw=function(){b.addRowToggle();b.bindToggleSelectors();b.setColumnClasses();var c=d(b.table),f=c.data("breakpoint"),a=b.hasBreakpointColumn(f);c.find("> tbody > tr:not(."+e.detail+")").data("detail_created",!1).end().find("> thead > tr:last-child > th").each(function(){var a=b.columns[d(this).index()],g="",h=!0;d.each(a.matches,function(b,c){h||(g+=", ");var a=c+1;g+="> tbody > tr:not(."+e.detail+") > td:nth-child("+a+")";g+=", > tfoot > tr:not(."+e.detail+") > td:nth-child("+a+")";g+=", > colgroup > col:nth-child("+a+")";h=!1});var g=g+(', > thead > tr[data-group-row="true"] > th[data-group="'+a.group+'"]'),k=c.find(g).add(this);""!==f&&(!1===a.hide[f]?k.addClass("footable-visible").show():k.removeClass("footable-visible").hide());if(1===c.find("> thead > tr.footable-group-row").length){var k=c.find('> thead > tr:last-child > th[data-group="'+a.group+'"]:visible, > thead > tr:last-child > th[data-group="'+a.group+'"]:visible'),a=c.find('> thead > tr.footable-group-row > th[data-group="'+a.group+'"], > thead > tr.footable-group-row > td[data-group="'+a.group+'"]'),l=0;d.each(k,function(){l+=parseInt(d(this).attr("colspan")||1,10)});0<l?a.attr("colspan",l).show():a.hide()}}).end().find("> tbody > tr."+e.detailShow).each(function(){b.createOrUpdateDetailRow(this)});c.find("[data-bind-name]").each(function(){b.toggleInput(this)});c.find("> tbody > tr."+e.detailShow+":visible").each(function(){var b=d(this).next();b.hasClass(e.detail)&&(a?b.show():b.hide())});c.find("> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column").removeClass("footable-last-column");c.find("> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column").removeClass("footable-first-column");c.find("> thead > tr, > tbody > tr").find("> th.footable-visible:last, > td.footable-visible:last").addClass("footable-last-column").end().find("> th.footable-visible:first, > td.footable-visible:first").addClass("footable-first-column");b.raise(n.redrawn)};b.toggleDetail=function(c){c=c.jquery?c:d(c);var a=c.next();c.hasClass(e.detailShow)?(c.removeClass(e.detailShow),a.hasClass(e.detail)&&a.hide(),b.raise(n.rowCollapsed,{row:c[0]})):(b.createOrUpdateDetailRow(c[0]),c.addClass(e.detailShow).next().show(),b.raise(n.rowExpanded,{row:c[0]}))};b.removeRow=function(c){c=c.jquery?c:d(c);c.hasClass(e.detail)&&(c=c.prev());var a=c.next();!0===c.data("detail_created")&&a.remove();c.remove();b.raise(n.rowRemoved)};b.appendRow=function(c){c=c.jquery?c:d(c);d(b.table).find("tbody").append(c);b.redraw()};b.getColumnFromTdIndex=function(c){var a=null,e;for(e in b.columns)if(0<=d.inArray(c,b.columns[e].matches)){a=b.columns[e];break}return a};b.createOrUpdateDetailRow=function(c){c=d(c);var a=c.next(),g,h=[];if(!0===c.data("detail_created"))return!0;if(c.is(":hidden"))return!1;b.raise(n.rowDetailUpdating,{row:c,detail:a});c.find("> td:hidden").each(function(){var c=d(this).index(),a=b.getColumnFromTdIndex(c),f=a.name;if(!0===a.ignore)return!0;c in a.names&&(f=a.names[c]);var g=d(this).attr("data-bind-name");if(null!=g&&d(this).is(":empty")){var k=d("."+e.detailInnerValue+'[data-bind-value="'+g+'"]');d(this).html(d(k).contents().detach())}var l;!1!==a.isEditable&&(a.isEditable||0<d(this).find(":input").length)&&(null==g&&(g="bind-"+d.now()+"-"+c,d(this).attr("data-bind-name",g)),l=d(this).contents().detach());l||(l=d(this).contents().clone(!0,!0));h.push({name:f,value:b.parse(this,a),display:l,group:a.group,groupName:a.groupName,bindName:g});return!0});if(0===h.length)return!1;g=c.find("> td:visible").length;var k=a.hasClass(e.detail);k||(a=d('<tr class="'+e.detail+'"><td class="'+e.detailCell+'"><div class="'+e.detailInner+'"></div></td></tr>'),c.after(a));a.find("> td:first").attr("colspan",g);g=a.find("."+e.detailInner).empty();l.createDetail(g,h,l.createGroupedDetail,l.detailSeparator,e);c.data("detail_created",!0);b.raise(n.rowDetailUpdated,{row:c,detail:a});return!k};b.raise=function(a,e){!0===b.options.debug&&d.isFunction(b.options.log)&&b.options.log(a,"event");e=e||{};var g={ft:b};d.extend(!0,g,e);var h=d.Event(a,g);h.ft||d.extend(!0,h,g);d(b.table).trigger(h);return h};b.reset=function(){var a=d(b.table);a.removeData("footable_info").data("breakpoint","").removeClass(e.loading).removeClass(e.loaded);a.find(l.toggleSelector).unbind(k.toggleRow).unbind("click.footable");a.find("> tbody > tr").removeClass(e.detailShow);a.find("> tbody > tr."+e.detail).remove();b.raise(n.reset)};b.toggleInput=function(b){var a=d(b).attr("data-bind-name");null!=a&&(a=d("."+e.detailInnerValue+'[data-bind-value="'+a+'"]'),null!=a&&(d(b).is(":visible")?d(a).is(":empty")||d(b).html(d(a).contents().detach()):d(b).is(":empty")||d(a).html(d(b).contents().detach())))};b.init();return b}m.footable={options:{delay:100,breakpoints:{phone:480,tablet:1024},parsers:{alpha:function(a){return d(a).data("value")||d.trim(d(a).text())},numeric:function(a){a=d(a).data("value")||d(a).text().replace(/[^0-9.\-]/g,"");a=parseFloat(a);isNaN(a)&&(a=0);return a}},addRowToggle:!0,calculateWidthOverride:null,toggleSelector:" > tbody > tr:not(.footable-row-detail)",columnDataSelector:"> thead > tr:last-child > th, > thead > tr:last-child > td",detailSeparator:":",toggleHTMLElement:"<span />",createGroupedDetail:function(a){for(var d={_none:{name:null,data:[]}},h=0;h<a.length;h++){var b=a[h].group;null!==b?(b in d||(d[b]={name:a[h].groupName||a[h].group,data:[]}),d[b].data.push(a[h])):d._none.data.push(a[h])}return d},createDetail:function(a,g,h,b,l){g=h(g);for(var e in g)if(0!==g[e].data.length)for("_none"!==e&&a.append('<div class="'+l.detailInnerGroup+'">'+g[e].name+"</div>"),h=0;h<g[e].data.length;h++){var m=g[e].data[h].name?b:"";a.append(d("<div></div>").addClass(l.detailInnerRow).append(d("<div></div>").addClass(l.detailInnerName).append(g[e].data[h].name+m)).append(d("<div></div>").addClass(l.detailInnerValue).attr("data-bind-value",g[e].data[h].bindName).append(g[e].data[h].display)))}},classes:{main:"footable",loading:"footable-loading",loaded:"footable-loaded",toggle:"footable-toggle",disabled:"footable-disabled",detail:"footable-row-detail",detailCell:"footable-row-detail-cell",detailInner:"footable-row-detail-inner",detailInnerRow:"footable-row-detail-row",detailInnerGroup:"footable-row-detail-group",detailInnerName:"footable-row-detail-name",detailInnerValue:"footable-row-detail-value",detailShow:"footable-detail-show"},triggers:{initialize:"footable_initialize",resize:"footable_resize",redraw:"footable_redraw",toggleRow:"footable_toggle_row",expandFirstRow:"footable_expand_first_row",expandAll:"footable_expand_all",collapseAll:"footable_collapse_all"},events:{alreadyInitialized:"footable_already_initialized",initializing:"footable_initializing",initialized:"footable_initialized",resizing:"footable_resizing",resized:"footable_resized",redrawn:"footable_redrawn",breakpoint:"footable_breakpoint",columnData:"footable_column_data",rowDetailUpdating:"footable_row_detail_updating",rowDetailUpdated:"footable_row_detail_updated",rowCollapsed:"footable_row_collapsed",rowExpanded:"footable_row_expanded",rowRemoved:"footable_row_removed",reset:"footable_reset"},debug:!1,log:null},version:{major:0,minor:5,toString:function(){return m.footable.version.major+"."+m.footable.version.minor},parse:function(a){a=/(\d+)\.?(\d+)?\.?(\d+)?/.exec(a);return{major:parseInt(a[1],10)||0,minor:parseInt(a[2],10)||0,patch:parseInt(a[3],10)||0}}},plugins:{_validate:function(a){if(!d.isFunction(a))return!0===m.footable.options.debug&&console.error('Validation failed, expected type "function", received type "{0}".',typeof a),!1;a=new a;if("string"!==typeof a.name)return!0===m.footable.options.debug&&console.error('Validation failed, plugin does not implement a string property called "name".',a),!1;if(!d.isFunction(a.init))return!0===m.footable.options.debug&&console.error('Validation failed, plugin "'+a.name+'" does not implement a function called "init".',a),!1;!0===m.footable.options.debug&&console.log('Validation succeeded for plugin "'+a.name+'".',a);return!0},registered:[],register:function(a,g){m.footable.plugins._validate(a)&&(m.footable.plugins.registered.push(a),"object"===typeof g&&d.extend(!0,m.footable.options,g))},load:function(a){var d=[],h,b;for(b=0;b<m.footable.plugins.registered.length;b++)try{h=m.footable.plugins.registered[b],d.push(new h(a))}catch(l){!0===m.footable.options.debug&&console.error(l)}return d},init:function(a){for(var d=0;d<a.plugins.length;d++)try{a.plugins[d].init(a)}catch(h){!0===m.footable.options.debug&&console.error(h)}}}};var u=0;d.fn.footable=function(a){a=a||{};var g=d.extend(!0,{},m.footable.options,a);return this.each(function(){u++;var a=new v(this,g,u);d(this).data("footable",a)})}})(jQuery,window);
21
  /* sort */
22
  (function(t,e,undefined){function a(){var e=this;e.name="Footable Sortable",e.init=function(a){e.footable=a,a.options.sort===!0&&t(a.table).unbind(".sorting").bind({"footable_initialized.sorting":function(){var i,o,n=t(a.table),r=(n.find("> tbody"),a.options.classes.sort);if(n.data("sort")!==!1){n.find("> thead > tr:last-child > th, > thead > tr:last-child > td").each(function(){var e=t(this),i=a.columns[e.index()];i.sort.ignore===!0||e.hasClass(r.sortable)||(e.addClass(r.sortable),t("<span />").addClass(r.indicator).appendTo(e))}),n.find("> thead > tr:last-child > th."+r.sortable+", > thead > tr:last-child > td."+r.sortable).unbind("click.footable").bind("click.footable",function(a){a.preventDefault(),o=t(this);var i=!o.hasClass(r.sorted);return e.doSort(o.index(),i),!1});var l=!1;for(var s in a.columns)if(i=a.columns[s],i.sort.initial){var d="descending"!==i.sort.initial;e.doSort(i.index,d);break}l&&a.bindToggleSelectors()}},"footable_redrawn.sorting":function(){var i=t(a.table),o=a.options.classes.sort;i.data("sorted")>=0&&i.find("> thead > tr:last-child > th").each(function(a){var i=t(this);return i.hasClass(o.sorted)||i.hasClass(o.descending)?(e.doSort(a),undefined):undefined})},"footable_column_data.sorting":function(e){var a=t(e.column.th);e.column.data.sort=e.column.data.sort||{},e.column.data.sort.initial=a.data("sort-initial")||!1,e.column.data.sort.ignore=a.data("sort-ignore")||!1,e.column.data.sort.selector=a.data("sort-selector")||null;var i=a.data("sort-match")||0;i>=e.column.data.matches.length&&(i=0),e.column.data.sort.match=e.column.data.matches[i]}}).data("footable-sort",e)},e.doSort=function(a,i){var o=e.footable;if(t(o.table).data("sort")!==!1){var n=t(o.table),r=n.find("> tbody"),l=o.columns[a],s=n.find("> thead > tr:last-child > th:eq("+a+")"),d=o.options.classes.sort,f=o.options.events.sort;if(i=i===undefined?s.hasClass(d.sorted):"toggle"===i?!s.hasClass(d.sorted):i,l.sort.ignore===!0)return!0;var u=o.raise(f.sorting,{column:l,direction:i?"ASC":"DESC"});u&&u.result===!1||(n.data("sorted",l.index),n.find("> thead > tr:last-child > th, > thead > tr:last-child > td").not(s).removeClass(d.sorted+" "+d.descending),i===undefined&&(i=s.hasClass(d.sorted)),i?s.removeClass(d.descending).addClass(d.sorted):s.removeClass(d.sorted).addClass(d.descending),e.sort(o,r,l,i),o.bindToggleSelectors(),o.raise(f.sorted,{column:l,direction:i?"ASC":"DESC"}))}},e.rows=function(e,a,i){var o=[];return a.find("> tr").each(function(){var a=t(this),n=null;if(a.hasClass(e.options.classes.detail))return!0;a.next().hasClass(e.options.classes.detail)&&(n=a.next().get(0));var r={row:a,detail:n};return i!==undefined&&(r.value=e.parse(this.cells[i.sort.match],i)),o.push(r),!0}).detach(),o},e.sort=function(t,a,i,o){var n=e.rows(t,a,i),r=t.options.sorters[i.type]||t.options.sorters.alpha;n.sort(function(t,e){return o?r(t.value,e.value):r(e.value,t.value)});for(var l=0;n.length>l;l++)a.append(n[l].row),null!==n[l].detail&&a.append(n[l].detail)}}if(e.footable===undefined||null===e.footable)throw Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var i={sort:!0,sorters:{alpha:function(t,e){return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof e&&(e=e.toLowerCase()),t===e?0:e>t?-1:1},numeric:function(t,e){return t-e}},classes:{sort:{sortable:"footable-sortable",sorted:"footable-sorted",descending:"footable-sorted-desc",indicator:"footable-sort-indicator"}},events:{sort:{sorting:"footable_sorting",sorted:"footable_sorted"}}};e.footable.plugins.register(a,i)})(jQuery,window);
23
  /* striping */
24
+ (function(t,e,undefined){function a(){var e=this;e.name="Footable Striping",e.init=function(a){e.footable=a,t(a.table).unbind("striping").bind({"footable_initialized.striping footable_row_removed.striping footable_redrawn.striping footable_sorted.striping footable_filtered.striping":function(){t(this).data("striping")!==!1&&e.setupStriping(a)}})},e.setupStriping=function(e){var a=0;t(e.table).find("> tbody > tr:not(.footable-row-detail)").each(function(){var i=t(this);i.removeClass(e.options.classes.striping.even).removeClass(e.options.classes.striping.odd),0===a%2?i.addClass(e.options.classes.striping.even):i.addClass(e.options.classes.striping.odd),a++})}}if(e.footable===undefined||null===e.foobox)throw Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var i={striping:{enabled:!0},classes:{striping:{odd:"footable-odd",even:"footable-even"}}};e.footable.plugins.register(a,i)})(jQuery,window);
 
 
admin/js/gmap.js CHANGED
@@ -1,4 +1,4 @@
1
- /*!
2
  * Project: GmapRS - google map for WordPress IP Geo Block
3
  * Description: A really simple google map plugin based on jQuery-boilerplate.
4
  * Version: 0.2.4
1
+ /**
2
  * Project: GmapRS - google map for WordPress IP Geo Block
3
  * Description: A really simple google map plugin based on jQuery-boilerplate.
4
  * Version: 0.2.4
admin/js/gmap.min.js CHANGED
@@ -1,8 +1,8 @@
1
- /*
2
- Project: GmapRS - google map for WordPress IP Geo Block
3
- Description: A really simple google map plugin based on jQuery-boilerplate.
4
- Version: 0.2.4
5
- Copyright (c) 2013-2016 tokkonopapa (tokkonopapa@yahoo.com)
6
- This software is released under the MIT License.
7
- */
8
  function gm_authFailure(){jQuery(window).trigger("ip-geo-block-gmap-error")}(function(f){f(function(d){var f={zoom:2,latitude:0,longitude:0},e=google.maps,g=function(a){this.o=d.extend({},f);this.q=[]};g.prototype={init:function(a){d.extend(this.o,a);this.c=new e.LatLng(this.o.latitude,this.o.longitude);this.m=new e.Map(this.e.get(0),{zoom:this.o.zoom,center:this.c,mapTypeId:e.MapTypeId.ROADMAP})},destroy:function(){this.deleteMarkers();this.e.data("plugin_GmapRS",null)},setCenter:function(){if(2<=arguments.length){var a=new e.LatLng(this.o.latitude=arguments[0],this.o.longitude=arguments[1]);delete this.c;this.c=a}this.m.setCenter(this.c);return this.e},setZoom:function(a){this.m.setZoom(a||this.o.zoom);return this.e},showMarker:function(a,c){var b=this.q[a];b&&b.w&&(!1===c?b.w.close():b.w.open(this.m,b.m))},addMarker:function(a){var c,b,d;c=new e.LatLng(a.latitude||this.o.latitude,a.longitude||this.o.longitude);b=new e.Marker({position:c,map:this.m,title:a.title||""});a.content&&(d=new e.InfoWindow({content:a.content}),e.event.addListener(b,"click",function(){d.open(b.getMap(),b)}));this.q.push({p:c,w:d,m:b});this.m.setCenter(c);this.m.setZoom(a.zoom);a.show&&this.showMarker(this.q.length-1);return this.e},deleteMarkers:function(){var a,c;for(a in this.q)this.q.hasOwnProperty(a)&&(c=this.q[a],c.m.setMap(null));this.q.length=0;return this.e}};d.fn.GmapRS=function(a){var c,b;this.data("plugin_GmapRS")instanceof g||this.data("plugin_GmapRS",new g(this));b=this.data("plugin_GmapRS");b.e=this;if("undefined"===typeof a||"object"===typeof a)"function"===typeof b.init&&b.init(a);else{if("string"===typeof a&&"function"===typeof b[a])return c=Array.prototype.slice.call(arguments,1),b[a].apply(b,c);d.error("Method "+a+" does not exist.GmapRS")}}})})(jQuery);
1
+ /**
2
+ * Project: GmapRS - google map for WordPress IP Geo Block
3
+ * Description: A really simple google map plugin based on jQuery-boilerplate.
4
+ * Version: 0.2.4
5
+ * Copyright (c) 2013-2016 tokkonopapa (tokkonopapa@yahoo.com)
6
+ * This software is released under the MIT License.
7
+ */
8
  function gm_authFailure(){jQuery(window).trigger("ip-geo-block-gmap-error")}(function(f){f(function(d){var f={zoom:2,latitude:0,longitude:0},e=google.maps,g=function(a){this.o=d.extend({},f);this.q=[]};g.prototype={init:function(a){d.extend(this.o,a);this.c=new e.LatLng(this.o.latitude,this.o.longitude);this.m=new e.Map(this.e.get(0),{zoom:this.o.zoom,center:this.c,mapTypeId:e.MapTypeId.ROADMAP})},destroy:function(){this.deleteMarkers();this.e.data("plugin_GmapRS",null)},setCenter:function(){if(2<=arguments.length){var a=new e.LatLng(this.o.latitude=arguments[0],this.o.longitude=arguments[1]);delete this.c;this.c=a}this.m.setCenter(this.c);return this.e},setZoom:function(a){this.m.setZoom(a||this.o.zoom);return this.e},showMarker:function(a,c){var b=this.q[a];b&&b.w&&(!1===c?b.w.close():b.w.open(this.m,b.m))},addMarker:function(a){var c,b,d;c=new e.LatLng(a.latitude||this.o.latitude,a.longitude||this.o.longitude);b=new e.Marker({position:c,map:this.m,title:a.title||""});a.content&&(d=new e.InfoWindow({content:a.content}),e.event.addListener(b,"click",function(){d.open(b.getMap(),b)}));this.q.push({p:c,w:d,m:b});this.m.setCenter(c);this.m.setZoom(a.zoom);a.show&&this.showMarker(this.q.length-1);return this.e},deleteMarkers:function(){var a,c;for(a in this.q)this.q.hasOwnProperty(a)&&(c=this.q[a],c.m.setMap(null));this.q.length=0;return this.e}};d.fn.GmapRS=function(a){var c,b;this.data("plugin_GmapRS")instanceof g||this.data("plugin_GmapRS",new g(this));b=this.data("plugin_GmapRS");b.e=this;if("undefined"===typeof a||"object"===typeof a)"function"===typeof b.init&&b.init(a);else{if("string"===typeof a&&"function"===typeof b[a])return c=Array.prototype.slice.call(arguments,1),b[a].apply(b,c);d.error("Method "+a+" does not exist.GmapRS")}}})})(jQuery);
admin/js/whois.min.js CHANGED
@@ -1,8 +1,8 @@
1
- /*
2
- Project: whois.js - get whois infomation
3
- Description: A jQuery plugin to get whois infomation from RIPE NCC database.
4
- Version: 0.1
5
- Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
6
- This software is released under the MIT License.
7
- */
8
  (function(g){g.extend({whois:function(l,e){function b(b){return b?b.toString().replace(/[&<>"']/g,function(b){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[b]}):""}var f=[];return g.ajax({url:'https://query.yahooapis.com/v1/public/yql?q=select * from xml where url="%URL%"&format=json&jsonCompat=new'.replace(/%URL%/,"https://rest.db.ripe.net/search%3fflags=no-filtering%26flags=resource%26query-string="+l),method:"GET",dataType:"json"}).done(function(c,d,e){function k(c,a){if(a&&"object"===typeof a)if(a.errormessage){var d=a.errormessage,e=d.text.split(/\n+/);f.push({name:b(d.severity),value:b(e[1].replace(/%s/,d.args.value))})}else a.href?(a.href=b(a.href),f.push({name:b(c),value:'<a href="'+a.href+'.json" target=_blank>'+a.href+"</a>"})):a.name&&a.value?(a.link?a.value='<a href="'+b(a.link.href)+'.json" target=_blank>'+b(a.value)+"</a>":"remarks"===a.name&&(a.value=b(a.value),a.value=a.value.replace(/(https?:\/\/[^\s]+)/gi,'<a href="$1" target=_blank>$1</a>')),f.push({name:b(a.name),value:a.value})):"primary-key"!==c&&g.each(a,function(a,b){k(a,b)})}var h;c=c.query.results;d=[];for(h in c)if(c.hasOwnProperty(h)){d=c[h];break}k(null,d)}).fail(function(c,d,e){f.push({name:b(d),value:b(e)})}).always(function(){f.push({name:"copyright",value:'<a href="https://apps.db.ripe.net/search/query.html" title="Database Query - RIPE Network Coordination Centre">RIPE NCC</a>'});e&&e(f)})}})})(jQuery);
1
+ /*!
2
+ * Project: whois.js - get whois infomation
3
+ * Description: A jQuery plugin to get whois infomation from RIPE NCC database.
4
+ * Version: 0.1
5
+ * Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
6
+ * This software is released under the MIT License.
7
+ */
8
  (function(g){g.extend({whois:function(l,e){function b(b){return b?b.toString().replace(/[&<>"']/g,function(b){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[b]}):""}var f=[];return g.ajax({url:'https://query.yahooapis.com/v1/public/yql?q=select * from xml where url="%URL%"&format=json&jsonCompat=new'.replace(/%URL%/,"https://rest.db.ripe.net/search%3fflags=no-filtering%26flags=resource%26query-string="+l),method:"GET",dataType:"json"}).done(function(c,d,e){function k(c,a){if(a&&"object"===typeof a)if(a.errormessage){var d=a.errormessage,e=d.text.split(/\n+/);f.push({name:b(d.severity),value:b(e[1].replace(/%s/,d.args.value))})}else a.href?(a.href=b(a.href),f.push({name:b(c),value:'<a href="'+a.href+'.json" target=_blank>'+a.href+"</a>"})):a.name&&a.value?(a.link?a.value='<a href="'+b(a.link.href)+'.json" target=_blank>'+b(a.value)+"</a>":"remarks"===a.name&&(a.value=b(a.value),a.value=a.value.replace(/(https?:\/\/[^\s]+)/gi,'<a href="$1" target=_blank>$1</a>')),f.push({name:b(a.name),value:a.value})):"primary-key"!==c&&g.each(a,function(a,b){k(a,b)})}var h;c=c.query.results;d=[];for(h in c)if(c.hasOwnProperty(h)){d=c[h];break}k(null,d)}).fail(function(c,d,e){f.push({name:b(d),value:b(e)})}).always(function(){f.push({name:"copyright",value:'<a href="https://apps.db.ripe.net/search/query.html" title="Database Query - RIPE Network Coordination Centre">RIPE NCC</a>'});e&&e(f)})}})})(jQuery);
classes/class-ip-geo-block-actv.php CHANGED
@@ -10,11 +10,11 @@
10
  */
11
 
12
  // Stuff for resources
13
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php';
14
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php';
15
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php';
16
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
17
- require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-rewrite.php';
18
 
19
  class IP_Geo_Block_Activate {
20
 
@@ -31,7 +31,6 @@ class IP_Geo_Block_Activate {
31
 
32
  // kick off a cron job to download database immediately
33
  IP_Geo_Block_Cron::start_update_db( $settings );
34
- IP_Geo_Block_Cron::start_cache_gc( $settings );
35
 
36
  // activate rewrite rules
37
  IP_Geo_Block_Admin_Rewrite::activate_rewrite_all( $settings['rewrite'] );
@@ -47,7 +46,7 @@ class IP_Geo_Block_Activate {
47
  */
48
  public static function activate( $network_wide = FALSE ) {
49
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
50
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
51
 
52
  if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
53
  global $wpdb;
@@ -76,7 +75,6 @@ class IP_Geo_Block_Activate {
76
  public static function deactivate( $network_wide = FALSE ) {
77
  // cancel schedule
78
  IP_Geo_Block_Cron::stop_update_db();
79
- IP_Geo_Block_Cron::stop_cache_gc();
80
 
81
  // deactivate rewrite rules
82
  IP_Geo_Block_Admin_Rewrite::deactivate_rewrite_all();
10
  */
11
 
12
  // Stuff for resources
13
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php' );
14
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php' );
15
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php' );
16
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php' );
17
+ require_once( IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-rewrite.php' );
18
 
19
  class IP_Geo_Block_Activate {
20
 
31
 
32
  // kick off a cron job to download database immediately
33
  IP_Geo_Block_Cron::start_update_db( $settings );
 
34
 
35
  // activate rewrite rules
36
  IP_Geo_Block_Admin_Rewrite::activate_rewrite_all( $settings['rewrite'] );
46
  */
47
  public static function activate( $network_wide = FALSE ) {
48
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
49
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
50
 
51
  if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
52
  global $wpdb;
75
  public static function deactivate( $network_wide = FALSE ) {
76
  // cancel schedule
77
  IP_Geo_Block_Cron::stop_update_db();
 
78
 
79
  // deactivate rewrite rules
80
  IP_Geo_Block_Admin_Rewrite::deactivate_rewrite_all();
classes/class-ip-geo-block-apis.php CHANGED
@@ -446,53 +446,74 @@ class IP_Geo_Block_API_IPInfoDB extends IP_Geo_Block_API {
446
  /**
447
  * Class for Cache
448
  *
 
449
  * Input type : IP address (IPv4, IPv6)
450
  * Output type : array
451
  */
452
  class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
453
 
454
- // memory cache
455
- protected static $memcache = array();
456
-
457
  public static function update_cache( $hook, $validate, $settings ) {
458
- $cache = self::get_cache( $ip = $validate['ip'] );
 
 
 
 
 
 
 
 
 
 
459
 
460
- if ( $cache ) {
461
- $fail = $cache['fail'] + (int)isset( $validate['fail'] );
462
- $call = $cache['call'] + (int)empty( $validate['fail'] );
 
463
  } else { // if new cache then reset these values
464
  $call = 1;
465
  $fail = 0;
466
  }
467
 
468
  // update elements
469
- IP_Geo_Block_Logs::update_cache( $cache = array(
470
- 'time' => $_SERVER['REQUEST_TIME'],
471
- 'ip' => $ip,
472
  'hook' => $hook,
473
  'code' => $validate['code'],
474
  'auth' => $validate['auth'], // get_current_user_id() > 0
475
  'fail' => $validate['auth'] ? 0 : $fail,
476
  'call' => $settings['save_statistics'] ? $call : 0,
477
  'host' => isset( $validate['host'] ) ? $validate['host'] : NULL,
478
- ) );
479
 
480
- return self::$memcache[ $ip ] = $cache;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  }
482
 
483
  public static function clear_cache() {
484
- IP_Geo_Block_Logs::clear_cache();
485
  }
486
 
487
  public static function get_cache_all() {
488
- return IP_Geo_Block_Logs::restore_cache();
489
  }
490
 
491
  public static function get_cache( $ip ) {
492
- if ( ! empty( self::$memcache[ $ip ] ) )
493
- return self::$memcache[ $ip ];
494
- else
495
- return self::$memcache[ $ip ] = IP_Geo_Block_Logs::search_cache( $ip );
496
  }
497
 
498
  public function get_location( $ip, $args = array() ) {
@@ -682,7 +703,7 @@ if ( class_exists( 'IP_Geo_Block' ) ) {
682
  $exclude = array( '.', '..' );
683
  foreach ( $plugins as $plugin ) {
684
  if ( ! in_array( $plugin, $exclude, TRUE ) && is_dir( $dir.$plugin ) ) {
685
- @include $dir.$plugin.'/class-'.$plugin.'.php';
686
  }
687
  }
688
  }
446
  /**
447
  * Class for Cache
448
  *
449
+ * URL : http://codex.wordpress.org/Transients_API
450
  * Input type : IP address (IPv4, IPv6)
451
  * Output type : array
452
  */
453
  class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
454
 
 
 
 
455
  public static function update_cache( $hook, $validate, $settings ) {
456
+ $time = $_SERVER['REQUEST_TIME']; // time();
457
+ $num = ! empty( $settings['cache_hold'] ) ? $settings['cache_hold'] : 10;
458
+ $exp = ! empty( $settings['cache_time'] ) ? $settings['cache_time'] : HOUR_IN_SECONDS;
459
+
460
+ // unset expired elements
461
+ if ( FALSE !== ( $cache = get_transient( IP_Geo_Block::CACHE_NAME ) ) ) {
462
+ foreach ( $cache as $key => $val ) {
463
+ if ( $time - $val['time'] > $exp )
464
+ unset( $cache[ $key ] );
465
+ }
466
+ }
467
 
468
+ // $validate['fail'] is set in auth_fail()
469
+ if ( isset( $cache[ $ip = $validate['ip'] ] ) ) {
470
+ $fail = $cache[ $ip ]['fail'] + (int)isset( $validate['fail'] );
471
+ $call = $cache[ $ip ]['call'] + (int)empty( $validate['fail'] );
472
  } else { // if new cache then reset these values
473
  $call = 1;
474
  $fail = 0;
475
  }
476
 
477
  // update elements
478
+ $cache[ $ip ] = array(
479
+ 'time' => $time,
 
480
  'hook' => $hook,
481
  'code' => $validate['code'],
482
  'auth' => $validate['auth'], // get_current_user_id() > 0
483
  'fail' => $validate['auth'] ? 0 : $fail,
484
  'call' => $settings['save_statistics'] ? $call : 0,
485
  'host' => isset( $validate['host'] ) ? $validate['host'] : NULL,
486
+ );
487
 
488
+ // sort by 'time'
489
+ foreach ( $cache as $key => $val )
490
+ $hash[ $key ] = $val['time'];
491
+ array_multisort( $hash, SORT_DESC, $cache );
492
+
493
+ // keep the maximum number of entries, except for hidden elements
494
+ $time = 0;
495
+ foreach ( $cache as $key => $val ) {
496
+ if ( ! $val['auth'] && ++$time > $num ) {
497
+ --$time;
498
+ unset( $cache[ $key ] );
499
+ }
500
+ }
501
+
502
+ set_transient( IP_Geo_Block::CACHE_NAME, $cache, $exp ); // @since 2.8
503
+ return $cache[ $ip ];
504
  }
505
 
506
  public static function clear_cache() {
507
+ delete_transient( IP_Geo_Block::CACHE_NAME ); // @since 2.8
508
  }
509
 
510
  public static function get_cache_all() {
511
+ return get_transient( IP_Geo_Block::CACHE_NAME );
512
  }
513
 
514
  public static function get_cache( $ip ) {
515
+ $cache = get_transient( IP_Geo_Block::CACHE_NAME );
516
+ return $cache && isset( $cache[ $ip ] ) ? $cache[ $ip ] : NULL;
 
 
517
  }
518
 
519
  public function get_location( $ip, $args = array() ) {
703
  $exclude = array( '.', '..' );
704
  foreach ( $plugins as $plugin ) {
705
  if ( ! in_array( $plugin, $exclude, TRUE ) && is_dir( $dir.$plugin ) ) {
706
+ @include( $dir.$plugin.'/class-'.$plugin.'.php' );
707
  }
708
  }
709
  }
classes/class-ip-geo-block-cron.php CHANGED
@@ -101,7 +101,7 @@ class IP_Geo_Block_Cron {
101
  */
102
  private static function update_settings( $src, $keys = array() ) {
103
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
104
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
105
 
106
  // for multisite
107
  if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
@@ -154,161 +154,4 @@ class IP_Geo_Block_Cron {
154
  wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( FALSE ) ); // @since 2.1.0
155
  }
156
 
157
- /**
158
- * Kick off a cron job to garbage collection for IP address cache.
159
- *
160
- * Note: When the init action occurs in /wp-settings.php, wp_cron() runs.
161
- */
162
- public static function exec_cache_gc( $settings ) {
163
- IP_Geo_Block_Logs::delete_expired_cache( $settings['cache_time'] );
164
- self::stop_cache_gc();
165
- self::start_cache_gc( $settings );
166
- }
167
-
168
- public static function start_cache_gc( $settings ) {
169
- if ( ! wp_next_scheduled( IP_Geo_Block::CACHE_NAME ) ) {
170
- wp_schedule_single_event( time() + $settings['cache_time_gc'], IP_Geo_Block::CACHE_NAME );
171
- }
172
- }
173
-
174
- public static function stop_cache_gc() {
175
- wp_clear_scheduled_hook( IP_Geo_Block::CACHE_NAME ); // @since 2.1.0
176
- }
177
-
178
- /**
179
- * Download zip/gz file, uncompress and save it to specified file
180
- *
181
- * @param string $url URL of remote file to be downloaded.
182
- * @param array $args request headers.
183
- * @param string $filename full path to the downloaded file.
184
- * @param int $modified time of last modified on the remote server.
185
- * @return array status message.
186
- */
187
- public static function download_zip( $url, $args, $filename, $modified ) {
188
- if ( ! function_exists( 'download_url' ) )
189
- require_once ABSPATH . 'wp-admin/includes/file.php';
190
-
191
- // if the name of src file is changed, then update the dst
192
- if ( basename( $filename ) !== ( $base = pathinfo( $url, PATHINFO_FILENAME ) ) ) {
193
- $filename = dirname( $filename ) . '/' . $base;
194
- }
195
-
196
- // check file
197
- if ( ! file_exists( $filename ) )
198
- $modified = 0;
199
-
200
- // set 'If-Modified-Since' request header
201
- $args += array(
202
- 'headers' => array(
203
- 'If-Modified-Since' => gmdate( DATE_RFC1123, (int)$modified ),
204
- ),
205
- );
206
-
207
- // fetch file and get response code & message
208
- $src = wp_remote_head( ( $url = esc_url_raw( $url ) ), $args );
209
-
210
- if ( is_wp_error( $src ) )
211
- return array(
212
- 'code' => $src->get_error_code(),
213
- 'message' => $src->get_error_message(),
214
- );
215
-
216
- $code = wp_remote_retrieve_response_code ( $src );
217
- $mssg = wp_remote_retrieve_response_message( $src );
218
- $data = wp_remote_retrieve_header( $src, 'last-modified' );
219
- $modified = $data ? strtotime( $data ) : $modified;
220
-
221
- if ( 304 == $code )
222
- return array(
223
- 'code' => $code,
224
- 'message' => __( 'Your database file is up-to-date.', 'ip-geo-block' ),
225
- 'filename' => $filename,
226
- 'modified' => $modified,
227
- );
228
-
229
- elseif ( 200 != $code )
230
- return array(
231
- 'code' => $code,
232
- 'message' => $code.' '.$mssg,
233
- );
234
-
235
- // downloaded and unzip
236
- try {
237
- // download file
238
- $src = download_url( $url );
239
-
240
- if ( is_wp_error( $src ) )
241
- throw new Exception(
242
- $src->get_error_code() . ' ' . $src->get_error_message()
243
- );
244
-
245
- // get extension
246
- $args = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
247
-
248
- // unzip file
249
- if ( 'gz' === $args && function_exists( 'gzopen' ) ) {
250
- if ( FALSE === ( $gz = gzopen( $src, 'r' ) ) )
251
- throw new Exception(
252
- sprintf(
253
- __( 'Unable to read %s. Please check the permission.', 'ip-geo-block' ),
254
- $src
255
- )
256
- );
257
-
258
- if ( FALSE === ( $fp = @fopen( $filename, 'wb' ) ) )
259
- throw new Exception(
260
- sprintf(
261
- __( 'Unable to write %s. Please check the permission.', 'ip-geo-block' ),
262
- $filename
263
- )
264
- );
265
-
266
- // same block size in wp-includes/class-http.php
267
- while ( $data = gzread( $gz, 4096 ) )
268
- fwrite( $fp, $data, strlen( $data ) );
269
-
270
- gzclose( $gz );
271
- fclose ( $fp );
272
- }
273
-
274
- elseif ( 'zip' === $args && class_exists( 'ZipArchive' ) ) {
275
- // https://codex.wordpress.org/Function_Reference/unzip_file
276
- WP_Filesystem();
277
- $ret = unzip_file( $src, dirname( $filename ) ); // @since 2.5
278
-
279
- if ( is_wp_error( $ret ) )
280
- throw new Exception(
281
- $ret->get_error_code() . ' ' . $ret->get_error_message()
282
- );
283
- }
284
-
285
- @unlink( $src );
286
- }
287
-
288
- // error handler
289
- catch ( Exception $e ) {
290
- if ( 'gz' === $args && function_exists( 'gzopen' ) ) {
291
- ! empty( $gz ) and gzclose( $gz );
292
- ! empty( $fp ) and fclose ( $fp );
293
- }
294
-
295
- ! is_wp_error( $src ) and @unlink( $src );
296
-
297
- return array(
298
- 'code' => $e->getCode(),
299
- 'message' => $e->getMessage(),
300
- );
301
- }
302
-
303
- return array(
304
- 'code' => $code,
305
- 'message' => sprintf(
306
- __( 'Last update: %s', 'ip-geo-block' ),
307
- IP_Geo_Block_Util::localdate( $modified )
308
- ),
309
- 'filename' => $filename,
310
- 'modified' => $modified,
311
- );
312
- }
313
-
314
  }
101
  */
102
  private static function update_settings( $src, $keys = array() ) {
103
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
104
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
105
 
106
  // for multisite
107
  if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
154
  wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( FALSE ) ); // @since 2.1.0
155
  }
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
classes/class-ip-geo-block-lkup.php CHANGED
@@ -88,7 +88,7 @@ class IP_Geo_Block_Lkup {
88
  // on some operating systems, try the PEAR class Net_DNS
89
  if ( empty( $host ) ) {
90
  set_include_path( IP_GEO_BLOCK_PATH . 'includes' . PATH_SEPARATOR . get_include_path() );
91
- require_once IP_GEO_BLOCK_PATH . 'includes/Net/DNS2.php';
92
 
93
  // use google public dns
94
  $r = new Net_DNS2_Resolver(
@@ -115,14 +115,4 @@ class IP_Geo_Block_Lkup {
115
  return isset( $host ) ? $host : $ip;
116
  }
117
 
118
- /**
119
- * https://codex.wordpress.org/WordPress_Feeds
120
- *
121
- */
122
- public static function is_feed( $request_uri ) {
123
- return isset( $_GET['feed'] ) ?
124
- ( preg_match( '!(?:comments-)?(?:feed|rss|rss2|rdf|atom)$!', $_GET['feed'] ) ? TRUE : FALSE ) :
125
- ( preg_match( '!(?:comments/)?(?:feed|rss|rss2|rdf|atom)/?$!', $request_uri ) ? TRUE : FALSE );
126
- }
127
-
128
  }
88
  // on some operating systems, try the PEAR class Net_DNS
89
  if ( empty( $host ) ) {
90
  set_include_path( IP_GEO_BLOCK_PATH . 'includes' . PATH_SEPARATOR . get_include_path() );
91
+ require_once( IP_GEO_BLOCK_PATH . 'includes/Net/DNS2.php' );
92
 
93
  // use google public dns
94
  $r = new Net_DNS2_Resolver(
115
  return isset( $host ) ? $host : $ip;
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
118
  }
classes/class-ip-geo-block-logs.php CHANGED
@@ -29,12 +29,10 @@ class IP_Geo_Block_Logs {
29
  'daystats' => array(),
30
  );
31
 
32
- private static $sqlist = array();
33
-
34
  /**
35
  * Create
36
  *
37
- * @internal creating mixed storage engine may cause troubles with some plugins.
38
  */
39
  public static function create_tables() {
40
  global $wpdb;
@@ -82,23 +80,6 @@ class IP_Geo_Block_Logs {
82
  ON DUPLICATE KEY UPDATE No = No", 1, serialize( self::$default )
83
  ) and $wpdb->query( $sql );
84
 
85
- // for IP address cache
86
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
87
- $result &= ( FALSE !== $wpdb->query( "CREATE TABLE IF NOT EXISTS `$table` (
88
- `No` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
89
- `time` int(10) unsigned NOT NULL DEFAULT 0,
90
- `ip` varchar(40) NOT NULL,
91
- `hook` varchar(8) NOT NULL,
92
- `auth` int(10) unsigned NOT NULL DEFAULT 0,
93
- `code` varchar(2) NOT NULL DEFAULT 'ZZ',
94
- `fail` int(10) unsigned NOT NULL DEFAULT 0,
95
- `call` int(10) unsigned NOT NULL DEFAULT 0,
96
- `host` tinytext NOT NULL,
97
- PRIMARY KEY (`No`),
98
- UNIQUE (`ip`)
99
- ) CHARACTER SET " . $charset
100
- ) ) or self::error( __LINE__ ); // utf8mb4 ENGINE=InnoDB or MyISAM
101
-
102
  return $result;
103
  }
104
 
@@ -108,7 +89,7 @@ class IP_Geo_Block_Logs {
108
  */
109
  public static function delete_tables() {
110
  global $wpdb;
111
- $tables = array( self::TABLE_LOGS, self::TABLE_STAT, IP_Geo_Block::CACHE_NAME );
112
 
113
  foreach ( $tables as $table ) {
114
  $table = $wpdb->prefix . $table;
@@ -122,7 +103,7 @@ class IP_Geo_Block_Logs {
122
  */
123
  public static function diag_tables() {
124
  global $wpdb;
125
- $tables = array( self::TABLE_LOGS, self::TABLE_STAT, IP_Geo_Block::CACHE_NAME );
126
 
127
  foreach ( $tables as $table ) {
128
  $table = $wpdb->prefix . $table;
@@ -188,7 +169,9 @@ class IP_Geo_Block_Logs {
188
  $sql = $wpdb->prepare(
189
  "UPDATE `$table` SET `data` = '%s'", serialize( $statistics )
190
  // "REPLACE INTO `$table` (`No`, `data`) VALUES (%d, %s)", 1, serialize( $statistics )
191
- ) and self::add_sql( 'stat', $sql ); // $data = $wpdb->query( $sql ) or self::error( __LINE__ );
 
 
192
  }
193
 
194
  /**
@@ -199,7 +182,7 @@ class IP_Geo_Block_Logs {
199
  $time = intval( $time );
200
  $options = IP_Geo_Block::get_option();
201
 
202
- if ( $time < 90 /* msec */ )
203
  return (int)$options['validation']['maxlogs'];
204
 
205
  elseif ( $time < 200 /* msec */ )
@@ -211,7 +194,7 @@ class IP_Geo_Block_Logs {
211
  /**
212
  * Validate string whether utf8
213
  *
214
- * @see wp_check_invalid_utf8() in wp-includes/formatting.php
215
  * @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
216
  */
217
  private static function validate_utf8( $str ) {
@@ -404,7 +387,7 @@ class IP_Geo_Block_Logs {
404
  /**
405
  * Backup the validation log to text files
406
  *
407
- * Note: $path should not be within the public_html.
408
  */
409
  private static function backup_logs( $hook, $validate, $method, $agent, $heads, $posts, $path ) {
410
  // $path should be absolute path to the directory
@@ -474,7 +457,7 @@ class IP_Geo_Block_Logs {
474
  $sql = $wpdb->prepare(
475
  "DELETE FROM `$table` WHERE `hook` = '%s' ORDER BY `No` ASC LIMIT %d",
476
  $hook, $count - $rows + 1
477
- ) and self::add_sql( 'logs', $sql ); // $wpdb->query( $sql ) or self::error( __LINE__ );
478
  }
479
 
480
  // insert into DB
@@ -492,7 +475,7 @@ class IP_Geo_Block_Logs {
492
  $agent,
493
  $heads,
494
  $posts
495
- ) and self::add_sql( 'logs', $sql ); // $wpdb->query( $sql ) or self::error( __LINE__ );
496
 
497
  // backup logs to text files
498
  if ( $dir = apply_filters(
@@ -509,7 +492,7 @@ class IP_Geo_Block_Logs {
509
  * Restore the validation log
510
  *
511
  * @param string $hook type of log name
512
- * @return array log data
513
  */
514
  public static function restore_logs( $hook = NULL ) {
515
  global $wpdb;
@@ -565,104 +548,6 @@ class IP_Geo_Block_Logs {
565
  }
566
  }
567
 
568
- /**
569
- * Clear IP address cache.
570
- *
571
- */
572
- public static function clear_cache() {
573
- global $wpdb;
574
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
575
- $wpdb->query( "TRUNCATE TABLE `$table`" ) or self::error( __LINE__ );
576
- }
577
-
578
- /**
579
- * Search cache
580
- *
581
- */
582
- public static function search_cache( $ip ) {
583
- global $wpdb;
584
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
585
-
586
- $sql = $wpdb->prepare(
587
- "SELECT * FROM `$table` WHERE `ip` = '%s'", $ip
588
- ) and $result = $wpdb->get_results( $sql, ARRAY_A ) or self::error( __LINE__ );
589
-
590
- return ! empty( $result[0] ) ? $result[0] : NULL;
591
- }
592
-
593
- /**
594
- * Restore cache
595
- *
596
- */
597
- public static function restore_cache() {
598
- global $wpdb;
599
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
600
- $result = $wpdb->get_results( "SELECT * FROM `$table`", ARRAY_A ) or self::error( __LINE__ );
601
-
602
- // transform DB to cache format
603
- $cache = array();
604
- foreach ( $result as $key => $val ) {
605
- $ip = $val['ip'];
606
- unset( $val['ip'] );
607
- $cache[ $ip ] = $val;
608
- }
609
-
610
- // sort by 'time'
611
- foreach ( $cache as $key => $val )
612
- $hash[ $key ] = $val['time'];
613
-
614
- array_multisort( $hash, SORT_DESC, $cache );
615
-
616
- return $cache;
617
- }
618
-
619
- /**
620
- * Update cache
621
- *
622
- */
623
- public static function update_cache( $cache ) {
624
- global $wpdb;
625
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
626
-
627
- $sql = $wpdb->prepare(
628
- "INSERT INTO `$table`
629
- (`time`, `ip`, `hook`, `auth`, `code`, `fail`, `call`, `host`)
630
- VALUES (%d, %s, %s, %d, %s, %d, %d, %s)
631
- ON DUPLICATE KEY UPDATE
632
- `time` = VALUES(`time`),
633
- `hook` = VALUES(`hook`),
634
- `auth` = VALUES(`auth`),
635
- `code` = VALUES(`code`),
636
- `fail` = VALUES(`fail`),
637
- `call` = VALUES(`call`),
638
- `host` = VALUES(`host`)",
639
- $cache['time'],
640
- $cache['ip' ],
641
- $cache['hook'],
642
- $cache['auth'],
643
- $cache['code'],
644
- $cache['fail'],
645
- $cache['call'],
646
- $cache['host']
647
- ) and self::add_sql( 'cache', $sql ); // $wpdb->query( $sql ) or self::error( __LINE__ );
648
- }
649
-
650
- /**
651
- * Delete expired cache
652
- *
653
- */
654
- public static function delete_expired_cache( $cache_time ) {
655
- global $wpdb;
656
- $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
657
-
658
- $sql = $wpdb->prepare(
659
- "DELETE FROM `$table` WHERE `time` < %d",
660
- $_SERVER['REQUEST_TIME'] - $cache_time
661
- ) and $result = $wpdb->query( $sql ) or self::error( __LINE__ );
662
-
663
- return $result;
664
- }
665
-
666
  /**
667
  * SQL Error handling
668
  *
@@ -674,27 +559,4 @@ class IP_Geo_Block_Logs {
674
  IP_Geo_Block_Admin::add_admin_notice( 'error', __FILE__ . ' (' . $line . ') ' . $wpdb->last_error );
675
  }
676
  }
677
-
678
- /**
679
- * Stock SQL command for deferred execution.
680
- *
681
- */
682
- private static function add_sql( $hook, $sql ) {
683
- // global $wpdb; $wpdb->query( $sql ) or self::error( $hook );
684
- self::$sqlist[ $hook ][] = $sql;
685
- }
686
-
687
- /**
688
- * Deferred execution of SQL command at shutdown process.
689
- *
690
- */
691
- public static function exec_sql() {
692
- global $wpdb;
693
-
694
- foreach ( self::$sqlist as $key => $val ) {
695
- foreach ( $val as $sql ) {
696
- $wpdb->query( $sql ) or self::error( $key );
697
- }
698
- }
699
- }
700
  }
29
  'daystats' => array(),
30
  );
31
 
 
 
32
  /**
33
  * Create
34
  *
35
+ * @note creating mixed storage engine may cause troubles with some plugins.
36
  */
37
  public static function create_tables() {
38
  global $wpdb;
80
  ON DUPLICATE KEY UPDATE No = No", 1, serialize( self::$default )
81
  ) and $wpdb->query( $sql );
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  return $result;
84
  }
85
 
89
  */
90
  public static function delete_tables() {
91
  global $wpdb;
92
+ $tables = array( self::TABLE_LOGS, self::TABLE_STAT );
93
 
94
  foreach ( $tables as $table ) {
95
  $table = $wpdb->prefix . $table;
103
  */
104
  public static function diag_tables() {
105
  global $wpdb;
106
+ $tables = array( self::TABLE_LOGS, self::TABLE_STAT );
107
 
108
  foreach ( $tables as $table ) {
109
  $table = $wpdb->prefix . $table;
169
  $sql = $wpdb->prepare(
170
  "UPDATE `$table` SET `data` = '%s'", serialize( $statistics )
171
  // "REPLACE INTO `$table` (`No`, `data`) VALUES (%d, %s)", 1, serialize( $statistics )
172
+ ) and $data = $wpdb->query( $sql ) or self::error( __LINE__ );
173
+
174
+ return empty( $data ) ? FALSE : TRUE;
175
  }
176
 
177
  /**
182
  $time = intval( $time );
183
  $options = IP_Geo_Block::get_option();
184
 
185
+ if ( $time < 80 /* msec */ )
186
  return (int)$options['validation']['maxlogs'];
187
 
188
  elseif ( $time < 200 /* msec */ )
194
  /**
195
  * Validate string whether utf8
196
  *
197
+ * @note code from wp_check_invalid_utf8() in wp-includes/formatting.php
198
  * @link https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php
199
  */
200
  private static function validate_utf8( $str ) {
387
  /**
388
  * Backup the validation log to text files
389
  *
390
+ * @notice $path should not be in the public_html.
391
  */
392
  private static function backup_logs( $hook, $validate, $method, $agent, $heads, $posts, $path ) {
393
  // $path should be absolute path to the directory
457
  $sql = $wpdb->prepare(
458
  "DELETE FROM `$table` WHERE `hook` = '%s' ORDER BY `No` ASC LIMIT %d",
459
  $hook, $count - $rows + 1
460
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
461
  }
462
 
463
  // insert into DB
475
  $agent,
476
  $heads,
477
  $posts
478
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
479
 
480
  // backup logs to text files
481
  if ( $dir = apply_filters(
492
  * Restore the validation log
493
  *
494
  * @param string $hook type of log name
495
+ * return array log data
496
  */
497
  public static function restore_logs( $hook = NULL ) {
498
  global $wpdb;
548
  }
549
  }
550
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  /**
552
  * SQL Error handling
553
  *
559
  IP_Geo_Block_Admin::add_admin_notice( 'error', __FILE__ . ' (' . $line . ') ' . $wpdb->last_error );
560
  }
561
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  }
classes/class-ip-geo-block-opts.php CHANGED
@@ -16,7 +16,7 @@ class IP_Geo_Block_Opts {
16
  *
17
  */
18
  private static $option_table = array(
19
- 'version' => '3.0.0', // Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
@@ -33,8 +33,6 @@ class IP_Geo_Block_Opts {
33
  // since version 1.1
34
  'cache_hold' => 10, // Max entries in cache
35
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
36
- // since version 3.0.0
37
- 'cache_time_gc' => 900, // Cache garbage collection time
38
  // since version 1.2, 1.3
39
  'login_fails' => 5, // Limited number of login attempts
40
  'validation' => array( // Action hook for validation
@@ -55,11 +53,6 @@ class IP_Geo_Block_Opts {
55
  // since version 2.2.9
56
  'timing' => 0, // 0:init, 1:mu-plugins, 2:drop-in
57
  'recdays' => 30, // Number of days for recording logs
58
- // since version 3.0.0
59
- 'includes' => 3, // for wp-includes/
60
- 'uploads' => 3, // for UPLOADS/uploads
61
- 'languages' => 3, // for WP_CONTENT_DIR/language
62
- 'public' => 0, // Validate on public facing pages
63
  ),
64
  'update' => array( // Updating IP address DB
65
  'auto' => TRUE, // Auto updating of DB file
@@ -78,11 +71,6 @@ class IP_Geo_Block_Opts {
78
  'rewrite' => array( // Apply rewrite rule
79
  'plugins' => FALSE, // for wp-content/plugins
80
  'themes' => FALSE, // for wp-content/themes
81
- // since version 3.0.0
82
- 'public' => FALSE, // for public facing pages
83
- 'includes' => FALSE, // for wp-includes/
84
- 'uploads' => FALSE, // for UPLOADS/uploads
85
- 'languages' => FALSE, // for wp-content/language
86
  ),
87
  'Maxmind' => array( // Maxmind
88
  // since version 2.2.2
@@ -106,17 +94,6 @@ class IP_Geo_Block_Opts {
106
  'exception' => array( // list of exceptional
107
  'plugins' => array(), // for pliugins
108
  'themes' => array(), // for themes
109
- // since version 3.0.0
110
- 'admin' => array(), // for wp-admin
111
- 'public' => array( // for public facing pages
112
- 'bbp-new-topic', 'bbp-edit-topic',
113
- 'bbp-new-reply', 'bbp-edit-reply',
114
- ),
115
- 'includes' => array( // for wp-includes/
116
- 'ms-files.php', 'js/tinymce/wp-tinymce.php'
117
- ),
118
- 'uploads' => array(), // for UPLOADS/uploads
119
- 'languages' => array(), // for wp-content/language
120
  ),
121
  // since version 2.2.7
122
  'api_key' => array( // API key
@@ -130,22 +107,6 @@ class IP_Geo_Block_Opts {
130
  'lostpassword' => TRUE,
131
  'postpass' => TRUE,
132
  ),
133
- // since version 3.0.0
134
- 'response_msg' => 'Sorry, your request cannot be accepted.', // message on blocking
135
- 'redirect_uri' => 'http://blackhole.webpagetest.org/', // redirection on blocking
136
- 'network_wide' => FALSE, // settings page on network dashboard
137
- 'public' => array(
138
- 'matching_rule' => -1, // -1:follow, 0:white list, 1:black list
139
- 'white_list' => NULL, // Comma separeted country code
140
- 'black_list' => 'ZZ', // Comma separeted country code
141
- 'target_rule' => 0, // 0:all requests, 1:specify the target
142
- 'target_pages' => array(), // blocking target of pages
143
- 'target_posts' => array(), // blocking target of post types
144
- 'target_cates' => array(), // blocking target of categories
145
- 'target_tags' => array(), // blocking target of tags
146
- 'ua_list' => "Google:HOST,bot:HOST,slurp:HOST\nspider:HOST,archive:HOST,*:FEED\n*:HOST=embed.ly,Twitterbot:US,Facebot:US",
147
- 'simulate' => FALSE,// just simulate, never block
148
- ),
149
  );
150
 
151
  /**
@@ -264,20 +225,6 @@ class IP_Geo_Block_Opts {
264
  $settings['validation']['recdays'] = $default['validation']['recdays'];
265
  }
266
 
267
- if ( version_compare( $version, '3.0.0' ) < 0 ) {
268
- foreach ( array( 'cache_time_gc', 'response_msg', 'redirect_uri', 'network_wide', 'public' ) as $tmp ) {
269
- $settings[ $tmp ] = $default[ $tmp ];
270
- }
271
-
272
- foreach ( array( 'public', 'includes', 'uploads', 'languages' ) as $tmp ) {
273
- $settings['validation'][ $tmp ] = $default['validation'][ $tmp ];
274
- $settings['rewrite' ][ $tmp ] = $default['rewrite' ][ $tmp ];
275
- $settings['exception' ][ $tmp ] = $default['exception' ][ $tmp ];
276
- }
277
-
278
- $settings['exception']['admin'] = $default['exception']['admin'];
279
- }
280
-
281
  // save package version number
282
  $settings['version'] = IP_Geo_Block::VERSION;
283
  }
16
  *
17
  */
18
  private static $option_table = array(
19
+ 'version' => '2.2.9', // Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
33
  // since version 1.1
34
  'cache_hold' => 10, // Max entries in cache
35
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
 
 
36
  // since version 1.2, 1.3
37
  'login_fails' => 5, // Limited number of login attempts
38
  'validation' => array( // Action hook for validation
53
  // since version 2.2.9
54
  'timing' => 0, // 0:init, 1:mu-plugins, 2:drop-in
55
  'recdays' => 30, // Number of days for recording logs
 
 
 
 
 
56
  ),
57
  'update' => array( // Updating IP address DB
58
  'auto' => TRUE, // Auto updating of DB file
71
  'rewrite' => array( // Apply rewrite rule
72
  'plugins' => FALSE, // for wp-content/plugins
73
  'themes' => FALSE, // for wp-content/themes
 
 
 
 
 
74
  ),
75
  'Maxmind' => array( // Maxmind
76
  // since version 2.2.2
94
  'exception' => array( // list of exceptional
95
  'plugins' => array(), // for pliugins
96
  'themes' => array(), // for themes
 
 
 
 
 
 
 
 
 
 
 
97
  ),
98
  // since version 2.2.7
99
  'api_key' => array( // API key
107
  'lostpassword' => TRUE,
108
  'postpass' => TRUE,
109
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  );
111
 
112
  /**
225
  $settings['validation']['recdays'] = $default['validation']['recdays'];
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  // save package version number
229
  $settings['version'] = IP_Geo_Block::VERSION;
230
  }
classes/class-ip-geo-block-util.php CHANGED
@@ -31,31 +31,137 @@ class IP_Geo_Block_Util {
31
  /**
32
  * Download zip/gz file, uncompress and save it to specified file
33
  *
 
 
 
 
 
34
  */
35
  public static function download_zip( $url, $args, $filename, $modified ) {
36
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
37
- return IP_Geo_Block_Cron::download_zip( $url, $args, $filename, $modified );
38
- }
39
 
40
- /**
41
- * Simple comparison of urls
42
- *
43
- */
44
- public static function compare_url( $a, $b ) {
45
- if ( ! ( $a = @parse_url( $a ) ) ) return FALSE;
46
- if ( ! ( $b = @parse_url( $b ) ) ) return FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- // leave scheme to site configuration because is_ssl() doesn’t work behind some load balancers.
49
- unset( $a['scheme'] );
50
- unset( $b['scheme'] );
51
 
52
- // $_SERVER['HTTP_HOST'] can't be available in case of malicious url.
53
- $key = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '';
54
- if ( empty( $a['host'] ) ) $a['host'] = $key;
55
- if ( empty( $b['host'] ) ) $b['host'] = $key;
 
 
56
 
57
- $key = array_diff( $a, $b );
58
- return empty( $key ) ? TRUE : FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  /**
@@ -69,10 +175,8 @@ class IP_Geo_Block_Util {
69
  /**
70
  * HTML/XHTML filter that only allows some elements and attributes
71
  *
72
- * @see wp-includes/kses.php
73
  */
74
  public static function kses( $str, $allow_tags = TRUE ) {
75
- // wp_kses() is unavailable on advanced-cache.php
76
  return wp_kses( $str, $allow_tags ? $GLOBALS['allowedtags'] : array() );
77
  }
78
 
@@ -125,13 +229,13 @@ class IP_Geo_Block_Util {
125
  }
126
 
127
  /**
128
- * WP alternative function of wp_create_nonce() for mu-plugins
129
  *
130
  * Creates a cryptographic tied to the action, user, session, and time.
131
- * @source wp-includes/pluggable.php
132
  */
133
- public static function create_nonce( $action = -1 ) {
134
- $uid = self::get_current_user_id( FALSE );
135
  $tok = self::get_session_token();
136
  $exp = self::nonce_tick();
137
 
@@ -139,13 +243,13 @@ class IP_Geo_Block_Util {
139
  }
140
 
141
  /**
142
- * WP alternative function of wp_verify_nonce() for mu-plugins
143
  *
144
  * Verify that correct nonce was used with time limit.
145
- * @source wp-includes/pluggable.php
146
  */
147
- public static function verify_nonce( $nonce, $action = -1 ) {
148
- $uid = self::get_current_user_id( FALSE );
149
  $tok = self::get_session_token();
150
  $exp = self::nonce_tick();
151
 
@@ -166,10 +270,10 @@ class IP_Geo_Block_Util {
166
  }
167
 
168
  /**
169
- * WP alternative function of wp_hash() for mu-plugins
170
  *
171
  * Get hash of given string for nonce.
172
- * @source wp-includes/pluggable.php
173
  */
174
  private static function hash_nonce( $data ) {
175
  return self::hash_hmac( 'md5', $data, NONCE_KEY . NONCE_SALT );
@@ -179,24 +283,24 @@ class IP_Geo_Block_Util {
179
  * WP alternative function for mu-plugins
180
  *
181
  * Retrieve the current session token from the logged_in cookie.
182
- * @source wp-includes/user.php
183
  */
184
  private static function get_session_token() {
185
  // Arrogating logged_in cookie never cause the privilege escalation.
186
  $cookie = self::parse_auth_cookie( 'logged_in' );
187
- return ! empty( $cookie['token'] ) ? $cookie['token'] : '';
188
  }
189
 
190
  /**
191
  * WP alternative function for mu-plugins
192
  *
193
- * Parse a cookie into its components. It assumes the key including $scheme.
194
- * @source wp-includes/pluggable.php (after muplugins_loaded, it would be initialized)
195
  */
196
  private static function parse_auth_cookie( $scheme ) {
197
- static $cookie = FALSE;
198
 
199
- if ( FALSE === $cookie ) {
200
  foreach ( array_keys( $_COOKIE ) as $key ) {
201
  if ( FALSE !== strpos( $key, $scheme ) ) {
202
  if ( count( $elements = explode( '|', $_COOKIE[ $key ] ) ) === 4 ) {
@@ -214,18 +318,58 @@ class IP_Geo_Block_Util {
214
  * WP alternative function for mu-plugins
215
  *
216
  * Get the time-dependent variable for nonce creation.
217
- * @source wp-includes/pluggable.php
218
  */
219
  private static function nonce_tick() {
220
  return ceil( time() / ( DAY_IN_SECONDS / 2 ) );
221
  }
222
 
223
  /**
224
- * WP alternative function of hash_equals() for mu-plugins
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  *
226
  * Timing attack safe string comparison.
227
- * @source http://php.net/manual/en/function.hash-equals.php#115635
228
- * @see wp-includes/compat.php
229
  */
230
  private static function hash_equals( $a, $b ) {
231
  // PHP 5 >= 5.6.0 or wp-includes/compat.php
@@ -235,20 +379,20 @@ class IP_Geo_Block_Util {
235
  if( ( $i = strlen( $a ) ) !== strlen( $b ) )
236
  return FALSE;
237
 
238
- $exp = $a ^ $b; // length of both $a and $b are same
239
  $ret = 0;
240
 
241
- for ( $i -= 1; $i >= 0; $i-- )
242
  $ret |= ord( $exp[ $i ] );
243
 
244
  return ! $ret;
245
  }
246
 
247
  /**
248
- * WP alternative function of hash_hmac() for mu-plugins
249
  *
250
  * Generate a keyed hash value using the HMAC method.
251
- * @source http://php.net/manual/en/function.hash-hmac.php#93440
252
  */
253
  private static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
254
  // PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
@@ -276,16 +420,16 @@ class IP_Geo_Block_Util {
276
  }
277
 
278
  /**
279
- * WP alternative function of wp_sanitize_redirect() for mu-plugins
280
  *
281
  * Sanitizes a URL for use in a redirect.
282
- * @source wp-includes/pluggable.php
283
  */
284
  private static function sanitize_utf8_in_redirect( $matches ) {
285
  return urlencode( $matches[0] );
286
  }
287
 
288
- private static function sanitize_redirect( $location ) {
289
  $regex = '/
290
  (
291
  (?: [\xC2-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
@@ -308,14 +452,14 @@ class IP_Geo_Block_Util {
308
  }
309
 
310
  /**
311
- * WP alternative function of wp_redirect() for mu-plugins
312
  *
313
  * Redirects to another page.
314
- * @source wp-includes/pluggable.php
315
  */
316
  public static function redirect( $location, $status = 302 ) {
317
- $_is_apache = ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== FALSE );
318
- $_is_IIS = ! $_is_apache && ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) !== FALSE );
319
 
320
  // retrieve nonce from referer and add it to the location
321
  $location = self::rebuild_nonce( $location, $status );
@@ -327,19 +471,19 @@ class IP_Geo_Block_Util {
327
 
328
  header( "Location: $location", true, $status );
329
 
330
- return TRUE;
331
  }
332
 
333
  else {
334
- return FALSE;
335
  }
336
  }
337
 
338
  /**
339
- * WP alternative function of wp_validate_redirect() for mu-plugins
340
  *
341
  * Validates a URL for use in a redirect.
342
- * @source wp-includes/pluggable.php
343
  */
344
  private static function validate_redirect( $location, $default = '' ) {
345
  // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
@@ -353,7 +497,7 @@ class IP_Geo_Block_Util {
353
  $lp = @parse_url( $test );
354
 
355
  // Give up if malformed URL
356
- if ( FALSE === $lp )
357
  return $default;
358
 
359
  // Allow only http and https schemes. No data:, etc.
@@ -382,11 +526,11 @@ class IP_Geo_Block_Util {
382
  }
383
 
384
  /**
385
- * WP alternative function of wp_get_raw_referer() for mu-plugins
386
  *
387
  * Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
388
- * @source wp-includes/functions.php
389
- * @uses wp_unslash() can be replaced with stripslashes() in this context because the target value is 'string'.
390
  */
391
  private static function get_raw_referer() {
392
  if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
@@ -395,46 +539,46 @@ class IP_Geo_Block_Util {
395
  elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) )
396
  return /*wp_unslash*/ stripslashes( $_SERVER['HTTP_REFERER'] ); // wp-includes/formatting.php
397
 
398
- return FALSE;
399
  }
400
 
401
  /**
402
- * WP alternative function of wp_get_referer() for mu-plugins
403
  *
404
  * Retrieve referer from '_wp_http_referer' or HTTP referer.
405
- * @source wp-includes/functions.php
406
  */
407
  public static function get_referer() {
408
  $ref = self::get_raw_referer(); // wp-includes/functions.php
409
  $req = /*wp_unslash*/ stripslashes( $_SERVER['REQUEST_URI'] );
410
 
411
  if ( $ref && $ref !== $req && $ref !== home_url() . $req )
412
- return self::validate_redirect( $ref, FALSE );
413
 
414
- return FALSE;
415
  }
416
 
417
  /**
418
- * WP alternative function of is_user_logged_in() for mu-plugins
419
  *
420
  * Checks if the current visitor is a logged in user.
421
- * @source wp-includes/pluggable.php
422
  */
423
  public static function may_be_logged_in() {
424
  // possibly logged in but should be verified after 'init' hook is fired.
425
  return did_action( 'init' ) ? is_user_logged_in() : ( self::parse_auth_cookie( 'logged_in' ) ? TRUE : FALSE );
426
  }
427
 
428
- public static function get_current_user_id( $strict = TRUE ) {
429
  // unavailale before 'init' hook.
430
- return did_action( 'init' ) ? get_current_user_id() : ( $strict ? 0 : md5( $_SERVER['REMOTE_ADDR'], FALSE ) );
431
  }
432
 
433
  /**
434
  * WP alternative function for advanced-cache.php
435
  *
436
  * Add / Remove slash at the end of string.
437
- * @source wp-includes/formatting.php
438
  */
439
  public static function unslashit( $string ) {
440
  return rtrim( $string, '/\\' );
@@ -445,10 +589,10 @@ class IP_Geo_Block_Util {
445
  }
446
 
447
  /**
448
- * WP alternative function of wp_kses_no_null() for advanced-cache.php
449
  *
450
  * Removes any NULL characters in $string.
451
- * @source wp-includes/kses.php
452
  */
453
  private static function kses_no_null( $string ) {
454
  $string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string );
@@ -458,11 +602,11 @@ class IP_Geo_Block_Util {
458
  }
459
 
460
  /**
461
- * WP alternative function of _deep_replace() for advanced-cache.php
462
  *
463
  * Perform a deep string replace operation to ensure the values in $search are no longer present.
464
  * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that str_replace would return
465
- * @source wp-includes/formatting.php
466
  */
467
  private static function deep_replace( $search, $subject ) {
468
  $subject = (string) $subject;
@@ -475,4 +619,4 @@ class IP_Geo_Block_Util {
475
  return $subject;
476
  }
477
 
478
- }
31
  /**
32
  * Download zip/gz file, uncompress and save it to specified file
33
  *
34
+ * @param string $url URL of remote file to be downloaded.
35
+ * @param array $args request headers.
36
+ * @param string $filename full path to the downloaded file.
37
+ * @param int $modified time of last modified on the remote server.
38
+ * @return array status message.
39
  */
40
  public static function download_zip( $url, $args, $filename, $modified ) {
41
+ if ( ! function_exists( 'download_url' ) )
42
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
 
43
 
44
+ // if the name of src file is changed, then update the dst
45
+ if ( basename( $filename ) !== ( $base = pathinfo( $url, PATHINFO_FILENAME ) ) ) {
46
+ $filename = dirname( $filename ) . '/' . $base;
47
+ }
48
+
49
+ // check file
50
+ if ( ! file_exists( $filename ) )
51
+ $modified = 0;
52
+
53
+ // set 'If-Modified-Since' request header
54
+ $args += array(
55
+ 'headers' => array(
56
+ 'If-Modified-Since' => gmdate( DATE_RFC1123, (int)$modified ),
57
+ ),
58
+ );
59
+
60
+ // fetch file and get response code & message
61
+ $src = wp_remote_head( ( $url = esc_url_raw( $url ) ), $args );
62
+
63
+ if ( is_wp_error( $src ) )
64
+ return array(
65
+ 'code' => $src->get_error_code(),
66
+ 'message' => $src->get_error_message(),
67
+ );
68
+
69
+ $code = wp_remote_retrieve_response_code ( $src );
70
+ $mssg = wp_remote_retrieve_response_message( $src );
71
+ $data = wp_remote_retrieve_header( $src, 'last-modified' );
72
+ $modified = $data ? strtotime( $data ) : $modified;
73
+
74
+ if ( 304 == $code )
75
+ return array(
76
+ 'code' => $code,
77
+ 'message' => __( 'Your database file is up-to-date.', 'ip-geo-block' ),
78
+ 'filename' => $filename,
79
+ 'modified' => $modified,
80
+ );
81
+
82
+ elseif ( 200 != $code )
83
+ return array(
84
+ 'code' => $code,
85
+ 'message' => $code.' '.$mssg,
86
+ );
87
+
88
+ // downloaded and unzip
89
+ try {
90
+ // download file
91
+ $src = download_url( $url );
92
+
93
+ if ( is_wp_error( $src ) )
94
+ throw new Exception(
95
+ $src->get_error_code() . ' ' . $src->get_error_message()
96
+ );
97
+
98
+ // get extension
99
+ $args = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
100
+
101
+ // unzip file
102
+ if ( 'gz' === $args && function_exists( 'gzopen' ) ) {
103
+ if ( FALSE === ( $gz = gzopen( $src, 'r' ) ) )
104
+ throw new Exception(
105
+ sprintf(
106
+ __( 'Unable to read %s. Please check the permission.', 'ip-geo-block' ),
107
+ $src
108
+ )
109
+ );
110
+
111
+ if ( FALSE === ( $fp = @fopen( $filename, 'wb' ) ) )
112
+ throw new Exception(
113
+ sprintf(
114
+ __( 'Unable to write %s. Please check the permission.', 'ip-geo-block' ),
115
+ $filename
116
+ )
117
+ );
118
+
119
+ // same block size in wp-includes/class-http.php
120
+ while ( $data = gzread( $gz, 4096 ) )
121
+ fwrite( $fp, $data, strlen( $data ) );
122
+
123
+ gzclose( $gz );
124
+ fclose ( $fp );
125
+ }
126
+
127
+ elseif ( 'zip' === $args && class_exists( 'ZipArchive' ) ) {
128
+ // https://codex.wordpress.org/Function_Reference/unzip_file
129
+ WP_Filesystem();
130
+ $ret = unzip_file( $src, dirname( $filename ) ); // @since 2.5
131
+
132
+ if ( is_wp_error( $ret ) )
133
+ throw new Exception(
134
+ $ret->get_error_code() . ' ' . $ret->get_error_message()
135
+ );
136
+ }
137
 
138
+ @unlink( $src );
139
+ }
 
140
 
141
+ // error handler
142
+ catch ( Exception $e ) {
143
+ if ( 'gz' === $args && function_exists( 'gzopen' ) ) {
144
+ ! empty( $gz ) and gzclose( $gz );
145
+ ! empty( $fp ) and fclose ( $fp );
146
+ }
147
 
148
+ ! is_wp_error( $src ) and @unlink( $src );
149
+
150
+ return array(
151
+ 'code' => $e->getCode(),
152
+ 'message' => $e->getMessage(),
153
+ );
154
+ }
155
+
156
+ return array(
157
+ 'code' => $code,
158
+ 'message' => sprintf(
159
+ __( 'Last update: %s', 'ip-geo-block' ),
160
+ self::localdate( $modified )
161
+ ),
162
+ 'filename' => $filename,
163
+ 'modified' => $modified,
164
+ );
165
  }
166
 
167
  /**
175
  /**
176
  * HTML/XHTML filter that only allows some elements and attributes
177
  *
 
178
  */
179
  public static function kses( $str, $allow_tags = TRUE ) {
 
180
  return wp_kses( $str, $allow_tags ? $GLOBALS['allowedtags'] : array() );
181
  }
182
 
229
  }
230
 
231
  /**
232
+ * WP alternative function for mu-plugins
233
  *
234
  * Creates a cryptographic tied to the action, user, session, and time.
235
+ * @source: wp-includes/pluggable.php
236
  */
237
+ public static function create_nonce( $action = -1, $ip_addr = NULL ) {
238
+ $uid = self::get_current_user( $ip_addr );
239
  $tok = self::get_session_token();
240
  $exp = self::nonce_tick();
241
 
243
  }
244
 
245
  /**
246
+ * WP alternative function for mu-plugins
247
  *
248
  * Verify that correct nonce was used with time limit.
249
+ * @source: wp-includes/pluggable.php
250
  */
251
+ public static function verify_nonce( $nonce, $action = -1, $ip_addr = NULL ) {
252
+ $uid = self::get_current_user( $ip_addr );
253
  $tok = self::get_session_token();
254
  $exp = self::nonce_tick();
255
 
270
  }
271
 
272
  /**
273
+ * WP alternative function for mu-plugins
274
  *
275
  * Get hash of given string for nonce.
276
+ * @source: wp-includes/pluggable.php
277
  */
278
  private static function hash_nonce( $data ) {
279
  return self::hash_hmac( 'md5', $data, NONCE_KEY . NONCE_SALT );
283
  * WP alternative function for mu-plugins
284
  *
285
  * Retrieve the current session token from the logged_in cookie.
286
+ * @source: wp-includes/user.php
287
  */
288
  private static function get_session_token() {
289
  // Arrogating logged_in cookie never cause the privilege escalation.
290
  $cookie = self::parse_auth_cookie( 'logged_in' );
291
+ return ! empty( $cookie['token'] ) ? $cookie['token'] : AUTH_KEY . AUTH_SALT;
292
  }
293
 
294
  /**
295
  * WP alternative function for mu-plugins
296
  *
297
+ * Parse a cookie into its components.
298
+ * @source: wp-includes/pluggable.php
299
  */
300
  private static function parse_auth_cookie( $scheme ) {
301
+ static $cookie = NULL;
302
 
303
+ if ( NULL === $cookie ) {
304
  foreach ( array_keys( $_COOKIE ) as $key ) {
305
  if ( FALSE !== strpos( $key, $scheme ) ) {
306
  if ( count( $elements = explode( '|', $_COOKIE[ $key ] ) ) === 4 ) {
318
  * WP alternative function for mu-plugins
319
  *
320
  * Get the time-dependent variable for nonce creation.
321
+ * @source: wp-includes/pluggable.php
322
  */
323
  private static function nonce_tick() {
324
  return ceil( time() / ( DAY_IN_SECONDS / 2 ) );
325
  }
326
 
327
  /**
328
+ * WP alternative function for mu-plugins
329
+ *
330
+ * Retrieve the current user identification.
331
+ * @source: wp-includes/user.php
332
+ */
333
+ private static function get_current_user( $ip_addr ) {
334
+ if ( $ip_addr ) {
335
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php' );
336
+
337
+ $num = '';
338
+ $sum = 0;
339
+
340
+ foreach ( unpack( 'C*', IP_Geo_Block_Lkup::inet_pton( $ip_addr ) ) as $byte ) {
341
+ $sum += $byte;
342
+ $num .= (string)( $byte % 10 );
343
+ }
344
+
345
+ $num += $sum;
346
+ }
347
+
348
+ elseif ( isset( $_COOKIE ) ) {
349
+ foreach ( array_keys( $_COOKIE ) as $key ) {
350
+ if ( 0 === strpos( $key, 'wp-settings-' ) ) {
351
+ $num = substr( $key, 12 ); // get numerical characters
352
+ break;
353
+ }
354
+ }
355
+ }
356
+ /*
357
+ // add something which a visitor can't control
358
+ $num .= substr( SECURE_AUTH_KEY, 1, 6 ); // @since 2.6
359
+
360
+ // add something unique
361
+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && is_string( $_SERVER['HTTP_USER_AGENT'] ) )
362
+ $num .= preg_replace( '/[^-,:!*+\.\/\w\s]/', '', $_SERVER['HTTP_USER_AGENT'] );
363
+ */
364
+ return isset( $num ) ? $num : '0';
365
+ }
366
+
367
+ /**
368
+ * WP alternative function for mu-plugins
369
  *
370
  * Timing attack safe string comparison.
371
+ * @source: http://php.net/manual/en/function.hash-equals.php#115635
372
+ * @reference: wp-includes/compat.php
373
  */
374
  private static function hash_equals( $a, $b ) {
375
  // PHP 5 >= 5.6.0 or wp-includes/compat.php
379
  if( ( $i = strlen( $a ) ) !== strlen( $b ) )
380
  return FALSE;
381
 
382
+ $exp = $a ^ $b; // 1 === strlen( 'a' ^ 'ab' )
383
  $ret = 0;
384
 
385
+ while ( --$i >= 0 )
386
  $ret |= ord( $exp[ $i ] );
387
 
388
  return ! $ret;
389
  }
390
 
391
  /**
392
+ * WP alternative function for mu-plugins
393
  *
394
  * Generate a keyed hash value using the HMAC method.
395
+ * @source: http://php.net/manual/en/function.hash-hmac.php#93440
396
  */
397
  private static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
398
  // PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
420
  }
421
 
422
  /**
423
+ * WP alternative function for mu-plugins
424
  *
425
  * Sanitizes a URL for use in a redirect.
426
+ * @source: wp-includes/pluggable.php
427
  */
428
  private static function sanitize_utf8_in_redirect( $matches ) {
429
  return urlencode( $matches[0] );
430
  }
431
 
432
+ private static function sanitize_redirect($location) {
433
  $regex = '/
434
  (
435
  (?: [\xC2-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
452
  }
453
 
454
  /**
455
+ * WP alternative function for mu-plugins
456
  *
457
  * Redirects to another page.
458
+ * @source: wp-includes/pluggable.php
459
  */
460
  public static function redirect( $location, $status = 302 ) {
461
+ $_is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
462
+ $_is_IIS = !$_is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false);
463
 
464
  // retrieve nonce from referer and add it to the location
465
  $location = self::rebuild_nonce( $location, $status );
471
 
472
  header( "Location: $location", true, $status );
473
 
474
+ return true;
475
  }
476
 
477
  else {
478
+ return false;
479
  }
480
  }
481
 
482
  /**
483
+ * WP alternative function for mu-plugins
484
  *
485
  * Validates a URL for use in a redirect.
486
+ * @source: wp-includes/pluggable.php
487
  */
488
  private static function validate_redirect( $location, $default = '' ) {
489
  // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
497
  $lp = @parse_url( $test );
498
 
499
  // Give up if malformed URL
500
+ if ( false === $lp )
501
  return $default;
502
 
503
  // Allow only http and https schemes. No data:, etc.
526
  }
527
 
528
  /**
529
+ * WP alternative function for mu-plugins
530
  *
531
  * Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
532
+ * @source: wp-includes/functions.php
533
+ * @note: wp_unslash() can be replaced with stripslashes() in this context because the target value is 'string'.
534
  */
535
  private static function get_raw_referer() {
536
  if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
539
  elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) )
540
  return /*wp_unslash*/ stripslashes( $_SERVER['HTTP_REFERER'] ); // wp-includes/formatting.php
541
 
542
+ return false;
543
  }
544
 
545
  /**
546
+ * WP alternative function for mu-plugins
547
  *
548
  * Retrieve referer from '_wp_http_referer' or HTTP referer.
549
+ * @source: wp-includes/functions.php
550
  */
551
  public static function get_referer() {
552
  $ref = self::get_raw_referer(); // wp-includes/functions.php
553
  $req = /*wp_unslash*/ stripslashes( $_SERVER['REQUEST_URI'] );
554
 
555
  if ( $ref && $ref !== $req && $ref !== home_url() . $req )
556
+ return self::validate_redirect( $ref, false );
557
 
558
+ return false;
559
  }
560
 
561
  /**
562
+ * WP alternative function for mu-plugins
563
  *
564
  * Checks if the current visitor is a logged in user.
565
+ * @source: wp-includes/pluggable.php
566
  */
567
  public static function may_be_logged_in() {
568
  // possibly logged in but should be verified after 'init' hook is fired.
569
  return did_action( 'init' ) ? is_user_logged_in() : ( self::parse_auth_cookie( 'logged_in' ) ? TRUE : FALSE );
570
  }
571
 
572
+ public static function get_current_user_id() {
573
  // unavailale before 'init' hook.
574
+ return did_action( 'init' ) ? get_current_user_id() : 0;
575
  }
576
 
577
  /**
578
  * WP alternative function for advanced-cache.php
579
  *
580
  * Add / Remove slash at the end of string.
581
+ * @source: wp-includes/formatting.php
582
  */
583
  public static function unslashit( $string ) {
584
  return rtrim( $string, '/\\' );
589
  }
590
 
591
  /**
592
+ * WP alternative function for advanced-cache.php
593
  *
594
  * Removes any NULL characters in $string.
595
+ * @source: wp-includes/kses.php
596
  */
597
  private static function kses_no_null( $string ) {
598
  $string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string );
602
  }
603
 
604
  /**
605
+ * WP alternative function for advanced-cache.php
606
  *
607
  * Perform a deep string replace operation to ensure the values in $search are no longer present.
608
  * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that str_replace would return
609
+ * @source: wp-includes/formatting.php
610
  */
611
  private static function deep_replace( $search, $subject ) {
612
  $subject = (string) $subject;
619
  return $subject;
620
  }
621
 
622
+ }
classes/class-ip-geo-block.php CHANGED
@@ -15,7 +15,7 @@ class IP_Geo_Block {
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
- const VERSION = '3.0.0';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
@@ -41,17 +41,18 @@ class IP_Geo_Block {
41
  *
42
  */
43
  private function __construct() {
 
 
 
 
 
44
  $settings = self::get_option();
45
- $priority = &$settings['priority'];
46
- $validate = &$settings['validation'];
47
  $loader = new IP_Geo_Block_Loader();
48
 
49
  // include drop in if it exists
50
- $key = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in.php';
51
- file_exists( $key ) and include( $key );
52
-
53
- // Garbage collection for IP address cache
54
- add_action( self::CACHE_NAME, array( $this, 'exec_cache_gc' ) );
55
 
56
  // the action hook which will be fired by cron job
57
  if ( $settings['update']['auto'] )
@@ -107,10 +108,6 @@ class IP_Geo_Block {
107
  }
108
 
109
  else {
110
- // public facing pages
111
- if ( $validate['public'] /* && 'index.php' === $this->pagenow */ )
112
- $loader->add_action( 'init', array( $this, 'validate_public' ), $priority );
113
-
114
  // message text on comment form
115
  if ( $settings['comment']['pos'] ) {
116
  $key = ( 1 === (int)$settings['comment']['pos'] ? '_top' : '' );
@@ -128,16 +125,12 @@ class IP_Geo_Block {
128
  if ( $validate['login'] ) {
129
  // for hide/rename wp-login.php, BuddyPress: prevent registration and rendering form
130
  add_action( 'login_init', array( $this, 'validate_login' ), $priority );
131
-
132
- // only when block on front-end is disabled
133
- if ( ! $validate['public'] ) {
134
- add_action( 'bp_core_screen_signup', array( $this, 'validate_login' ), $priority );
135
- add_action( 'bp_signup_pre_validate', array( $this, 'validate_login' ), $priority );
136
- }
137
  }
138
  }
139
 
140
- // force to change the redirect URL on logout to remove nonce, embed a nonce into pages
141
  add_filter( 'wp_redirect', array( $this, 'logout_redirect' ), 20, 2 ); // logout_redirect @4.2
142
  add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_nonce' ), $priority );
143
 
@@ -167,7 +160,7 @@ class IP_Geo_Block {
167
  *
168
  */
169
  public static function get_default() {
170
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php';
171
  return IP_Geo_Block_Opts::get_default();
172
  }
173
 
@@ -194,7 +187,7 @@ class IP_Geo_Block {
194
  }
195
 
196
  /**
197
- * Remove the redirecting URL on logout not to be blocked by WP-ZEP.
198
  *
199
  */
200
  public function logout_redirect( $uri ) {
@@ -226,7 +219,7 @@ class IP_Geo_Block {
226
  }
227
 
228
  /**
229
- * Render a text message on the comment form.
230
  *
231
  */
232
  public function comment_form_message() {
@@ -255,9 +248,9 @@ class IP_Geo_Block {
255
  * @return array $result country code and so on
256
  */
257
  public static function get_geolocation( $ip = NULL, $providers = array(), $callback = 'get_country' ) {
 
258
  $settings = self::get_option();
259
-
260
- if ( empty( $providers ) ) // make valid providers list
261
  $providers = IP_Geo_Block_Provider::get_valid_providers( $settings['providers'] );
262
 
263
  $result = self::_get_geolocation( $ip ? $ip : self::get_ip_address(), $settings, $providers, $callback );
@@ -314,47 +307,37 @@ class IP_Geo_Block {
314
  * Send response header with http status code and reason.
315
  *
316
  */
317
- public function send_response( $hook, $settings ) {
318
- require_once ABSPATH . WPINC . '/functions.php';
319
-
320
  // prevent caching (WP Super Cache, W3TC, Wordfence, Comet Cache)
321
  if ( ! defined( 'DONOTCACHEPAGE' ) )
322
  define( 'DONOTCACHEPAGE', TRUE );
323
 
324
- $code = (int )apply_filters( self::PLUGIN_NAME . '-'.$hook.'-status', $settings['response_code'] );
325
- $mesg = (string)apply_filters( self::PLUGIN_NAME . '-'.$hook.'-reason', $settings['response_msg' ] ? $settings['response_msg'] : get_status_header_desc( $code ) );
326
-
327
- nocache_headers(); // Set the headers to prevent caching for the different browsers.
328
 
329
- if ( defined( 'XMLRPC_REQUEST' ) && isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
330
- status_header( 405 );
331
- header( 'Content-Type: text/plain' );
332
- die( 'XML-RPC server accepts POST requests only.' );
333
- }
334
 
335
- switch ( (int)substr( $code, 0, 1 ) ) {
336
- case 2: // 2xx Success (HTTP header injection should be avoided)
337
- header( 'Refresh: 0; url=' . esc_url_raw( $settings['redirect_uri'] ? $settings['redirect_uri'] : home_url( '/' ) ), TRUE, $code ); // @since 2.8
338
  exit;
339
 
340
- case 3: // 3xx Redirection (HTTP header injection should be avoided)
341
- IP_Geo_Block_Util::redirect( esc_url_raw( $settings['redirect_uri'] ? $settings['redirect_uri'] : home_url( '/' ) ), $code ); // @since 2.8
342
  exit;
343
 
344
  default: // 4xx Client Error, 5xx Server Error
345
- status_header( $code ); // @since 2.0.0
346
-
347
  // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
348
- 'public' !== $hook and header( 'X-Robots-Tag: noindex, nofollow', FALSE );
 
349
 
350
  if ( function_exists( 'trackback_response' ) )
351
  trackback_response( $code, IP_Geo_Block_Util::kses( $mesg ) ); // @since 0.71
352
 
353
- // Show human readable page
354
  elseif ( ! defined( 'DOING_AJAX' ) && ! defined( 'XMLRPC_REQUEST' ) ) {
355
  $hook = IP_Geo_Block_Util::may_be_logged_in() && 'admin' === $this->target_type;
356
- FALSE !== ( @include get_stylesheet_directory() .'/'.$code.'.php' ) or // child theme
357
- FALSE !== ( @include get_template_directory() .'/'.$code.'.php' ) or // parent theme
358
  wp_die( // get_dashboard_url() @since 3.1.0
359
  IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p><a href='" . esc_url( get_dashboard_url() ) . "'>&laquo; " . __( 'Dashboard' ) . "</a></p>" : '' ),
360
  '', array( 'response' => $code, 'back_link' => ! $hook )
@@ -398,7 +381,7 @@ class IP_Geo_Block {
398
  $providers = IP_Geo_Block_Provider::get_valid_providers( $settings['providers'] );
399
 
400
  // apply custom filter for validation
401
- // @example add_filter( 'ip-geo-block-$hook', 'my_validation', 10, 2 );
402
  // @param $validate = array(
403
  // 'ip' => $ip, /* validated ip address */
404
  // 'auth' => $auth, /* authenticated or not */
@@ -418,48 +401,54 @@ class IP_Geo_Block {
418
  break;
419
  }
420
 
421
- if ( $auth ) {
422
- // record log (0:no, 1:blocked, 2:passed, 3:unauth, 4:auth, 5:all)
423
- $var = (int)apply_filters( self::PLUGIN_NAME . '-record-logs', $settings['validation']['reclogs'], $hook, $validate );
424
- $block = ( 'passed' !== $validate['result'] );
425
- if ( ( 1 === $var && $block ) || // blocked
426
- ( 2 === $var && ! $block ) || // passed
427
- ( 3 === $var && ! $validate['auth'] ) || // unauthenticated
428
- ( 4 === $var && $validate['auth'] ) || // authenticated
429
- ( 5 === $var ) ) { // all
430
- IP_Geo_Block_Logs::record_logs( $hook, $validate, $settings );
431
- }
432
 
433
- // update cache
434
- IP_Geo_Block_API_Cache::update_cache( $hook, $validate, $settings );
435
 
436
- // update statistics
437
- if ( $settings['save_statistics'] )
438
- IP_Geo_Block_Logs::update_stat( $hook, $validate, $settings );
439
 
440
- // send response code to refuse
441
- if ( $block && $die )
442
- $this->send_response( $hook, $settings );
443
- }
444
 
445
  return $validate;
446
  }
447
 
448
  /**
449
- * Validate on comment.
450
  *
451
  */
452
- public function validate_comment() {
453
- $this->validate_ip( 'comment', self::get_option() );
454
- }
455
-
456
  public function validate_front( $can_access = TRUE ) {
457
  $validate = $this->validate_ip( 'comment', self::get_option(), TRUE, FALSE );
458
  return ( 'passed' === $validate['result'] ? $can_access : FALSE );
459
  }
460
 
461
  /**
462
- * Validate on xmlrpc.
 
 
 
 
 
 
 
 
 
 
 
 
463
  *
464
  */
465
  public function validate_xmlrpc() {
@@ -479,7 +468,7 @@ class IP_Geo_Block {
479
  }
480
 
481
  /**
482
- * Validate on login.
483
  *
484
  */
485
  public function validate_login() {
@@ -493,20 +482,23 @@ class IP_Geo_Block {
493
  $action = 'resetpass';
494
 
495
  $settings = self::get_option();
496
- $list = &$settings['login_action'];
497
 
498
- // the same rule should be applied to login and logout
499
- ! empty( $list['login'] ) and $list['logout'] = TRUE;
 
500
 
501
  // wp-includes/pluggable.php @since 2.5.0
502
  add_action( 'wp_login_failed', array( $this, 'auth_fail' ), $settings['priority'] );
503
 
504
- // enables to skip validation of country on login/out except BuddyPress signup
505
- $this->validate_ip( 'login', $settings, ! empty( $list[ $action ] ) || 'bp_' === substr( current_filter(), 0, 3 ) );
 
 
506
  }
507
 
508
  /**
509
- * Validate in admin area.
510
  *
511
  */
512
  public function validate_admin() {
@@ -535,12 +527,12 @@ class IP_Geo_Block {
535
  $type = (int)$settings['validation']['admin'];
536
  }
537
 
538
- // list of request for specific action or page to bypass WP-ZEP
539
- $list = apply_filters( self::PLUGIN_NAME . '-bypass-admins', $settings['exception']['admin'] ) + array(
540
  'save-widget', 'wordfence_testAjax', 'wordfence_doScan', 'wp-compression-test', // wp-admin/includes/template.php
541
  'upload-attachment', 'imgedit-preview', 'bp_avatar_upload', // pluploader won't fire an event in "Media Library"
542
  'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', // jetpack page & action
543
- );
544
 
545
  $in_action = in_array( $action, $list, TRUE );
546
  $in_page = in_array( $page, $list, TRUE );
@@ -564,14 +556,13 @@ class IP_Geo_Block {
564
  }
565
 
566
  /**
567
- * Validate in plugins/themes area.
568
  *
569
  */
570
  public function validate_direct() {
571
  // analyze target in wp-includes, wp-content/(plugins|themes|language|uploads)
572
  $path = preg_quote( self::$wp_path[ $type = $this->target_type ], '/' );
573
  $target = ( 'plugins' === $type || 'themes' === $type ? '[^\?\&\/]*' : '[^\?\&]*' );
574
-
575
  preg_match( "/($path)($target)/", $this->request_uri, $target );
576
  $target = empty( $target[2] ) ? $target[1] : $target[2];
577
 
@@ -581,11 +572,9 @@ class IP_Geo_Block {
581
  $type = (int)$settings['validation'][ $type ];
582
 
583
  if ( ! in_array( $target, $path, TRUE ) ) {
584
- if ( 2 & $type ) {
585
- // redirect if valid nonce in referer, otherwise register WP-ZEP (2: WP-ZEP)
586
- IP_Geo_Block_Util::trace_nonce( self::PLUGIN_NAME . '-auth-nonce' );
587
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 5, 2 );
588
- }
589
 
590
  // register validation of malicious signature
591
  if ( ! IP_Geo_Block_Util::may_be_logged_in() )
@@ -619,19 +608,18 @@ class IP_Geo_Block {
619
  $validate['result'] = 'multi';
620
 
621
  $settings = self::get_option();
622
- $cache = IP_Geo_Block_API_Cache::update_cache( $cache['hook'], $validate, $settings ); // count up 'fail'
623
- $block = $cache['fail'] > max( 0, (int)$settings['login_fails'] ) || 'multi' === $validate['result'];
624
 
625
  // (1) blocked, (3) unauthenticated, (5) all
626
  if ( 1 & (int)$settings['validation']['reclogs'] )
627
- IP_Geo_Block_Logs::record_logs( $cache['hook'], $validate, $settings, $block );
628
 
629
  // send response code to refuse immediately
630
- if ( $block ) {
631
  if ( $settings['save_statistics'] )
632
  IP_Geo_Block_Logs::update_stat( $cache['hook'], $validate, $settings );
633
 
634
- $this->send_response( $cache['hook'], $settings );
635
  }
636
  }
637
 
@@ -641,10 +629,10 @@ class IP_Geo_Block {
641
  public function check_fail( $validate, $settings ) {
642
  $cache = IP_Geo_Block_API_Cache::get_cache( $validate['ip'] );
643
 
644
- // Check if number of fails reaches limit. Note this comparison needs '>='.
645
- if ( $cache && $cache['fail'] >= max( 0, (int)$settings['login_fails'] ) ) {
646
  if ( empty( $validate['result'] ) || 'passed' === $validate['result'] )
647
- $validate['result'] = 'limited'; // can't overwrite existing result
648
  }
649
 
650
  return $validate;
@@ -659,11 +647,10 @@ class IP_Geo_Block {
659
  $action = self::PLUGIN_NAME . '-auth-nonce';
660
  $nonce = IP_Geo_Block_Util::retrieve_nonce( $action );
661
 
662
- if ( IP_Geo_Block_Util::verify_nonce( $nonce, $action ) )
663
- $validate['result'] = 'passed'; // should be passed if nonce is ok
664
-
665
- elseif ( empty( $validate['result'] ) || 'passed' === $validate['result'] )
666
- $validate['result'] = 'wp-zep'; // can't overwrite existing result
667
 
668
  return $validate;
669
  }
@@ -682,7 +669,7 @@ class IP_Geo_Block {
682
 
683
  // validate malicious tags
684
  if ( preg_match( '!<(script|svg|iframe|object|applet)[^>]*>\W*\w+[^<]*<\\\\*/\1[^>]*>!', $this->query ) )
685
- return $validate + array( 'result' => 'badtag' ); // can't overwrite existing result
686
 
687
  return $validate;
688
  }
@@ -701,7 +688,7 @@ class IP_Geo_Block {
701
 
702
  private function check_ips( $validate, $ips, $which ) {
703
  if ( filter_var( $ip = $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
704
- require_once IP_GEO_BLOCK_PATH . 'includes/Net/IPv4.php';
705
 
706
  foreach ( IP_Geo_Block_Util::multiexplode( array( ",", "\n" ), $ips ) as $i ) {
707
  $j = explode( '/', $i, 2 );
@@ -714,7 +701,7 @@ class IP_Geo_Block {
714
  }
715
 
716
  elseif ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
717
- require_once IP_GEO_BLOCK_PATH . 'includes/Net/IPv6.php';
718
 
719
  foreach ( IP_Geo_Block_Util::multiexplode( array( ",", "\n" ), $ips ) as $i ) {
720
  $j = explode( '/', $i, 2 );
@@ -729,152 +716,13 @@ class IP_Geo_Block {
729
  return $validate;
730
  }
731
 
732
- /**
733
- * Validate on public facing pages.
734
- *
735
- */
736
- public function validate_public() {
737
- $settings = self::get_option();
738
- $public = &$settings['public'];
739
-
740
- // avoid redirection loop
741
- if ( $settings['response_code'] < 400 && IP_Geo_Block_Util::compare_url( $_SERVER['REQUEST_URI'], $settings['redirect_uri'] ? $settings['redirect_uri'] : home_url( '/' ) ) )
742
- return; // do not block
743
-
744
- if ( $public['target_rule'] ) {
745
- // postpone validation until 'wp' fires
746
- if ( ! did_action( 'wp' ) ) {
747
- add_action( 'wp', array( $this, 'validate_public' ) );
748
- return;
749
- }
750
-
751
- // register filter hook to check pages and post types
752
- add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_page' ), 10, 2 );
753
- }
754
-
755
- // replace "Validation rule settings"
756
- if ( -1 !== (int)$public['matching_rule'] ) {
757
- $settings['matching_rule'] = $public['matching_rule'];
758
- $settings['white_list' ] = $public['white_list' ];
759
- $settings['black_list' ] = $public['black_list' ];
760
- }
761
-
762
- // retrieve IP address of visitor via proxy services
763
- add_filter( self::PLUGIN_NAME . '-ip-addr', array( $this, 'get_proxy_ip' ), 20, 1 );
764
-
765
- // validate undesired user agent
766
- add_filter( self::PLUGIN_NAME . '-public', array( $this, 'check_bots' ), 6, 2 );
767
-
768
- // validate country by IP address (block: true, die: false)
769
- $this->validate_ip( 'public', $settings, TRUE, ! $public['simulate'] );
770
- }
771
-
772
- public function get_proxy_ip( $ip ) {
773
- if ( isset( $_SERVER['HTTP_VIA'] ) && FALSE !== strpos( $_SERVER['HTTP_VIA'], 'Chrome-Compression-Proxy' ) && isset( $_SERVER['HTTP_FORWARDED'] ) ) {
774
- // require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
775
- // if ( FALSE !== strpos( 'google', IP_Geo_Block_Lkup::gethostbyaddr( $ip ) ) )
776
- $proxy = preg_replace( '/^for=.*?([a-f\d\.:]+).*$/', '$1', $_SERVER['HTTP_FORWARDED'] );
777
- }
778
-
779
- return empty( $proxy ) ? $ip : $proxy;
780
- }
781
-
782
- public function check_page( $validate, $settings ) {
783
- global $post;
784
- $public = &$settings['public'];
785
-
786
- if ( $post ) {
787
- // check page
788
- if ( isset( $post->post_name ) && isset( $public['target_pages'][ $post->post_name ] ) )
789
- return $validate; // block by country
790
-
791
- // check post type (this would not block top page)
792
- $keys = array_keys( $public['target_posts'] );
793
- if ( ! empty( $keys ) && is_singular( $keys ) )
794
- return $validate; // block by country
795
-
796
- // check category (single page or category archive)
797
- $keys = array_keys( $public['target_cates'] );
798
- if ( ! empty( $keys ) && in_category( $keys ) && ( is_single() || is_category() ) )
799
- return $validate; // block by country
800
-
801
- // check tag (single page or tag archive)
802
- $keys = array_keys( $public['target_tags'] );
803
- if ( ! empty( $keys ) && has_tag( $keys ) && ( is_single() || is_tag() ) )
804
- return $validate; // block by country
805
- }
806
-
807
- return $validate + array( 'result' => 'passed' ); // provide content
808
- }
809
-
810
- public function check_bots( $validate, $settings ) {
811
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
812
-
813
- // get the name of host (from the cache if exists)
814
- if ( empty( $validate['host'] ) && FALSE !== strpos( $settings['public']['ua_list'], 'HOST' ) )
815
- $validate['host'] = IP_Geo_Block_Lkup::gethostbyaddr( $validate['ip'] );
816
-
817
- // check requested url
818
- $is_feed = IP_Geo_Block_Lkup::is_feed( $this->request_uri );
819
- $u_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
820
- $referer = isset( $_SERVER['HTTP_REFERER' ] ) ? $_SERVER['HTTP_REFERER' ] : '';
821
-
822
- foreach ( IP_Geo_Block_Util::multiexplode( array( ",", "\n" ), $settings['public']['ua_list'] ) as $pat ) {
823
- list( $name, $code ) = array_pad( IP_Geo_Block_Util::multiexplode( array( ':', '#' ), $pat ), 2, '' );
824
-
825
- if ( $name && ( '*' === $name || FALSE !== strpos( $u_agent, $name ) ) ) {
826
- $which = ( FALSE === strpos( $pat, ':' ) ); // 0: pass (':'), 1: block ('#')
827
- $not = ( '!' === $code[0] ); // 0: positive, 1: negative
828
- $code = ( $not ? substr( $code, 1 ) : $code ); // qualification identifier
829
-
830
- if ( 'FEED' === $code ) {
831
- if ( $not xor $is_feed )
832
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
833
- }
834
-
835
- elseif ( 'HOST' === $code ) {
836
- if ( $not xor $validate['host'] !== $validate['ip'] )
837
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
838
- }
839
-
840
- elseif ( 0 === strncmp( 'HOST=', $code, 5 ) ) {
841
- if ( $not xor FALSE !== strpos( $validate['host'], substr( $code, 5 ) ) )
842
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
843
- }
844
-
845
- elseif ( 0 === strncmp( 'REF=', $code, 4 ) ) {
846
- if ( $not xor FALSE !== strpos( $referer, substr( $code, 4 ) ) )
847
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
848
- }
849
-
850
- elseif ( '*' === $code || 2 === strlen( $code ) ) {
851
- if ( $not xor ( '*' === $code || $validate['code'] === $code ) )
852
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
853
- }
854
-
855
- elseif ( preg_match( '!^[a-f\d\.:/]+$!', $code ) ) {
856
- $name = $this->check_ips( $validate, $code, $which );
857
- if ( $not xor isset( $name['result'] ) )
858
- return $validate + array( 'result' => $which ? 'blocked' : 'passed' );
859
- }
860
- }
861
- }
862
-
863
- return $validate;
864
- }
865
-
866
  /**
867
  * Handlers of cron job
868
  *
869
  */
870
  public function update_database( $immediate = FALSE ) {
871
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
872
  return IP_Geo_Block_Cron::exec_job( $immediate );
873
  }
874
 
875
- public function exec_cache_gc() {
876
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
877
- IP_Geo_Block_Cron::exec_cache_gc( self::get_option() );
878
- }
879
-
880
  }
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
+ const VERSION = '2.2.9.1';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
41
  *
42
  */
43
  private function __construct() {
44
+ require( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php' );
45
+ require( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-load.php' );
46
+ require( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-apis.php' );
47
+ require( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php' );
48
+
49
  $settings = self::get_option();
50
+ $priority = $settings['priority'];
51
+ $validate = $settings['validation'];
52
  $loader = new IP_Geo_Block_Loader();
53
 
54
  // include drop in if it exists
55
+ @include( IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in.php' );
 
 
 
 
56
 
57
  // the action hook which will be fired by cron job
58
  if ( $settings['update']['auto'] )
108
  }
109
 
110
  else {
 
 
 
 
111
  // message text on comment form
112
  if ( $settings['comment']['pos'] ) {
113
  $key = ( 1 === (int)$settings['comment']['pos'] ? '_top' : '' );
125
  if ( $validate['login'] ) {
126
  // for hide/rename wp-login.php, BuddyPress: prevent registration and rendering form
127
  add_action( 'login_init', array( $this, 'validate_login' ), $priority );
128
+ add_action( 'bp_core_screen_signup', array( $this, 'validate_login' ), $priority );
129
+ add_action( 'bp_signup_pre_validate', array( $this, 'validate_login' ), $priority );
 
 
 
 
130
  }
131
  }
132
 
133
+ // force to change the redirect URL at logout to remove nonce, embed a nonce into pages
134
  add_filter( 'wp_redirect', array( $this, 'logout_redirect' ), 20, 2 ); // logout_redirect @4.2
135
  add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_nonce' ), $priority );
136
 
160
  *
161
  */
162
  public static function get_default() {
163
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php' );
164
  return IP_Geo_Block_Opts::get_default();
165
  }
166
 
187
  }
188
 
189
  /**
190
+ * Remove the redirecting URL at logout not to be blocked by WP-ZEP.
191
  *
192
  */
193
  public function logout_redirect( $uri ) {
219
  }
220
 
221
  /**
222
+ * Render a text message at the comment form.
223
  *
224
  */
225
  public function comment_form_message() {
248
  * @return array $result country code and so on
249
  */
250
  public static function get_geolocation( $ip = NULL, $providers = array(), $callback = 'get_country' ) {
251
+ // make valid providers list
252
  $settings = self::get_option();
253
+ if ( empty( $providers ) )
 
254
  $providers = IP_Geo_Block_Provider::get_valid_providers( $settings['providers'] );
255
 
256
  $result = self::_get_geolocation( $ip ? $ip : self::get_ip_address(), $settings, $providers, $callback );
307
  * Send response header with http status code and reason.
308
  *
309
  */
310
+ public function send_response( $hook, $code ) {
 
 
311
  // prevent caching (WP Super Cache, W3TC, Wordfence, Comet Cache)
312
  if ( ! defined( 'DONOTCACHEPAGE' ) )
313
  define( 'DONOTCACHEPAGE', TRUE );
314
 
315
+ $code = (int )apply_filters( self::PLUGIN_NAME . '-'.$hook.'-status', (int)$code );
316
+ $mesg = (string)apply_filters( self::PLUGIN_NAME . '-'.$hook.'-reason', get_status_header_desc( $code ) );
 
 
317
 
318
+ nocache_headers(); // nocache and response code
 
 
 
 
319
 
320
+ switch ( (int)substr( (string)$code, 0, 1 ) ) {
321
+ case 2: // 2xx Success
322
+ header( 'Refresh: 0; url=' . home_url(), TRUE, $code ); // @since 3.0
323
  exit;
324
 
325
+ case 3: // 3xx Redirection
326
+ IP_Geo_Block_Util::redirect( 'http://blackhole.webpagetest.org/', $code );
327
  exit;
328
 
329
  default: // 4xx Client Error, 5xx Server Error
 
 
330
  // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
331
+ 'login' === $hook and header( 'X-Robots-Tag: noindex, nofollow', FALSE );
332
+ status_header( $code ); // @since 2.0.0
333
 
334
  if ( function_exists( 'trackback_response' ) )
335
  trackback_response( $code, IP_Geo_Block_Util::kses( $mesg ) ); // @since 0.71
336
 
 
337
  elseif ( ! defined( 'DOING_AJAX' ) && ! defined( 'XMLRPC_REQUEST' ) ) {
338
  $hook = IP_Geo_Block_Util::may_be_logged_in() && 'admin' === $this->target_type;
339
+ FALSE !== ( @include( get_stylesheet_directory() .'/'.$code.'.php' ) ) or // child theme
340
+ FALSE !== ( @include( get_template_directory() .'/'.$code.'.php' ) ) or // parent theme
341
  wp_die( // get_dashboard_url() @since 3.1.0
342
  IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p><a href='" . esc_url( get_dashboard_url() ) . "'>&laquo; " . __( 'Dashboard' ) . "</a></p>" : '' ),
343
  '', array( 'response' => $code, 'back_link' => ! $hook )
381
  $providers = IP_Geo_Block_Provider::get_valid_providers( $settings['providers'] );
382
 
383
  // apply custom filter for validation
384
+ // @usage add_filter( 'ip-geo-block-$hook', 'my_validation', 10, 2 );
385
  // @param $validate = array(
386
  // 'ip' => $ip, /* validated ip address */
387
  // 'auth' => $auth, /* authenticated or not */
401
  break;
402
  }
403
 
404
+ // record log (0:no, 1:blocked, 2:passed, 3:unauth, 4:auth, 5:all)
405
+ $var = (int)apply_filters( self::PLUGIN_NAME . '-record-logs', $settings['validation']['reclogs'], $hook, $validate );
406
+ $block = ( 'passed' !== $validate['result'] );
407
+ if ( ( 1 === $var && $block ) || // blocked
408
+ ( 2 === $var && ! $block ) || // passed
409
+ ( 3 === $var && ! $validate['auth'] ) || // unauthenticated
410
+ ( 4 === $var && $validate['auth'] ) || // authenticated
411
+ ( 5 === $var ) ) { // all
412
+ IP_Geo_Block_Logs::record_logs( $hook, $validate, $settings );
413
+ }
 
414
 
415
+ // update cache
416
+ IP_Geo_Block_API_Cache::update_cache( $hook, $validate, $settings );
417
 
418
+ // update statistics
419
+ if ( $auth && $settings['save_statistics'] )
420
+ IP_Geo_Block_Logs::update_stat( $hook, $validate, $settings );
421
 
422
+ // send response code to refuse
423
+ if ( $block && $die )
424
+ $this->send_response( $hook, $settings['response_code'] );
 
425
 
426
  return $validate;
427
  }
428
 
429
  /**
430
+ * Validate at frontend.
431
  *
432
  */
 
 
 
 
433
  public function validate_front( $can_access = TRUE ) {
434
  $validate = $this->validate_ip( 'comment', self::get_option(), TRUE, FALSE );
435
  return ( 'passed' === $validate['result'] ? $can_access : FALSE );
436
  }
437
 
438
  /**
439
+ * Validate at comment.
440
+ *
441
+ */
442
+ public function validate_comment( $comment = NULL ) {
443
+ // check comment type if it comes form wp-includes/wp_new_comment()
444
+ if ( ! is_array( $comment ) || in_array( $comment['comment_type'], array( 'trackback', 'pingback' ), TRUE ) )
445
+ $this->validate_ip( 'comment', self::get_option() );
446
+
447
+ return $comment;
448
+ }
449
+
450
+ /**
451
+ * Validate at xmlrpc.
452
  *
453
  */
454
  public function validate_xmlrpc() {
468
  }
469
 
470
  /**
471
+ * Validate at login.
472
  *
473
  */
474
  public function validate_login() {
482
  $action = 'resetpass';
483
 
484
  $settings = self::get_option();
485
+ $actions = $settings['login_action'];
486
 
487
+ // the same rule is applied to login / logout
488
+ if ( ! empty( $actions['login'] ) )
489
+ $actions += array( 'logout' => 1 );
490
 
491
  // wp-includes/pluggable.php @since 2.5.0
492
  add_action( 'wp_login_failed', array( $this, 'auth_fail' ), $settings['priority'] );
493
 
494
+ // enables to skip validation of country at login/out except BuddyPress signup
495
+ $this->validate_ip( 'login', $settings,
496
+ ! empty( $actions[ $action ] ) || 'bp_' === substr( current_filter(), 0, 3 )
497
+ );
498
  }
499
 
500
  /**
501
+ * Validate at admin area.
502
  *
503
  */
504
  public function validate_admin() {
527
  $type = (int)$settings['validation']['admin'];
528
  }
529
 
530
+ // list of request with a specific query to bypass WP-ZEP
531
+ $list = apply_filters( self::PLUGIN_NAME . '-bypass-admins', array(
532
  'save-widget', 'wordfence_testAjax', 'wordfence_doScan', 'wp-compression-test', // wp-admin/includes/template.php
533
  'upload-attachment', 'imgedit-preview', 'bp_avatar_upload', // pluploader won't fire an event in "Media Library"
534
  'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', // jetpack page & action
535
+ ) );
536
 
537
  $in_action = in_array( $action, $list, TRUE );
538
  $in_page = in_array( $page, $list, TRUE );
556
  }
557
 
558
  /**
559
+ * Validate at plugins/themes area.
560
  *
561
  */
562
  public function validate_direct() {
563
  // analyze target in wp-includes, wp-content/(plugins|themes|language|uploads)
564
  $path = preg_quote( self::$wp_path[ $type = $this->target_type ], '/' );
565
  $target = ( 'plugins' === $type || 'themes' === $type ? '[^\?\&\/]*' : '[^\?\&]*' );
 
566
  preg_match( "/($path)($target)/", $this->request_uri, $target );
567
  $target = empty( $target[2] ) ? $target[1] : $target[2];
568
 
572
  $type = (int)$settings['validation'][ $type ];
573
 
574
  if ( ! in_array( $target, $path, TRUE ) ) {
575
+ // register validation of nonce (2: WP-ZEP)
576
+ if ( 2 & $type )
 
577
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 5, 2 );
 
578
 
579
  // register validation of malicious signature
580
  if ( ! IP_Geo_Block_Util::may_be_logged_in() )
608
  $validate['result'] = 'multi';
609
 
610
  $settings = self::get_option();
611
+ $cache = IP_Geo_Block_API_Cache::update_cache( $cache['hook'], $validate, $settings ); // update 'fail'
 
612
 
613
  // (1) blocked, (3) unauthenticated, (5) all
614
  if ( 1 & (int)$settings['validation']['reclogs'] )
615
+ IP_Geo_Block_Logs::record_logs( $cache['hook'], $validate, $settings );
616
 
617
  // send response code to refuse immediately
618
+ if ( $cache['fail'] > max( 0, (int)$settings['login_fails'] ) || 'multi' === $validate['result'] ) {
619
  if ( $settings['save_statistics'] )
620
  IP_Geo_Block_Logs::update_stat( $cache['hook'], $validate, $settings );
621
 
622
+ $this->send_response( $cache['hook'], $settings['response_code'] );
623
  }
624
  }
625
 
629
  public function check_fail( $validate, $settings ) {
630
  $cache = IP_Geo_Block_API_Cache::get_cache( $validate['ip'] );
631
 
632
+ // if a number of fails is exceeded, then fail
633
+ if ( $cache && $cache['fail'] > max( 0, (int)$settings['login_fails'] ) ) {
634
  if ( empty( $validate['result'] ) || 'passed' === $validate['result'] )
635
+ $validate['result'] = 'failed'; // can't overwrite existing result
636
  }
637
 
638
  return $validate;
647
  $action = self::PLUGIN_NAME . '-auth-nonce';
648
  $nonce = IP_Geo_Block_Util::retrieve_nonce( $action );
649
 
650
+ if ( ! IP_Geo_Block_Util::verify_nonce( $nonce, $action ) ) {
651
+ if ( empty( $validate['result'] ) || 'passed' === $validate['result'] )
652
+ $validate['result'] = 'wp-zep'; // can't overwrite existing result
653
+ }
 
654
 
655
  return $validate;
656
  }
669
 
670
  // validate malicious tags
671
  if ( preg_match( '!<(script|svg|iframe|object|applet)[^>]*>\W*\w+[^<]*<\\\\*/\1[^>]*>!', $this->query ) )
672
+ return $validate + array( 'result' => 'badtag' );
673
 
674
  return $validate;
675
  }
688
 
689
  private function check_ips( $validate, $ips, $which ) {
690
  if ( filter_var( $ip = $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
691
+ require_once( IP_GEO_BLOCK_PATH . 'includes/Net/IPv4.php' );
692
 
693
  foreach ( IP_Geo_Block_Util::multiexplode( array( ",", "\n" ), $ips ) as $i ) {
694
  $j = explode( '/', $i, 2 );
701
  }
702
 
703
  elseif ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {
704
+ require_once( IP_GEO_BLOCK_PATH . 'includes/Net/IPv6.php' );
705
 
706
  foreach ( IP_Geo_Block_Util::multiexplode( array( ",", "\n" ), $ips ) as $i ) {
707
  $j = explode( '/', $i, 2 );
716
  return $validate;
717
  }
718
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
  /**
720
  * Handlers of cron job
721
  *
722
  */
723
  public function update_database( $immediate = FALSE ) {
724
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php' );
725
  return IP_Geo_Block_Cron::exec_job( $immediate );
726
  }
727
 
 
 
 
 
 
728
  }
ip-geo-block.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: http://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
- * Version: 3.0.0
17
  * Author: tokkonopapa
18
  * Author URI: http://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
@@ -43,23 +43,19 @@ define( 'IP_GEO_BLOCK_BASE', plugin_basename( __FILE__ ) ); // @since 1.5
43
  * Load class
44
  *
45
  */
46
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php';
47
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php';
48
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-load.php';
49
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-apis.php';
50
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php';
51
 
52
  /**
53
  * Register hooks that are fired when the plugin is activated or deactivated.
54
  * When the plugin is deleted, the uninstall.php file is loaded.
55
  */
56
  function ip_geo_block_activate( $network_wide = FALSE ) {
57
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php';
58
  IP_Geo_Block_Activate::activate( $network_wide );
59
  }
60
 
61
  function ip_geo_block_deactivate( $network_wide = FALSE ) {
62
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php';
63
  IP_Geo_Block_Activate::deactivate( $network_wide );
64
  }
65
 
@@ -70,7 +66,6 @@ register_deactivation_hook( __FILE__, 'ip_geo_block_deactivate' );
70
  * Instantiate class
71
  *
72
  */
73
- add_action( 'shutdown', array( 'IP_Geo_Block_Logs', 'exec_sql' ) );
74
  add_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
75
 
76
  /*----------------------------------------------------------------------------*
@@ -82,7 +77,7 @@ add_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
82
  *
83
  */
84
  if ( is_admin() ) {
85
- require IP_GEO_BLOCK_PATH . 'admin/class-ip-geo-block-admin.php';
86
  add_action( 'plugins_loaded', array( 'IP_Geo_Block_Admin', 'get_instance' ) );
87
  }
88
 
@@ -94,14 +89,12 @@ endif; // ! class_exists( 'IP_Geo_Block' )
94
 
95
  /**
96
  * Invalidate blocking behavior in case yourself is locked out.
97
- *
98
- * How to use: Activate the following code and upload this file via FTP.
99
- */
100
- /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTIONS -- *
101
  function ip_geo_block_emergency( $validate ) {
102
  $validate['result'] = 'passed';
103
  return $validate;
104
  }
105
  add_filter( 'ip-geo-block-login', 'ip_geo_block_emergency' );
106
  add_filter( 'ip-geo-block-admin', 'ip_geo_block_emergency' );
107
- // */
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: http://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
+ * Version: 2.2.9.1
17
  * Author: tokkonopapa
18
  * Author URI: http://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
43
  * Load class
44
  *
45
  */
46
+ require( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php' );
 
 
 
 
47
 
48
  /**
49
  * Register hooks that are fired when the plugin is activated or deactivated.
50
  * When the plugin is deleted, the uninstall.php file is loaded.
51
  */
52
  function ip_geo_block_activate( $network_wide = FALSE ) {
53
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php' );
54
  IP_Geo_Block_Activate::activate( $network_wide );
55
  }
56
 
57
  function ip_geo_block_deactivate( $network_wide = FALSE ) {
58
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-actv.php' );
59
  IP_Geo_Block_Activate::deactivate( $network_wide );
60
  }
61
 
66
  * Instantiate class
67
  *
68
  */
 
69
  add_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
70
 
71
  /*----------------------------------------------------------------------------*
77
  *
78
  */
79
  if ( is_admin() ) {
80
+ require( IP_GEO_BLOCK_PATH . 'admin/class-ip-geo-block-admin.php' );
81
  add_action( 'plugins_loaded', array( 'IP_Geo_Block_Admin', 'get_instance' ) );
82
  }
83
 
89
 
90
  /**
91
  * Invalidate blocking behavior in case yourself is locked out.
92
+ * @note: activate the following code and upload this file via FTP.
93
+ */ /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTIONS -- *
 
 
94
  function ip_geo_block_emergency( $validate ) {
95
  $validate['result'] = 'passed';
96
  return $validate;
97
  }
98
  add_filter( 'ip-geo-block-login', 'ip_geo_block_emergency' );
99
  add_filter( 'ip-geo-block-admin', 'ip_geo_block_emergency' );
100
+ // */
languages/ip-geo-block-ja.mo CHANGED
Binary file
languages/ip-geo-block-ja.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2016-12-05 21:17+0900\n"
8
- "PO-Revision-Date: 2016-12-05 21:23+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
@@ -27,53 +27,25 @@ msgstr ""
27
  "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理"
28
  "領域への悪意あるアクセスからサイトを守ります。"
29
 
30
- #: admin/class-ip-geo-block-admin.php:161
31
- msgid "Import settings ?"
32
- msgstr "設定をインポートしますか?"
33
-
34
- #: admin/class-ip-geo-block-admin.php:162
35
- msgid "Create table ?"
36
- msgstr "テーブルを作成しますか?"
37
-
38
- #: admin/class-ip-geo-block-admin.php:163
39
- msgid "Delete table ?"
40
- msgstr "テーブルを削除しますか?"
41
-
42
- #: admin/class-ip-geo-block-admin.php:164
43
- msgid "Clear statistics ?"
44
- msgstr "統計をクリアしますか?"
45
-
46
- #: admin/class-ip-geo-block-admin.php:165
47
- msgid "Clear cache ?"
48
- msgstr "キャッシュをクリアしますか?"
49
-
50
- #: admin/class-ip-geo-block-admin.php:166
51
- msgid "Clear logs ?"
52
- msgstr "ログをクリアしますか?"
53
-
54
- #: admin/class-ip-geo-block-admin.php:167
55
- msgid "This feature is available with HTML5 compliant browsers."
56
- msgstr "HTML5準拠のブラウザでのみ機能します。"
57
-
58
- #: admin/class-ip-geo-block-admin.php:194
59
  msgid "Contribute at GitHub"
60
  msgstr "開発に参加"
61
 
62
- #: admin/class-ip-geo-block-admin.php:211
63
- #: admin/class-ip-geo-block-admin.php:365
64
  msgid "Settings"
65
  msgstr "設定"
66
 
67
- #: admin/class-ip-geo-block-admin.php:257
68
- #: admin/class-ip-geo-block-admin.php:258
69
  msgid "IP Geo Block"
70
  msgstr "IP Geo Block"
71
 
72
- #: admin/class-ip-geo-block-admin.php:279
73
  msgid "You need WordPress 3.7+."
74
  msgstr "WordPress 3.7&thinsp;以上が必要です。"
75
 
76
- #: admin/class-ip-geo-block-admin.php:287
77
  #, php-format
78
  msgid ""
79
  "Now downloading geolocation databases in background. After a little while, "
@@ -84,7 +56,7 @@ msgstr ""
84
  "いた後、あなたの国コードと「<strong>マッチング規則</strong>」を「<a href=\"%s"
85
  "\">検証ルールの設定</a>」で確認して下さい。"
86
 
87
- #: admin/class-ip-geo-block-admin.php:293
88
  #, php-format
89
  msgid ""
90
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
@@ -93,11 +65,11 @@ msgstr ""
93
  "「<strong>マッチング規則</strong>」が正しく設定されていません。「<a href=\"%s"
94
  "\">検証ルールの設定</a>」を確認して下さい。"
95
 
96
- #: admin/class-ip-geo-block-admin.php:302
97
  msgid "Local database and matching rule have been updated."
98
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
99
 
100
- #: admin/class-ip-geo-block-admin.php:313
101
  msgid ""
102
  "Once you logout, you will be unable to login again because your country code "
103
  "or IP address is in the blacklist."
@@ -105,7 +77,7 @@ msgstr ""
105
  "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウ"
106
  "トすると再びログインする事が出来なくなります。"
107
 
108
- #: admin/class-ip-geo-block-admin.php:314
109
  msgid ""
110
  "Once you logout, you will be unable to login again because your country code "
111
  "or IP address is not in the whitelist."
@@ -113,36 +85,36 @@ msgstr ""
113
  "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログア"
114
  "ウトすると再びログインする事が出来なくなります。"
115
 
116
- #: admin/class-ip-geo-block-admin.php:317
117
  #, php-format
118
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
119
  msgstr "「<a href=\"%s\">検証ルールの設定</a>」を確認して下さい。"
120
 
121
- #: admin/class-ip-geo-block-admin.php:366
122
  msgid "Statistics"
123
  msgstr "統計"
124
 
125
- #: admin/class-ip-geo-block-admin.php:367
126
  msgid "Logs"
127
  msgstr "ログ"
128
 
129
- #: admin/class-ip-geo-block-admin.php:368
130
  msgid "Search"
131
  msgstr "検索"
132
 
133
- #: admin/class-ip-geo-block-admin.php:369
134
  msgid "Attribution"
135
  msgstr "リンク"
136
 
137
- #: admin/class-ip-geo-block-admin.php:381
138
  msgid "Toggle all"
139
  msgstr "全てを開閉"
140
 
141
- #: admin/class-ip-geo-block-admin.php:405
142
  msgid "Thanks for providing these great services for free."
143
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
144
 
145
- #: admin/class-ip-geo-block-admin.php:406
146
  msgid ""
147
  "(Most browsers will redirect you to each site <a href=\"http://www."
148
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
@@ -152,23 +124,23 @@ msgstr ""
152
  "html\" title=\"Referer Checker\">参照元を残さずにリンク先にリダイレクトできま"
153
  "す</a>。)"
154
 
155
- #: admin/class-ip-geo-block-admin.php:411
156
  msgid "Back to top"
157
  msgstr "トップに戻る"
158
 
159
- #: admin/class-ip-geo-block-admin.php:503
160
  msgid "Enable"
161
  msgstr "有効"
162
 
163
- #: admin/class-ip-geo-block-admin.php:819
164
- #: admin/class-ip-geo-block-admin.php:832
165
- #: classes/class-ip-geo-block-cron.php:261
166
- #: classes/class-ip-geo-block-opts.php:310
167
  #, php-format
168
  msgid "Unable to write %s. Please check the permission."
169
  msgstr "%s に書き込めません。パーミッションを確認して下さい。"
170
 
171
- #: admin/class-ip-geo-block-admin.php:820
172
  #, php-format
173
  msgid "Or please refer to %s to set it manually."
174
  msgid_plural "Or please refer to %s to set them manually."
@@ -183,98 +155,86 @@ msgstr "n/a"
183
  msgid "UNKNOWN"
184
  msgstr "不明"
185
 
186
- #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:82
187
  msgid "Validation logs"
188
  msgstr "検証のログ"
189
 
190
- #: admin/includes/tab-accesslog.php:31
191
- msgid "Filter logs"
192
- msgstr "ログをフィルタ"
193
-
194
- #: admin/includes/tab-accesslog.php:40
195
- msgid "Reset"
196
- msgstr "リセット"
197
-
198
- #: admin/includes/tab-accesslog.php:47
199
  msgid "Clear logs"
200
  msgstr "ログのクリア"
201
 
202
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-statistics.php:171
203
- #: admin/includes/tab-statistics.php:275
204
  msgid "Clear now"
205
  msgstr "今すぐクリア"
206
 
207
- #: admin/includes/tab-accesslog.php:63
208
  msgid "Export logs"
209
  msgstr "ログをエクスポート"
210
 
211
- #: admin/includes/tab-accesslog.php:69 admin/includes/tab-settings.php:1228
212
  msgid "Export to the local file"
213
  msgstr "ローカル・ファイルにエクスポートする"
214
 
215
- #: admin/includes/tab-accesslog.php:69
216
  msgid "Export csv"
217
  msgstr "CSVをエクスポート"
218
 
219
- #: admin/includes/tab-accesslog.php:109 admin/includes/tab-settings.php:363
220
  #, php-format
221
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
222
  msgstr "<dfn title=\"%sへのリクエストを検証します。\">%s</dfn>"
223
 
224
- #: admin/includes/tab-accesslog.php:111 admin/includes/tab-settings.php:365
225
  msgid "Comment post"
226
  msgstr "コメント投稿"
227
 
228
- #: admin/includes/tab-accesslog.php:112 admin/includes/tab-settings.php:366
229
  msgid "XML-RPC"
230
  msgstr "XML-RPC"
231
 
232
- #: admin/includes/tab-accesslog.php:113 admin/includes/tab-settings.php:367
233
  msgid "Login form"
234
  msgstr "ログイン・フォーム"
235
 
236
- #: admin/includes/tab-accesslog.php:114 admin/includes/tab-settings.php:368
237
  msgid "Admin area"
238
  msgstr "管理領域"
239
 
240
- #: admin/includes/tab-accesslog.php:115 admin/includes/tab-settings.php:370
241
- msgid "Pubic facing pages"
242
- msgstr "一般公開ページ"
243
-
244
- #: admin/includes/tab-accesslog.php:121
245
  msgid "Date"
246
  msgstr "日時"
247
 
248
- #: admin/includes/tab-accesslog.php:122 admin/includes/tab-geolocation.php:65
249
  #: admin/includes/tab-statistics.php:217
250
  msgid "IP address"
251
  msgstr "IPアドレス"
252
 
253
- #: admin/includes/tab-accesslog.php:123
254
  msgid "Code"
255
  msgstr "国"
256
 
257
- #: admin/includes/tab-accesslog.php:124
258
  msgid "Result"
259
  msgstr "判定"
260
 
261
- #: admin/includes/tab-accesslog.php:125
262
  msgid "Request"
263
  msgstr "リクエスト"
264
 
265
- #: admin/includes/tab-accesslog.php:126
266
  msgid "User agent"
267
  msgstr "ユーザーエージェント"
268
 
269
- #: admin/includes/tab-accesslog.php:127
270
  msgid "HTTP headers"
271
  msgstr "HTTPヘッダ"
272
 
273
- #: admin/includes/tab-accesslog.php:128
274
  msgid "$_POST data"
275
  msgstr "$_POSTデータ"
276
 
277
- #: admin/includes/tab-accesslog.php:146
278
  msgid ""
279
  "Current selection of [<strong>Record validation logs</strong>] on "
280
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
@@ -282,7 +242,7 @@ msgstr ""
282
  "現在[<strong>設定</strong>]タブの[<strong>検証のログを記録</strong>]は"
283
  "[<strong>無効</strong>]が選択されています。"
284
 
285
- #: admin/includes/tab-accesslog.php:147
286
  msgid ""
287
  "Please select the proper condition to record and analyze the validation logs."
288
  msgstr "検証のログを記録し分析するためには、適切な条件を選択して下さい。"
@@ -368,7 +328,7 @@ msgstr "(カンマ区切り)"
368
  msgid "(comma or RET separated)"
369
  msgstr "(カンマ、または改行区切り)"
370
 
371
- #: admin/includes/tab-settings.php:107 admin/includes/tab-settings.php:671
372
  msgid "Matching rule"
373
  msgstr "マッチング規則"
374
 
@@ -436,31 +396,10 @@ msgid ""
436
  "<dfn title=\"You can put your original 403.php and so on into your theme "
437
  "directory.\">Response code</dfn> %s"
438
  msgstr ""
439
- "<dfn title=\"テーマ・ディレクトリには&thinsp;403.php&thinsp;など、独自のファ"
440
- "イルを設置する事が出来ます。\">レスポンス・コード</dfn> %s"
441
-
442
- #: admin/includes/tab-settings.php:268
443
- msgid ""
444
- "<dfn title=\"Specify the URL for response code 2xx and 3xx. Front-end URL on "
445
- "your site would not be blocked to prevent loop of redirection even when you "
446
- "enable [Front-end target settings]. Empty URL is altered to your home."
447
- "\">Redirect URL</dfn>"
448
- msgstr ""
449
- "<dfn title=\"レスポンス・コード&thinsp;2xx&thinsp;、3xx&thinsp;用のリダイレク"
450
- "ト先&thinsp;URL&thinsp;を指定します。リダイレクトのループを避けるため、自サイ"
451
- "ト内の&thinsp;URL&thinsp;は「フロントエンドの設定」に関わらず遮断の対象外とな"
452
- "ります。空欄の場合、サイトのホームが使用されます。\">リダイレクト先&thinsp;"
453
- "URL</dfn>"
454
-
455
- #: admin/includes/tab-settings.php:285
456
- msgid ""
457
- "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
458
- "message</dfn>"
459
- msgstr ""
460
- "<dfn title=\"レスポンス・コード&thinsp;4xx、5xx&thinsp;用のメッセージを指定し"
461
- "ます。\">レスポンス・メッセージ</dfn>"
462
 
463
- #: admin/includes/tab-settings.php:302
464
  msgid ""
465
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
466
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
@@ -470,23 +409,23 @@ msgstr ""
470
  "時間は「キャッシュの設定」の「有効時間」で定義されます。\">IPアドレス当たりの"
471
  "ログイン試行可能回数</dfn>"
472
 
473
- #: admin/includes/tab-settings.php:329
474
  msgid "Select when to run the validation."
475
  msgstr "検証を実行するタイミングを選択します。"
476
 
477
- #: admin/includes/tab-settings.php:329
478
  msgid "Validation timing"
479
  msgstr "検証のタイミング"
480
 
481
- #: admin/includes/tab-settings.php:340
482
  msgid "&#8220;init&#8221; action hook"
483
  msgstr "&#8220;init&#8221; アクション・フック"
484
 
485
- #: admin/includes/tab-settings.php:341
486
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
487
  msgstr "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
488
 
489
- #: admin/includes/tab-settings.php:344
490
  msgid ""
491
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
492
  "plugins."
@@ -494,7 +433,7 @@ msgstr ""
494
  "標準的な他のプラグインと同様、init アクション・フックのタイミングで検証を実行"
495
  "します。"
496
 
497
- #: admin/includes/tab-settings.php:345
498
  msgid ""
499
  "Validate at an earlier phase than other typical plugins. It can reduce load "
500
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
@@ -505,48 +444,43 @@ msgstr ""
505
  "validation-timing.html' title='Validation timing | IP Geo Block'>幾つかの制限"
506
  "事項</a>が生じます。"
507
 
508
- #: admin/includes/tab-settings.php:357
509
- msgid "Back-end target settings"
510
- msgstr "バックエンドの設定"
511
 
512
- #: admin/includes/tab-settings.php:369
513
- msgid "Other areas"
514
- msgstr "その他のディレクトリ"
515
-
516
- #: admin/includes/tab-settings.php:388 admin/includes/tab-settings.php:408
517
- #: admin/includes/tab-settings.php:441 admin/includes/tab-settings.php:447
518
- #: admin/includes/tab-settings.php:659
519
  msgid "Block by country"
520
  msgstr "国コードで遮断"
521
 
522
- #: admin/includes/tab-settings.php:407 admin/includes/tab-settings.php:514
523
- #: admin/includes/tab-settings.php:992
524
  msgid "Disable"
525
  msgstr "無効"
526
 
527
- #: admin/includes/tab-settings.php:409
528
  msgid "Completely close"
529
  msgstr "完全に閉鎖"
530
 
531
- #: admin/includes/tab-settings.php:442
532
  msgid ""
533
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
534
  "actions</dfn>"
535
  msgstr ""
536
  "<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
537
 
538
- #: admin/includes/tab-settings.php:448
539
  msgid "Prevent Zero-day Exploit"
540
  msgstr "ゼロデイ攻撃を遮断"
541
 
542
- #: admin/includes/tab-settings.php:452
543
  msgid ""
544
  "It will block a request related to the services for both public facing pages "
545
  "and the dashboard."
546
  msgstr ""
547
  "一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
548
 
549
- #: admin/includes/tab-settings.php:453
550
  msgid ""
551
  "Regardless of the country code, it will block a malicious request related to "
552
  "the services only for the dashboard."
@@ -554,15 +488,11 @@ msgstr ""
554
  "国コードに拘らず、ダッシュボード向けサービスだけに関連する悪意のあるリクエス"
555
  "トを遮断します。"
556
 
557
- #: admin/includes/tab-settings.php:480
558
  msgid "Admin ajax/post"
559
  msgstr "管理領域&thinsp;ajax/post"
560
 
561
- #: admin/includes/tab-settings.php:500
562
- msgid "Exception for admin action and page"
563
- msgstr "管理者用アクションとページの例外"
564
-
565
- #: admin/includes/tab-settings.php:516
566
  #, php-format
567
  msgid ""
568
  "Regardless of the country code, it will block a malicious request to <code>"
@@ -571,7 +501,7 @@ msgstr ""
571
  "国コードに拘らず、<code>%s&hellip;/*.php</code>への悪意のあるリクエストを遮断"
572
  "します。"
573
 
574
- #: admin/includes/tab-settings.php:517
575
  #, php-format
576
  msgid ""
577
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
@@ -580,133 +510,33 @@ msgstr ""
580
  "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするため"
581
  "に、%s を設定します。"
582
 
583
- #: admin/includes/tab-settings.php:518
584
  msgid ""
585
  "<dfn title=\"Select the item which causes undesired blocking in order to "
586
  "exclude from the validation target. Grayed item indicates &#8220;"
587
  "INACTIVE&#8221;.\">Exceptions</dfn>"
588
  msgstr ""
589
  "<dfn title=\"望ましくない遮断の原因となる項目を選択し、検証対象から除外しま"
590
- "す。斜体で表示された項目は、「非アクティブ」であることを示しています。\">除外"
591
  "する項目</dfn>"
592
 
593
- #: admin/includes/tab-settings.php:554 admin/includes/tab-settings.php:607
594
  msgid "Force to load WP core"
595
  msgstr "WPコアの読み込みを強制"
596
 
597
- #: admin/includes/tab-settings.php:559
598
  msgid "Plugins area"
599
  msgstr "プラグイン領域"
600
 
601
- #: admin/includes/tab-settings.php:612
602
  msgid "Themes area"
603
  msgstr "テーマ領域"
604
 
605
- #: admin/includes/tab-settings.php:640
606
- msgid "Front-end target settings"
607
- msgstr "フロントエンドの設定"
608
-
609
- #: admin/includes/tab-settings.php:664
610
- msgid "Follow &#8220;Validation rule settings&#8221;"
611
- msgstr "「検証ルールの設定」に従う"
612
-
613
- #: admin/includes/tab-settings.php:721
614
- msgid ""
615
- "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
616
- msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
617
-
618
- #: admin/includes/tab-settings.php:733
619
- msgid ""
620
- "<dfn title=\"Specify the individual post type on a single page as a blocking "
621
- "target.\">Post type</dfn>"
622
- msgstr ""
623
- "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿"
624
- "タイプ</dfn>"
625
-
626
- #: admin/includes/tab-settings.php:745
627
- msgid ""
628
- "<dfn title=\"Specify the individual category on a single page or archive "
629
- "page as a blocking target.\">Category</dfn>"
630
- msgstr ""
631
- "<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に"
632
- "指定します。\">カテゴリ</dfn>"
633
-
634
- #: admin/includes/tab-settings.php:757
635
- msgid ""
636
- "<dfn title=\"Specify the individual tag on a single page or archive page as "
637
- "a blocking target.\">Tag</dfn>"
638
- msgstr ""
639
- "<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定"
640
- "します。\">タグ</dfn>"
641
-
642
- #: admin/includes/tab-settings.php:772
643
- msgid "Specify the validation target on front-end."
644
- msgstr "フロント・エンドの検証対象を設定します。"
645
-
646
- #: admin/includes/tab-settings.php:772
647
- msgid "Validation target"
648
- msgstr "検証対象"
649
-
650
- #: admin/includes/tab-settings.php:783
651
- msgid "All requests"
652
- msgstr "全てのリクエスト"
653
-
654
- #: admin/includes/tab-settings.php:784
655
- msgid "Specify the targets"
656
- msgstr "ターゲットを指定"
657
-
658
- #: admin/includes/tab-settings.php:787
659
- msgid ""
660
- "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
661
- "wp&#8221; action hook. It means that this feature would not be compatible "
662
- "with any page caching."
663
- msgstr ""
664
- "「検証のタイミング」が &#8220;wp&#8221; アクション・フックまで遅延されます。"
665
- "これにより、ページ・キャッシュとの互換性がなくなることに注意してください。"
666
-
667
- #: admin/includes/tab-settings.php:797
668
- msgid ""
669
- "A part of user agent string and a qualification connected with a separator "
670
- "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
671
- "&#8220;#&#8221; (block). A &#8220;qualification&#8221; can be &#8220;"
672
- "DNS&#8221;, &#8220;FEED&#8221;, country code or IP address with CIDR. A "
673
- "negative operator &#8220;!&#8221; can be placed just before a &#8220;"
674
- "qualification&#8221;."
675
- msgstr ""
676
- "適用されるルールを表す記号(「:」は通過、「#」は遮断)で区切られたユーザー"
677
- "エージェント文字列の一部と「条件」のペアです。「条件」には「DNS」、「FEED」、"
678
- "国コード、または&nbsp;IPアドレス(CIDR記法)が使えます。また否定を表す記号"
679
- "「!」を「条件」の直前に配置する事が出来ます。"
680
-
681
- #: admin/includes/tab-settings.php:797
682
- msgid "UA string and qualification"
683
- msgstr "ユーザーエージェント文字列と条件"
684
-
685
- #: admin/includes/tab-settings.php:816
686
- msgid "Specify the name of action that is invariably blocked."
687
- msgstr "遮断されるアクション名を指定します。"
688
-
689
- #: admin/includes/tab-settings.php:816
690
- msgid "Excluded actions"
691
- msgstr "除外するアクション"
692
-
693
- #: admin/includes/tab-settings.php:835
694
- msgid ""
695
- "It enables to simulate validation without deployment. The results can be "
696
- "found at &#8220;Pubic facing pages&#8221; in Logs."
697
- msgstr ""
698
- "機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認"
699
- "する事が出来ます。"
700
-
701
- #: admin/includes/tab-settings.php:835
702
- msgid "Simulation mode"
703
- msgstr "シミュレーション・モード"
704
-
705
- #: admin/includes/tab-settings.php:854
706
  msgid "Geolocation API settings"
707
  msgstr "位置情報APIの設定"
708
 
709
- #: admin/includes/tab-settings.php:863
710
  msgid ""
711
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
712
  "selection and key settings</dfn>"
@@ -714,7 +544,7 @@ msgstr ""
714
  "<dfn title=\"キャッシュとローカルのデータベースが最優先で検索されます。\">API"
715
  "の選択とキーの設定</dfn>"
716
 
717
- #: admin/includes/tab-settings.php:885
718
  #, php-format
719
  msgid ""
720
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
@@ -731,72 +561,72 @@ msgstr ""
731
  "zip file\">ZIPファイル</a>をダウンロードし、<code>ip-geo-api</code>を書き込み"
732
  "権限付きで<code>%s</code>にアップロードして下さい。"
733
 
734
- #: admin/includes/tab-settings.php:894
735
  msgid "Local database settings"
736
  msgstr "ローカル・データベースの設定"
737
 
738
- #: admin/includes/tab-settings.php:909
739
  msgid "database"
740
  msgstr "ファイル"
741
 
742
- #: admin/includes/tab-settings.php:910 classes/class-ip-geo-block-cron.php:306
743
  #, php-format
744
  msgid "Last update: %s"
745
  msgstr "最終更新:%s"
746
 
747
- #: admin/includes/tab-settings.php:919
748
  msgid "Auto updating (once a month)"
749
  msgstr "自動更新(月1回)"
750
 
751
- #: admin/includes/tab-settings.php:936
752
  msgid "Download database"
753
  msgstr "データベースのダウンロード"
754
 
755
- #: admin/includes/tab-settings.php:944
756
  msgid "Download now"
757
  msgstr "今すぐダウンロード"
758
 
759
- #: admin/includes/tab-settings.php:956
760
  msgid "Record settings"
761
  msgstr "記録の設定"
762
 
763
- #: admin/includes/tab-settings.php:965
764
  msgid "Record validation statistics"
765
  msgstr "検証の統計を記録"
766
 
767
- #: admin/includes/tab-settings.php:981
768
  msgid "Record validation logs"
769
  msgstr "検証のログを記録"
770
 
771
- #: admin/includes/tab-settings.php:993
772
  msgid "Only when blocked"
773
  msgstr "遮断時に記録"
774
 
775
- #: admin/includes/tab-settings.php:994
776
  msgid "Only when passed"
777
  msgstr "通過時に記録"
778
 
779
- #: admin/includes/tab-settings.php:995
780
  msgid "Unauthenticated user"
781
  msgstr "未認証ユーザーを記録"
782
 
783
- #: admin/includes/tab-settings.php:996
784
  msgid "Authenticated user"
785
  msgstr "認証済ユーザーを記録"
786
 
787
- #: admin/includes/tab-settings.php:997
788
  msgid "All of validation"
789
  msgstr "すべての検証を記録"
790
 
791
- #: admin/includes/tab-settings.php:1006
792
  msgid "Recording period of the logs (days)"
793
  msgstr "ログの記録期間(日)"
794
 
795
- #: admin/includes/tab-settings.php:1022
796
  msgid "Maximum length of logs for each target"
797
- msgstr "ログの記録最大数"
798
 
799
- #: admin/includes/tab-settings.php:1039
800
  msgid ""
801
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
802
  "with their values in logs</dfn>"
@@ -804,15 +634,15 @@ msgstr ""
804
  "<dfn title=\"例)action, comment, log, pwd\">ログに記録する際に内容を展開する"
805
  "$_POSTのキー</dfn>"
806
 
807
- #: admin/includes/tab-settings.php:1057
808
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
809
  msgstr "<dfn title=\"例)123.456.789.***\">IPアドレスを匿名化する</dfn>"
810
 
811
- #: admin/includes/tab-settings.php:1075
812
- msgid "IP address cache settings"
813
- msgstr "IPアドレスのキャッシュ設定"
814
 
815
- #: admin/includes/tab-settings.php:1084
816
  #, php-format
817
  msgid ""
818
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
@@ -822,47 +652,43 @@ msgstr ""
822
  "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ"
823
  "(ガベージコレクション周期を含む)禁止されます。\">有効時間 [sec]</dfn>"
824
 
825
- #: admin/includes/tab-settings.php:1100
826
- msgid "Garbage collection period [sec]"
827
- msgstr "ガベージコレクション周期 [秒]"
828
-
829
- #: admin/includes/tab-settings.php:1117
830
  msgid "Number of entries to be displayed in cache"
831
  msgstr "「キャッシュ中のIPアドレス」に表示する最大数"
832
 
833
- #: admin/includes/tab-settings.php:1136
834
  msgid "Submission settings"
835
  msgstr "投稿時の設定"
836
 
837
- #: admin/includes/tab-settings.php:1148
838
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
839
  msgstr "全体が&lt;p&gt;タグで囲われます。使用可能タグ:"
840
 
841
- #: admin/includes/tab-settings.php:1148
842
  msgid "Message on comment form"
843
  msgstr "投稿フォーム上のメッセージ"
844
 
845
- #: admin/includes/tab-settings.php:1160
846
  msgid "None"
847
  msgstr "なし"
848
 
849
- #: admin/includes/tab-settings.php:1161
850
  msgid "Top"
851
  msgstr "上部"
852
 
853
- #: admin/includes/tab-settings.php:1162
854
  msgid "Bottom"
855
  msgstr "下部"
856
 
857
- #: admin/includes/tab-settings.php:1174
858
  msgid "Plugin settings"
859
  msgstr "プラグインの設定"
860
 
861
- #: admin/includes/tab-settings.php:1183
862
  msgid "Remove all settings at uninstallation"
863
  msgstr "アンインストール時に全設定を削除"
864
 
865
- #: admin/includes/tab-settings.php:1201
866
  msgid ""
867
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
868
  "dfn>"
@@ -870,7 +696,7 @@ msgstr ""
870
  "<dfn title=\"Google Maps JavaScript API に有効なキー\">Google Maps API キー</"
871
  "dfn>"
872
 
873
- #: admin/includes/tab-settings.php:1215
874
  msgid ""
875
  "You need to click the &#8220;Save Changes&#8221; button for imported "
876
  "settings to take effect."
@@ -878,63 +704,63 @@ msgstr ""
878
  "インポートされた設定を有効にするには、「変更を保存」ボタンをクリックする必要"
879
  "があります。"
880
 
881
- #: admin/includes/tab-settings.php:1221
882
  msgid "Export / Import settings"
883
  msgstr "設定のエクスポート、インポート"
884
 
885
- #: admin/includes/tab-settings.php:1228
886
  msgid "Export settings"
887
  msgstr "エクスポート"
888
 
889
- #: admin/includes/tab-settings.php:1229
890
  msgid "Import from the local file"
891
  msgstr "ローカル・ファイルからインポートします"
892
 
893
- #: admin/includes/tab-settings.php:1229
894
  msgid "Import settings"
895
  msgstr "インポート"
896
 
897
- #: admin/includes/tab-settings.php:1238
898
  msgid "Import pre-defined settings"
899
  msgstr "プリセットのインポート"
900
 
901
- #: admin/includes/tab-settings.php:1245
902
  msgid ""
903
  "Import the default settings to revert to the &#8220;Right after "
904
  "installing&#8221; state"
905
  msgstr "インストール直後の状態に戻すための設定値をインポートします"
906
 
907
- #: admin/includes/tab-settings.php:1245
908
  msgid "Default settings"
909
  msgstr "初期設定"
910
 
911
- #: admin/includes/tab-settings.php:1246
912
  msgid ""
913
  "Import the preferred settings mainly for the &#8220;Validation target "
914
  "settings&#8221;"
915
  msgstr "主に「検証対象の設定」に関する推奨の設定値をインポートします"
916
 
917
- #: admin/includes/tab-settings.php:1246
918
  msgid "Best practice"
919
  msgstr "ベスト・プラクティス"
920
 
921
- #: admin/includes/tab-settings.php:1256
922
  msgid "Delete DB table for validation logs"
923
  msgstr "検証のログ用データベース・テーブルの削除"
924
 
925
- #: admin/includes/tab-settings.php:1264
926
  msgid "Delete now"
927
  msgstr "今すぐ削除"
928
 
929
- #: admin/includes/tab-settings.php:1272
930
  msgid "Create DB table for validation logs"
931
  msgstr "検証のログ用データベース・テーブルの作成"
932
 
933
- #: admin/includes/tab-settings.php:1280
934
  msgid "Create now"
935
  msgstr "今すぐ作成"
936
 
937
- #: admin/includes/tab-settings.php:1295
938
  msgid ""
939
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
940
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
@@ -946,7 +772,7 @@ msgstr ""
946
  "best practice of target settings | IP Geo Block\">The best practice of "
947
  "target settings</a>&#8220;&thinsp;を参照してください。"
948
 
949
- #: admin/includes/tab-settings.php:1296
950
  msgid ""
951
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
952
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
@@ -958,7 +784,7 @@ msgstr ""
958
  "Support &raquo; IP Geo Block\" target=_blank>サポート・フォーラム</a>へご報告"
959
  "ください。"
960
 
961
- #: admin/includes/tab-settings.php:1303
962
  msgid ""
963
  "While Maxmind and IP2Location will fetch the local database, others will "
964
  "pass an IP address to the APIs via HTTP."
@@ -966,34 +792,11 @@ msgstr ""
966
  "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して"
967
  "APIにIPアドレスを渡します。"
968
 
969
- #: admin/includes/tab-settings.php:1304
970
  msgid ""
971
  "Please select the appropriate APIs to fit the privacy law in your country."
972
  msgstr "自国のプライバシー関連法規に合わせ、適切なAPIを選択して下さい。"
973
 
974
- #: admin/includes/tab-settings.php:1311
975
- msgid ""
976
- "Please refer to the document &#8220;<a href=\"http://www.ipgeoblock.com/"
977
- "codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block\" "
978
- "target=_blank>Blocking on front-end</a>&#8221; for details, including "
979
- "restrictions on cache plugin."
980
- msgstr ""
981
- "キャッシュ・プラグインに関する制限事項を含め、詳しくはドキュメント <a href="
982
- "\"http://www.ipgeoblock.com/codex/#blocking-on-front-end\">Blocking on front-"
983
- "end</a> を参照してください。"
984
-
985
- #: admin/includes/tab-settings.php:1312
986
- msgid ""
987
- "If you find any issues or have something to suggest, please feel free to "
988
- "open an issue at <a class=\"ip-geo-block-link\" href=\"http://wordpress.org/"
989
- "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
990
- "Geo Block\" target=_blank>support forum</a>."
991
- msgstr ""
992
- "問題を発見したり改善の提案がある場合は、お気軽に <a class=\"ip-geo-block-link"
993
- "\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" title="
994
- "\"WordPress &#8250; Support &raquo; IP Geo Block\" target=_blank>サポート・"
995
- "フォーラム</a> に投稿をお願いします。"
996
-
997
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
998
  msgid "Statistics of validation"
999
  msgstr "検証の統計"
@@ -1046,15 +849,15 @@ msgstr "国コード / アクセス先"
1046
  msgid "Elapsed [sec] / Calls"
1047
  msgstr "経過時間 [sec] / 回数"
1048
 
1049
- #: admin/includes/tab-statistics.php:252
1050
  msgid "IP address in cache"
1051
  msgstr "キャッシュ中のIPアドレス"
1052
 
1053
- #: admin/includes/tab-statistics.php:267
1054
  msgid "Clear cache"
1055
  msgstr "キャッシュのクリア"
1056
 
1057
- #: admin/includes/tab-statistics.php:286
1058
  msgid ""
1059
  "Current setting of [<strong>Record validation statistics</strong>] on "
1060
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
@@ -1062,13 +865,13 @@ msgstr ""
1062
  "現在[<strong>設定</strong>]タブの[<strong>検証の統計を記録</strong>]は"
1063
  "[<strong>有効</strong>]が選択されていません。"
1064
 
1065
- #: admin/includes/tab-statistics.php:287
1066
  msgid ""
1067
  "Please set the proper condition to record and analyze the validation "
1068
  "statistics."
1069
  msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
1070
 
1071
- #: classes/class-ip-geo-block-apis.php:651
1072
  msgid ""
1073
  "You need to select at least one IP geolocation service. Otherwise "
1074
  "<strong>you'll be blocked</strong> after the cache expires."
@@ -1076,16 +879,7 @@ msgstr ""
1076
  "少なくとも1つ以上の位置情報サービスを選択して下さい。未選択の場合、キャッシュ"
1077
  "の有効期限切れと共にロックアウトされます。"
1078
 
1079
- #: classes/class-ip-geo-block-cron.php:224
1080
- msgid "Your database file is up-to-date."
1081
- msgstr "データベース・ファイルは最新です。"
1082
-
1083
- #: classes/class-ip-geo-block-cron.php:253
1084
- #, php-format
1085
- msgid "Unable to read %s. Please check the permission."
1086
- msgstr "%sが読めません。パーミッションを確認して下さい。"
1087
-
1088
- #: classes/class-ip-geo-block-logs.php:131
1089
  #, php-format
1090
  msgid ""
1091
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
@@ -1094,6 +888,15 @@ msgstr ""
1094
  "%s用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化"
1095
  "して下さい。"
1096
 
 
 
 
 
 
 
 
 
 
1097
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
1098
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:174
1099
  #: wp-content/ip-geo-api/maxmind/class-maxmind.php:149
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 2.2.9.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2016-11-12 15:12+0900\n"
8
+ "PO-Revision-Date: 2016-11-12 15:21+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
27
  "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理"
28
  "領域への悪意あるアクセスからサイトを守ります。"
29
 
30
+ #: admin/class-ip-geo-block-admin.php:185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  msgid "Contribute at GitHub"
32
  msgstr "開発に参加"
33
 
34
+ #: admin/class-ip-geo-block-admin.php:202
35
+ #: admin/class-ip-geo-block-admin.php:356
36
  msgid "Settings"
37
  msgstr "設定"
38
 
39
+ #: admin/class-ip-geo-block-admin.php:248
40
+ #: admin/class-ip-geo-block-admin.php:249
41
  msgid "IP Geo Block"
42
  msgstr "IP Geo Block"
43
 
44
+ #: admin/class-ip-geo-block-admin.php:270
45
  msgid "You need WordPress 3.7+."
46
  msgstr "WordPress 3.7&thinsp;以上が必要です。"
47
 
48
+ #: admin/class-ip-geo-block-admin.php:278
49
  #, php-format
50
  msgid ""
51
  "Now downloading geolocation databases in background. After a little while, "
56
  "いた後、あなたの国コードと「<strong>マッチング規則</strong>」を「<a href=\"%s"
57
  "\">検証ルールの設定</a>」で確認して下さい。"
58
 
59
+ #: admin/class-ip-geo-block-admin.php:284
60
  #, php-format
61
  msgid ""
62
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
65
  "「<strong>マッチング規則</strong>」が正しく設定されていません。「<a href=\"%s"
66
  "\">検証ルールの設定</a>」を確認して下さい。"
67
 
68
+ #: admin/class-ip-geo-block-admin.php:293
69
  msgid "Local database and matching rule have been updated."
70
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
71
 
72
+ #: admin/class-ip-geo-block-admin.php:304
73
  msgid ""
74
  "Once you logout, you will be unable to login again because your country code "
75
  "or IP address is in the blacklist."
77
  "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウ"
78
  "トすると再びログインする事が出来なくなります。"
79
 
80
+ #: admin/class-ip-geo-block-admin.php:305
81
  msgid ""
82
  "Once you logout, you will be unable to login again because your country code "
83
  "or IP address is not in the whitelist."
85
  "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログア"
86
  "ウトすると再びログインする事が出来なくなります。"
87
 
88
+ #: admin/class-ip-geo-block-admin.php:308
89
  #, php-format
90
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
91
  msgstr "「<a href=\"%s\">検証ルールの設定</a>」を確認して下さい。"
92
 
93
+ #: admin/class-ip-geo-block-admin.php:357
94
  msgid "Statistics"
95
  msgstr "統計"
96
 
97
+ #: admin/class-ip-geo-block-admin.php:358
98
  msgid "Logs"
99
  msgstr "ログ"
100
 
101
+ #: admin/class-ip-geo-block-admin.php:359
102
  msgid "Search"
103
  msgstr "検索"
104
 
105
+ #: admin/class-ip-geo-block-admin.php:360
106
  msgid "Attribution"
107
  msgstr "リンク"
108
 
109
+ #: admin/class-ip-geo-block-admin.php:372
110
  msgid "Toggle all"
111
  msgstr "全てを開閉"
112
 
113
+ #: admin/class-ip-geo-block-admin.php:396
114
  msgid "Thanks for providing these great services for free."
115
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
116
 
117
+ #: admin/class-ip-geo-block-admin.php:397
118
  msgid ""
119
  "(Most browsers will redirect you to each site <a href=\"http://www."
120
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
124
  "html\" title=\"Referer Checker\">参照元を残さずにリンク先にリダイレクトできま"
125
  "す</a>。)"
126
 
127
+ #: admin/class-ip-geo-block-admin.php:402
128
  msgid "Back to top"
129
  msgstr "トップに戻る"
130
 
131
+ #: admin/class-ip-geo-block-admin.php:494
132
  msgid "Enable"
133
  msgstr "有効"
134
 
135
+ #: admin/class-ip-geo-block-admin.php:789
136
+ #: admin/class-ip-geo-block-admin.php:802
137
+ #: classes/class-ip-geo-block-opts.php:257
138
+ #: classes/class-ip-geo-block-util.php:114
139
  #, php-format
140
  msgid "Unable to write %s. Please check the permission."
141
  msgstr "%s に書き込めません。パーミッションを確認して下さい。"
142
 
143
+ #: admin/class-ip-geo-block-admin.php:790
144
  #, php-format
145
  msgid "Or please refer to %s to set it manually."
146
  msgid_plural "Or please refer to %s to set them manually."
155
  msgid "UNKNOWN"
156
  msgstr "不明"
157
 
158
+ #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:65
159
  msgid "Validation logs"
160
  msgstr "検証のログ"
161
 
162
+ #: admin/includes/tab-accesslog.php:30
 
 
 
 
 
 
 
 
163
  msgid "Clear logs"
164
  msgstr "ログのクリア"
165
 
166
+ #: admin/includes/tab-accesslog.php:38 admin/includes/tab-statistics.php:171
167
+ #: admin/includes/tab-statistics.php:277
168
  msgid "Clear now"
169
  msgstr "今すぐクリア"
170
 
171
+ #: admin/includes/tab-accesslog.php:46
172
  msgid "Export logs"
173
  msgstr "ログをエクスポート"
174
 
175
+ #: admin/includes/tab-accesslog.php:52 admin/includes/tab-settings.php:942
176
  msgid "Export to the local file"
177
  msgstr "ローカル・ファイルにエクスポートする"
178
 
179
+ #: admin/includes/tab-accesslog.php:52
180
  msgid "Export csv"
181
  msgstr "CSVをエクスポート"
182
 
183
+ #: admin/includes/tab-accesslog.php:92 admin/includes/tab-settings.php:330
184
  #, php-format
185
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
186
  msgstr "<dfn title=\"%sへのリクエストを検証します。\">%s</dfn>"
187
 
188
+ #: admin/includes/tab-accesslog.php:94 admin/includes/tab-settings.php:332
189
  msgid "Comment post"
190
  msgstr "コメント投稿"
191
 
192
+ #: admin/includes/tab-accesslog.php:95 admin/includes/tab-settings.php:333
193
  msgid "XML-RPC"
194
  msgstr "XML-RPC"
195
 
196
+ #: admin/includes/tab-accesslog.php:96 admin/includes/tab-settings.php:334
197
  msgid "Login form"
198
  msgstr "ログイン・フォーム"
199
 
200
+ #: admin/includes/tab-accesslog.php:97 admin/includes/tab-settings.php:335
201
  msgid "Admin area"
202
  msgstr "管理領域"
203
 
204
+ #: admin/includes/tab-accesslog.php:103
 
 
 
 
205
  msgid "Date"
206
  msgstr "日時"
207
 
208
+ #: admin/includes/tab-accesslog.php:104 admin/includes/tab-geolocation.php:65
209
  #: admin/includes/tab-statistics.php:217
210
  msgid "IP address"
211
  msgstr "IPアドレス"
212
 
213
+ #: admin/includes/tab-accesslog.php:105
214
  msgid "Code"
215
  msgstr "国"
216
 
217
+ #: admin/includes/tab-accesslog.php:106
218
  msgid "Result"
219
  msgstr "判定"
220
 
221
+ #: admin/includes/tab-accesslog.php:107
222
  msgid "Request"
223
  msgstr "リクエスト"
224
 
225
+ #: admin/includes/tab-accesslog.php:108
226
  msgid "User agent"
227
  msgstr "ユーザーエージェント"
228
 
229
+ #: admin/includes/tab-accesslog.php:109
230
  msgid "HTTP headers"
231
  msgstr "HTTPヘッダ"
232
 
233
+ #: admin/includes/tab-accesslog.php:110
234
  msgid "$_POST data"
235
  msgstr "$_POSTデータ"
236
 
237
+ #: admin/includes/tab-accesslog.php:128
238
  msgid ""
239
  "Current selection of [<strong>Record validation logs</strong>] on "
240
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
242
  "現在[<strong>設定</strong>]タブの[<strong>検証のログを記録</strong>]は"
243
  "[<strong>無効</strong>]が選択されています。"
244
 
245
+ #: admin/includes/tab-accesslog.php:129
246
  msgid ""
247
  "Please select the proper condition to record and analyze the validation logs."
248
  msgstr "検証のログを記録し分析するためには、適切な条件を選択して下さい。"
328
  msgid "(comma or RET separated)"
329
  msgstr "(カンマ、または改行区切り)"
330
 
331
+ #: admin/includes/tab-settings.php:107
332
  msgid "Matching rule"
333
  msgstr "マッチング規則"
334
 
396
  "<dfn title=\"You can put your original 403.php and so on into your theme "
397
  "directory.\">Response code</dfn> %s"
398
  msgstr ""
399
+ "<dfn title=\"テーマ・ディレクトリに独自の403.phpなどのファイルを設置する事が"
400
+ "出来ます。\">レスポンス・コード</dfn> %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
+ #: admin/includes/tab-settings.php:269
403
  msgid ""
404
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
405
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
409
  "時間は「キャッシュの設定」の「有効時間」で定義されます。\">IPアドレス当たりの"
410
  "ログイン試行可能回数</dfn>"
411
 
412
+ #: admin/includes/tab-settings.php:296
413
  msgid "Select when to run the validation."
414
  msgstr "検証を実行するタイミングを選択します。"
415
 
416
+ #: admin/includes/tab-settings.php:296
417
  msgid "Validation timing"
418
  msgstr "検証のタイミング"
419
 
420
+ #: admin/includes/tab-settings.php:307
421
  msgid "&#8220;init&#8221; action hook"
422
  msgstr "&#8220;init&#8221; アクション・フック"
423
 
424
+ #: admin/includes/tab-settings.php:308
425
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
426
  msgstr "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
427
 
428
+ #: admin/includes/tab-settings.php:311
429
  msgid ""
430
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
431
  "plugins."
433
  "標準的な他のプラグインと同様、init アクション・フックのタイミングで検証を実行"
434
  "します。"
435
 
436
+ #: admin/includes/tab-settings.php:312
437
  msgid ""
438
  "Validate at an earlier phase than other typical plugins. It can reduce load "
439
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
444
  "validation-timing.html' title='Validation timing | IP Geo Block'>幾つかの制限"
445
  "事項</a>が生じます。"
446
 
447
+ #: admin/includes/tab-settings.php:324
448
+ msgid "Validation target settings"
449
+ msgstr "検証対象の設定"
450
 
451
+ #: admin/includes/tab-settings.php:353 admin/includes/tab-settings.php:373
452
+ #: admin/includes/tab-settings.php:406 admin/includes/tab-settings.php:412
 
 
 
 
 
453
  msgid "Block by country"
454
  msgstr "国コードで遮断"
455
 
456
+ #: admin/includes/tab-settings.php:372 admin/includes/tab-settings.php:459
457
+ #: admin/includes/tab-settings.php:723
458
  msgid "Disable"
459
  msgstr "無効"
460
 
461
+ #: admin/includes/tab-settings.php:374
462
  msgid "Completely close"
463
  msgstr "完全に閉鎖"
464
 
465
+ #: admin/includes/tab-settings.php:407
466
  msgid ""
467
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
468
  "actions</dfn>"
469
  msgstr ""
470
  "<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
471
 
472
+ #: admin/includes/tab-settings.php:413
473
  msgid "Prevent Zero-day Exploit"
474
  msgstr "ゼロデイ攻撃を遮断"
475
 
476
+ #: admin/includes/tab-settings.php:416
477
  msgid ""
478
  "It will block a request related to the services for both public facing pages "
479
  "and the dashboard."
480
  msgstr ""
481
  "一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
482
 
483
+ #: admin/includes/tab-settings.php:417
484
  msgid ""
485
  "Regardless of the country code, it will block a malicious request related to "
486
  "the services only for the dashboard."
488
  "国コードに拘らず、ダッシュボード向けサービスだけに関連する悪意のあるリクエス"
489
  "トを遮断します。"
490
 
491
+ #: admin/includes/tab-settings.php:444
492
  msgid "Admin ajax/post"
493
  msgstr "管理領域&thinsp;ajax/post"
494
 
495
+ #: admin/includes/tab-settings.php:461
 
 
 
 
496
  #, php-format
497
  msgid ""
498
  "Regardless of the country code, it will block a malicious request to <code>"
501
  "国コードに拘らず、<code>%s&hellip;/*.php</code>への悪意のあるリクエストを遮断"
502
  "します。"
503
 
504
+ #: admin/includes/tab-settings.php:462
505
  #, php-format
506
  msgid ""
507
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
510
  "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするため"
511
  "に、%s を設定します。"
512
 
513
+ #: admin/includes/tab-settings.php:463
514
  msgid ""
515
  "<dfn title=\"Select the item which causes undesired blocking in order to "
516
  "exclude from the validation target. Grayed item indicates &#8220;"
517
  "INACTIVE&#8221;.\">Exceptions</dfn>"
518
  msgstr ""
519
  "<dfn title=\"望ましくない遮断の原因となる項目を選択し、検証対象から除外しま"
520
+ "す。灰色で表示された項目は、「非アクティブ」であることを示しています。\">除外"
521
  "する項目</dfn>"
522
 
523
+ #: admin/includes/tab-settings.php:499 admin/includes/tab-settings.php:552
524
  msgid "Force to load WP core"
525
  msgstr "WPコアの読み込みを強制"
526
 
527
+ #: admin/includes/tab-settings.php:504
528
  msgid "Plugins area"
529
  msgstr "プラグイン領域"
530
 
531
+ #: admin/includes/tab-settings.php:557
532
  msgid "Themes area"
533
  msgstr "テーマ領域"
534
 
535
+ #: admin/includes/tab-settings.php:585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
536
  msgid "Geolocation API settings"
537
  msgstr "位置情報APIの設定"
538
 
539
+ #: admin/includes/tab-settings.php:594
540
  msgid ""
541
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
542
  "selection and key settings</dfn>"
544
  "<dfn title=\"キャッシュとローカルのデータベースが最優先で検索されます。\">API"
545
  "の選択とキーの設定</dfn>"
546
 
547
+ #: admin/includes/tab-settings.php:616
548
  #, php-format
549
  msgid ""
550
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
561
  "zip file\">ZIPファイル</a>をダウンロードし、<code>ip-geo-api</code>を書き込み"
562
  "権限付きで<code>%s</code>にアップロードして下さい。"
563
 
564
+ #: admin/includes/tab-settings.php:625
565
  msgid "Local database settings"
566
  msgstr "ローカル・データベースの設定"
567
 
568
+ #: admin/includes/tab-settings.php:640
569
  msgid "database"
570
  msgstr "ファイル"
571
 
572
+ #: admin/includes/tab-settings.php:641 classes/class-ip-geo-block-util.php:159
573
  #, php-format
574
  msgid "Last update: %s"
575
  msgstr "最終更新:%s"
576
 
577
+ #: admin/includes/tab-settings.php:650
578
  msgid "Auto updating (once a month)"
579
  msgstr "自動更新(月1回)"
580
 
581
+ #: admin/includes/tab-settings.php:667
582
  msgid "Download database"
583
  msgstr "データベースのダウンロード"
584
 
585
+ #: admin/includes/tab-settings.php:675
586
  msgid "Download now"
587
  msgstr "今すぐダウンロード"
588
 
589
+ #: admin/includes/tab-settings.php:687
590
  msgid "Record settings"
591
  msgstr "記録の設定"
592
 
593
+ #: admin/includes/tab-settings.php:696
594
  msgid "Record validation statistics"
595
  msgstr "検証の統計を記録"
596
 
597
+ #: admin/includes/tab-settings.php:712
598
  msgid "Record validation logs"
599
  msgstr "検証のログを記録"
600
 
601
+ #: admin/includes/tab-settings.php:724
602
  msgid "Only when blocked"
603
  msgstr "遮断時に記録"
604
 
605
+ #: admin/includes/tab-settings.php:725
606
  msgid "Only when passed"
607
  msgstr "通過時に記録"
608
 
609
+ #: admin/includes/tab-settings.php:726
610
  msgid "Unauthenticated user"
611
  msgstr "未認証ユーザーを記録"
612
 
613
+ #: admin/includes/tab-settings.php:727
614
  msgid "Authenticated user"
615
  msgstr "認証済ユーザーを記録"
616
 
617
+ #: admin/includes/tab-settings.php:728
618
  msgid "All of validation"
619
  msgstr "すべての検証を記録"
620
 
621
+ #: admin/includes/tab-settings.php:737
622
  msgid "Recording period of the logs (days)"
623
  msgstr "ログの記録期間(日)"
624
 
625
+ #: admin/includes/tab-settings.php:753
626
  msgid "Maximum length of logs for each target"
627
+ msgstr "各ターゲット毎のログ最大長"
628
 
629
+ #: admin/includes/tab-settings.php:770
630
  msgid ""
631
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
632
  "with their values in logs</dfn>"
634
  "<dfn title=\"例)action, comment, log, pwd\">ログに記録する際に内容を展開する"
635
  "$_POSTのキー</dfn>"
636
 
637
+ #: admin/includes/tab-settings.php:788
638
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
639
  msgstr "<dfn title=\"例)123.456.789.***\">IPアドレスを匿名化する</dfn>"
640
 
641
+ #: admin/includes/tab-settings.php:806
642
+ msgid "Cache settings"
643
+ msgstr "キャッシュの設定"
644
 
645
+ #: admin/includes/tab-settings.php:815
646
  #, php-format
647
  msgid ""
648
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
652
  "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ"
653
  "(ガベージコレクション周期を含む)禁止されます。\">有効時間 [sec]</dfn>"
654
 
655
+ #: admin/includes/tab-settings.php:831
 
 
 
 
656
  msgid "Number of entries to be displayed in cache"
657
  msgstr "「キャッシュ中のIPアドレス」に表示する最大数"
658
 
659
+ #: admin/includes/tab-settings.php:849
660
  msgid "Submission settings"
661
  msgstr "投稿時の設定"
662
 
663
+ #: admin/includes/tab-settings.php:861
664
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
665
  msgstr "全体が&lt;p&gt;タグで囲われます。使用可能タグ:"
666
 
667
+ #: admin/includes/tab-settings.php:861
668
  msgid "Message on comment form"
669
  msgstr "投稿フォーム上のメッセージ"
670
 
671
+ #: admin/includes/tab-settings.php:873
672
  msgid "None"
673
  msgstr "なし"
674
 
675
+ #: admin/includes/tab-settings.php:874
676
  msgid "Top"
677
  msgstr "上部"
678
 
679
+ #: admin/includes/tab-settings.php:875
680
  msgid "Bottom"
681
  msgstr "下部"
682
 
683
+ #: admin/includes/tab-settings.php:887
684
  msgid "Plugin settings"
685
  msgstr "プラグインの設定"
686
 
687
+ #: admin/includes/tab-settings.php:896
688
  msgid "Remove all settings at uninstallation"
689
  msgstr "アンインストール時に全設定を削除"
690
 
691
+ #: admin/includes/tab-settings.php:915
692
  msgid ""
693
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
694
  "dfn>"
696
  "<dfn title=\"Google Maps JavaScript API に有効なキー\">Google Maps API キー</"
697
  "dfn>"
698
 
699
+ #: admin/includes/tab-settings.php:929
700
  msgid ""
701
  "You need to click the &#8220;Save Changes&#8221; button for imported "
702
  "settings to take effect."
704
  "インポートされた設定を有効にするには、「変更を保存」ボタンをクリックする必要"
705
  "があります。"
706
 
707
+ #: admin/includes/tab-settings.php:935
708
  msgid "Export / Import settings"
709
  msgstr "設定のエクスポート、インポート"
710
 
711
+ #: admin/includes/tab-settings.php:942
712
  msgid "Export settings"
713
  msgstr "エクスポート"
714
 
715
+ #: admin/includes/tab-settings.php:943
716
  msgid "Import from the local file"
717
  msgstr "ローカル・ファイルからインポートします"
718
 
719
+ #: admin/includes/tab-settings.php:943
720
  msgid "Import settings"
721
  msgstr "インポート"
722
 
723
+ #: admin/includes/tab-settings.php:952
724
  msgid "Import pre-defined settings"
725
  msgstr "プリセットのインポート"
726
 
727
+ #: admin/includes/tab-settings.php:959
728
  msgid ""
729
  "Import the default settings to revert to the &#8220;Right after "
730
  "installing&#8221; state"
731
  msgstr "インストール直後の状態に戻すための設定値をインポートします"
732
 
733
+ #: admin/includes/tab-settings.php:959
734
  msgid "Default settings"
735
  msgstr "初期設定"
736
 
737
+ #: admin/includes/tab-settings.php:960
738
  msgid ""
739
  "Import the preferred settings mainly for the &#8220;Validation target "
740
  "settings&#8221;"
741
  msgstr "主に「検証対象の設定」に関する推奨の設定値をインポートします"
742
 
743
+ #: admin/includes/tab-settings.php:960
744
  msgid "Best practice"
745
  msgstr "ベスト・プラクティス"
746
 
747
+ #: admin/includes/tab-settings.php:970
748
  msgid "Delete DB table for validation logs"
749
  msgstr "検証のログ用データベース・テーブルの削除"
750
 
751
+ #: admin/includes/tab-settings.php:978
752
  msgid "Delete now"
753
  msgstr "今すぐ削除"
754
 
755
+ #: admin/includes/tab-settings.php:986
756
  msgid "Create DB table for validation logs"
757
  msgstr "検証のログ用データベース・テーブルの作成"
758
 
759
+ #: admin/includes/tab-settings.php:994
760
  msgid "Create now"
761
  msgstr "今すぐ作成"
762
 
763
+ #: admin/includes/tab-settings.php:1009
764
  msgid ""
765
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
766
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
772
  "best practice of target settings | IP Geo Block\">The best practice of "
773
  "target settings</a>&#8220;&thinsp;を参照してください。"
774
 
775
+ #: admin/includes/tab-settings.php:1010
776
  msgid ""
777
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
778
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
784
  "Support &raquo; IP Geo Block\" target=_blank>サポート・フォーラム</a>へご報告"
785
  "ください。"
786
 
787
+ #: admin/includes/tab-settings.php:1017
788
  msgid ""
789
  "While Maxmind and IP2Location will fetch the local database, others will "
790
  "pass an IP address to the APIs via HTTP."
792
  "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して"
793
  "APIにIPアドレスを渡します。"
794
 
795
+ #: admin/includes/tab-settings.php:1018
796
  msgid ""
797
  "Please select the appropriate APIs to fit the privacy law in your country."
798
  msgstr "自国のプライバシー関連法規に合わせ、適切なAPIを選択して下さい。"
799
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
801
  msgid "Statistics of validation"
802
  msgstr "検証の統計"
849
  msgid "Elapsed [sec] / Calls"
850
  msgstr "経過時間 [sec] / 回数"
851
 
852
+ #: admin/includes/tab-statistics.php:254
853
  msgid "IP address in cache"
854
  msgstr "キャッシュ中のIPアドレス"
855
 
856
+ #: admin/includes/tab-statistics.php:269
857
  msgid "Clear cache"
858
  msgstr "キャッシュのクリア"
859
 
860
+ #: admin/includes/tab-statistics.php:288
861
  msgid ""
862
  "Current setting of [<strong>Record validation statistics</strong>] on "
863
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
865
  "現在[<strong>設定</strong>]タブの[<strong>検証の統計を記録</strong>]は"
866
  "[<strong>有効</strong>]が選択されていません。"
867
 
868
+ #: admin/includes/tab-statistics.php:289
869
  msgid ""
870
  "Please set the proper condition to record and analyze the validation "
871
  "statistics."
872
  msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
873
 
874
+ #: classes/class-ip-geo-block-apis.php:672
875
  msgid ""
876
  "You need to select at least one IP geolocation service. Otherwise "
877
  "<strong>you'll be blocked</strong> after the cache expires."
879
  "少なくとも1つ以上の位置情報サービスを選択して下さい。未選択の場合、キャッシュ"
880
  "の有効期限切れと共にロックアウトされます。"
881
 
882
+ #: classes/class-ip-geo-block-logs.php:112
 
 
 
 
 
 
 
 
 
883
  #, php-format
884
  msgid ""
885
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
888
  "%s用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化"
889
  "して下さい。"
890
 
891
+ #: classes/class-ip-geo-block-util.php:77
892
+ msgid "Your database file is up-to-date."
893
+ msgstr "データベース・ファイルは最新です。"
894
+
895
+ #: classes/class-ip-geo-block-util.php:106
896
+ #, php-format
897
+ msgid "Unable to read %s. Please check the permission."
898
+ msgstr "%sが読めません。パーミッションを確認して下さい。"
899
+
900
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
901
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:174
902
  #: wp-content/ip-geo-api/maxmind/class-maxmind.php:149
languages/ip-geo-block.mo CHANGED
Binary file
languages/ip-geo-block.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2016-12-05 21:17+0900\n"
8
- "PO-Revision-Date: 2016-12-05 21:18+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
@@ -25,53 +25,25 @@ msgid ""
25
  "posted from outside your nation, and also prevents zero-day exploit."
26
  msgstr ""
27
 
28
- #: admin/class-ip-geo-block-admin.php:161
29
- msgid "Import settings ?"
30
- msgstr ""
31
-
32
- #: admin/class-ip-geo-block-admin.php:162
33
- msgid "Create table ?"
34
- msgstr ""
35
-
36
- #: admin/class-ip-geo-block-admin.php:163
37
- msgid "Delete table ?"
38
- msgstr ""
39
-
40
- #: admin/class-ip-geo-block-admin.php:164
41
- msgid "Clear statistics ?"
42
- msgstr ""
43
-
44
- #: admin/class-ip-geo-block-admin.php:165
45
- msgid "Clear cache ?"
46
- msgstr ""
47
-
48
- #: admin/class-ip-geo-block-admin.php:166
49
- msgid "Clear logs ?"
50
- msgstr ""
51
-
52
- #: admin/class-ip-geo-block-admin.php:167
53
- msgid "This feature is available with HTML5 compliant browsers."
54
- msgstr ""
55
-
56
- #: admin/class-ip-geo-block-admin.php:194
57
  msgid "Contribute at GitHub"
58
  msgstr ""
59
 
60
- #: admin/class-ip-geo-block-admin.php:211
61
- #: admin/class-ip-geo-block-admin.php:365
62
  msgid "Settings"
63
  msgstr ""
64
 
65
- #: admin/class-ip-geo-block-admin.php:257
66
- #: admin/class-ip-geo-block-admin.php:258
67
  msgid "IP Geo Block"
68
  msgstr ""
69
 
70
- #: admin/class-ip-geo-block-admin.php:279
71
  msgid "You need WordPress 3.7+."
72
  msgstr ""
73
 
74
- #: admin/class-ip-geo-block-admin.php:287
75
  #, php-format
76
  msgid ""
77
  "Now downloading geolocation databases in background. After a little while, "
@@ -79,82 +51,82 @@ msgid ""
79
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
80
  msgstr ""
81
 
82
- #: admin/class-ip-geo-block-admin.php:293
83
  #, php-format
84
  msgid ""
85
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
86
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
87
  msgstr ""
88
 
89
- #: admin/class-ip-geo-block-admin.php:302
90
  msgid "Local database and matching rule have been updated."
91
  msgstr ""
92
 
93
- #: admin/class-ip-geo-block-admin.php:313
94
  msgid ""
95
  "Once you logout, you will be unable to login again because your country code "
96
  "or IP address is in the blacklist."
97
  msgstr ""
98
 
99
- #: admin/class-ip-geo-block-admin.php:314
100
  msgid ""
101
  "Once you logout, you will be unable to login again because your country code "
102
  "or IP address is not in the whitelist."
103
  msgstr ""
104
 
105
- #: admin/class-ip-geo-block-admin.php:317
106
  #, php-format
107
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
108
  msgstr ""
109
 
110
- #: admin/class-ip-geo-block-admin.php:366
111
  msgid "Statistics"
112
  msgstr ""
113
 
114
- #: admin/class-ip-geo-block-admin.php:367
115
  msgid "Logs"
116
  msgstr ""
117
 
118
- #: admin/class-ip-geo-block-admin.php:368
119
  msgid "Search"
120
  msgstr ""
121
 
122
- #: admin/class-ip-geo-block-admin.php:369
123
  msgid "Attribution"
124
  msgstr ""
125
 
126
- #: admin/class-ip-geo-block-admin.php:381
127
  msgid "Toggle all"
128
  msgstr ""
129
 
130
- #: admin/class-ip-geo-block-admin.php:405
131
  msgid "Thanks for providing these great services for free."
132
  msgstr ""
133
 
134
- #: admin/class-ip-geo-block-admin.php:406
135
  msgid ""
136
  "(Most browsers will redirect you to each site <a href=\"http://www."
137
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
138
  "when you click the link</a>.)"
139
  msgstr ""
140
 
141
- #: admin/class-ip-geo-block-admin.php:411
142
  msgid "Back to top"
143
  msgstr ""
144
 
145
- #: admin/class-ip-geo-block-admin.php:503
146
  msgid "Enable"
147
  msgstr ""
148
 
149
- #: admin/class-ip-geo-block-admin.php:819
150
- #: admin/class-ip-geo-block-admin.php:832
151
- #: classes/class-ip-geo-block-cron.php:261
152
- #: classes/class-ip-geo-block-opts.php:310
153
  #, php-format
154
  msgid "Unable to write %s. Please check the permission."
155
  msgstr ""
156
 
157
- #: admin/class-ip-geo-block-admin.php:820
158
  #, php-format
159
  msgid "Or please refer to %s to set it manually."
160
  msgid_plural "Or please refer to %s to set them manually."
@@ -169,104 +141,92 @@ msgstr ""
169
  msgid "UNKNOWN"
170
  msgstr ""
171
 
172
- #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:82
173
  msgid "Validation logs"
174
  msgstr ""
175
 
176
- #: admin/includes/tab-accesslog.php:31
177
- msgid "Filter logs"
178
- msgstr ""
179
-
180
- #: admin/includes/tab-accesslog.php:40
181
- msgid "Reset"
182
- msgstr ""
183
-
184
- #: admin/includes/tab-accesslog.php:47
185
  msgid "Clear logs"
186
  msgstr ""
187
 
188
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-statistics.php:171
189
- #: admin/includes/tab-statistics.php:275
190
  msgid "Clear now"
191
  msgstr ""
192
 
193
- #: admin/includes/tab-accesslog.php:63
194
  msgid "Export logs"
195
  msgstr ""
196
 
197
- #: admin/includes/tab-accesslog.php:69 admin/includes/tab-settings.php:1228
198
  msgid "Export to the local file"
199
  msgstr ""
200
 
201
- #: admin/includes/tab-accesslog.php:69
202
  msgid "Export csv"
203
  msgstr ""
204
 
205
- #: admin/includes/tab-accesslog.php:109 admin/includes/tab-settings.php:363
206
  #, php-format
207
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
208
  msgstr ""
209
 
210
- #: admin/includes/tab-accesslog.php:111 admin/includes/tab-settings.php:365
211
  msgid "Comment post"
212
  msgstr ""
213
 
214
- #: admin/includes/tab-accesslog.php:112 admin/includes/tab-settings.php:366
215
  msgid "XML-RPC"
216
  msgstr ""
217
 
218
- #: admin/includes/tab-accesslog.php:113 admin/includes/tab-settings.php:367
219
  msgid "Login form"
220
  msgstr ""
221
 
222
- #: admin/includes/tab-accesslog.php:114 admin/includes/tab-settings.php:368
223
  msgid "Admin area"
224
  msgstr ""
225
 
226
- #: admin/includes/tab-accesslog.php:115 admin/includes/tab-settings.php:370
227
- msgid "Pubic facing pages"
228
- msgstr ""
229
-
230
- #: admin/includes/tab-accesslog.php:121
231
  msgid "Date"
232
  msgstr ""
233
 
234
- #: admin/includes/tab-accesslog.php:122 admin/includes/tab-geolocation.php:65
235
  #: admin/includes/tab-statistics.php:217
236
  msgid "IP address"
237
  msgstr ""
238
 
239
- #: admin/includes/tab-accesslog.php:123
240
  msgid "Code"
241
  msgstr ""
242
 
243
- #: admin/includes/tab-accesslog.php:124
244
  msgid "Result"
245
  msgstr ""
246
 
247
- #: admin/includes/tab-accesslog.php:125
248
  msgid "Request"
249
  msgstr ""
250
 
251
- #: admin/includes/tab-accesslog.php:126
252
  msgid "User agent"
253
  msgstr ""
254
 
255
- #: admin/includes/tab-accesslog.php:127
256
  msgid "HTTP headers"
257
  msgstr ""
258
 
259
- #: admin/includes/tab-accesslog.php:128
260
  msgid "$_POST data"
261
  msgstr ""
262
 
263
- #: admin/includes/tab-accesslog.php:146
264
  msgid ""
265
  "Current selection of [<strong>Record validation logs</strong>] on "
266
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
267
  msgstr ""
268
 
269
- #: admin/includes/tab-accesslog.php:147
270
  msgid ""
271
  "Please select the proper condition to record and analyze the validation logs."
272
  msgstr ""
@@ -345,7 +305,7 @@ msgstr ""
345
  msgid "(comma or RET separated)"
346
  msgstr ""
347
 
348
- #: admin/includes/tab-settings.php:107 admin/includes/tab-settings.php:671
349
  msgid "Matching rule"
350
  msgstr ""
351
 
@@ -398,239 +358,130 @@ msgid ""
398
  "directory.\">Response code</dfn> %s"
399
  msgstr ""
400
 
401
- #: admin/includes/tab-settings.php:268
402
- msgid ""
403
- "<dfn title=\"Specify the URL for response code 2xx and 3xx. Front-end URL on "
404
- "your site would not be blocked to prevent loop of redirection even when you "
405
- "enable [Front-end target settings]. Empty URL is altered to your home."
406
- "\">Redirect URL</dfn>"
407
- msgstr ""
408
-
409
- #: admin/includes/tab-settings.php:285
410
- msgid ""
411
- "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
412
- "message</dfn>"
413
- msgstr ""
414
-
415
- #: admin/includes/tab-settings.php:302
416
  msgid ""
417
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
418
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
419
  "\">Max number of failed login attempts per IP address</dfn>"
420
  msgstr ""
421
 
422
- #: admin/includes/tab-settings.php:329
423
  msgid "Select when to run the validation."
424
  msgstr ""
425
 
426
- #: admin/includes/tab-settings.php:329
427
  msgid "Validation timing"
428
  msgstr ""
429
 
430
- #: admin/includes/tab-settings.php:340
431
  msgid "&#8220;init&#8221; action hook"
432
  msgstr ""
433
 
434
- #: admin/includes/tab-settings.php:341
435
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
436
  msgstr ""
437
 
438
- #: admin/includes/tab-settings.php:344
439
  msgid ""
440
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
441
  "plugins."
442
  msgstr ""
443
 
444
- #: admin/includes/tab-settings.php:345
445
  msgid ""
446
  "Validate at an earlier phase than other typical plugins. It can reduce load "
447
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
448
  "html' title='Validation timing | IP Geo Block'>some restrictions</a>."
449
  msgstr ""
450
 
451
- #: admin/includes/tab-settings.php:357
452
- msgid "Back-end target settings"
453
- msgstr ""
454
-
455
- #: admin/includes/tab-settings.php:369
456
- msgid "Other areas"
457
  msgstr ""
458
 
459
- #: admin/includes/tab-settings.php:388 admin/includes/tab-settings.php:408
460
- #: admin/includes/tab-settings.php:441 admin/includes/tab-settings.php:447
461
- #: admin/includes/tab-settings.php:659
462
  msgid "Block by country"
463
  msgstr ""
464
 
465
- #: admin/includes/tab-settings.php:407 admin/includes/tab-settings.php:514
466
- #: admin/includes/tab-settings.php:992
467
  msgid "Disable"
468
  msgstr ""
469
 
470
- #: admin/includes/tab-settings.php:409
471
  msgid "Completely close"
472
  msgstr ""
473
 
474
- #: admin/includes/tab-settings.php:442
475
  msgid ""
476
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
477
  "actions</dfn>"
478
  msgstr ""
479
 
480
- #: admin/includes/tab-settings.php:448
481
  msgid "Prevent Zero-day Exploit"
482
  msgstr ""
483
 
484
- #: admin/includes/tab-settings.php:452
485
  msgid ""
486
  "It will block a request related to the services for both public facing pages "
487
  "and the dashboard."
488
  msgstr ""
489
 
490
- #: admin/includes/tab-settings.php:453
491
  msgid ""
492
  "Regardless of the country code, it will block a malicious request related to "
493
  "the services only for the dashboard."
494
  msgstr ""
495
 
496
- #: admin/includes/tab-settings.php:480
497
  msgid "Admin ajax/post"
498
  msgstr ""
499
 
500
- #: admin/includes/tab-settings.php:500
501
- msgid "Exception for admin action and page"
502
- msgstr ""
503
-
504
- #: admin/includes/tab-settings.php:516
505
  #, php-format
506
  msgid ""
507
  "Regardless of the country code, it will block a malicious request to <code>"
508
  "%s&hellip;/*.php</code>."
509
  msgstr ""
510
 
511
- #: admin/includes/tab-settings.php:517
512
  #, php-format
513
  msgid ""
514
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
515
  "does not load WordPress core."
516
  msgstr ""
517
 
518
- #: admin/includes/tab-settings.php:518
519
  msgid ""
520
  "<dfn title=\"Select the item which causes undesired blocking in order to "
521
  "exclude from the validation target. Grayed item indicates &#8220;"
522
  "INACTIVE&#8221;.\">Exceptions</dfn>"
523
  msgstr ""
524
 
525
- #: admin/includes/tab-settings.php:554 admin/includes/tab-settings.php:607
526
  msgid "Force to load WP core"
527
  msgstr ""
528
 
529
- #: admin/includes/tab-settings.php:559
530
  msgid "Plugins area"
531
  msgstr ""
532
 
533
- #: admin/includes/tab-settings.php:612
534
  msgid "Themes area"
535
  msgstr ""
536
 
537
- #: admin/includes/tab-settings.php:640
538
- msgid "Front-end target settings"
539
- msgstr ""
540
-
541
- #: admin/includes/tab-settings.php:664
542
- msgid "Follow &#8220;Validation rule settings&#8221;"
543
- msgstr ""
544
-
545
- #: admin/includes/tab-settings.php:721
546
- msgid ""
547
- "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
548
- msgstr ""
549
-
550
- #: admin/includes/tab-settings.php:733
551
- msgid ""
552
- "<dfn title=\"Specify the individual post type on a single page as a blocking "
553
- "target.\">Post type</dfn>"
554
- msgstr ""
555
-
556
- #: admin/includes/tab-settings.php:745
557
- msgid ""
558
- "<dfn title=\"Specify the individual category on a single page or archive "
559
- "page as a blocking target.\">Category</dfn>"
560
- msgstr ""
561
-
562
- #: admin/includes/tab-settings.php:757
563
- msgid ""
564
- "<dfn title=\"Specify the individual tag on a single page or archive page as "
565
- "a blocking target.\">Tag</dfn>"
566
- msgstr ""
567
-
568
- #: admin/includes/tab-settings.php:772
569
- msgid "Specify the validation target on front-end."
570
- msgstr ""
571
-
572
- #: admin/includes/tab-settings.php:772
573
- msgid "Validation target"
574
- msgstr ""
575
-
576
- #: admin/includes/tab-settings.php:783
577
- msgid "All requests"
578
- msgstr ""
579
-
580
- #: admin/includes/tab-settings.php:784
581
- msgid "Specify the targets"
582
- msgstr ""
583
-
584
- #: admin/includes/tab-settings.php:787
585
- msgid ""
586
- "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
587
- "wp&#8221; action hook. It means that this feature would not be compatible "
588
- "with any page caching."
589
- msgstr ""
590
-
591
- #: admin/includes/tab-settings.php:797
592
- msgid ""
593
- "A part of user agent string and a qualification connected with a separator "
594
- "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
595
- "&#8220;#&#8221; (block). A &#8220;qualification&#8221; can be &#8220;"
596
- "DNS&#8221;, &#8220;FEED&#8221;, country code or IP address with CIDR. A "
597
- "negative operator &#8220;!&#8221; can be placed just before a &#8220;"
598
- "qualification&#8221;."
599
- msgstr ""
600
-
601
- #: admin/includes/tab-settings.php:797
602
- msgid "UA string and qualification"
603
- msgstr ""
604
-
605
- #: admin/includes/tab-settings.php:816
606
- msgid "Specify the name of action that is invariably blocked."
607
- msgstr ""
608
-
609
- #: admin/includes/tab-settings.php:816
610
- msgid "Excluded actions"
611
- msgstr ""
612
-
613
- #: admin/includes/tab-settings.php:835
614
- msgid ""
615
- "It enables to simulate validation without deployment. The results can be "
616
- "found at &#8220;Pubic facing pages&#8221; in Logs."
617
- msgstr ""
618
-
619
- #: admin/includes/tab-settings.php:835
620
- msgid "Simulation mode"
621
- msgstr ""
622
-
623
- #: admin/includes/tab-settings.php:854
624
  msgid "Geolocation API settings"
625
  msgstr ""
626
 
627
- #: admin/includes/tab-settings.php:863
628
  msgid ""
629
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
630
  "selection and key settings</dfn>"
631
  msgstr ""
632
 
633
- #: admin/includes/tab-settings.php:885
634
  #, php-format
635
  msgid ""
636
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
@@ -641,86 +492,86 @@ msgid ""
641
  "code> to <code>%s</code> with write permission."
642
  msgstr ""
643
 
644
- #: admin/includes/tab-settings.php:894
645
  msgid "Local database settings"
646
  msgstr ""
647
 
648
- #: admin/includes/tab-settings.php:909
649
  msgid "database"
650
  msgstr ""
651
 
652
- #: admin/includes/tab-settings.php:910 classes/class-ip-geo-block-cron.php:306
653
  #, php-format
654
  msgid "Last update: %s"
655
  msgstr ""
656
 
657
- #: admin/includes/tab-settings.php:919
658
  msgid "Auto updating (once a month)"
659
  msgstr ""
660
 
661
- #: admin/includes/tab-settings.php:936
662
  msgid "Download database"
663
  msgstr ""
664
 
665
- #: admin/includes/tab-settings.php:944
666
  msgid "Download now"
667
  msgstr ""
668
 
669
- #: admin/includes/tab-settings.php:956
670
  msgid "Record settings"
671
  msgstr ""
672
 
673
- #: admin/includes/tab-settings.php:965
674
  msgid "Record validation statistics"
675
  msgstr ""
676
 
677
- #: admin/includes/tab-settings.php:981
678
  msgid "Record validation logs"
679
  msgstr ""
680
 
681
- #: admin/includes/tab-settings.php:993
682
  msgid "Only when blocked"
683
  msgstr ""
684
 
685
- #: admin/includes/tab-settings.php:994
686
  msgid "Only when passed"
687
  msgstr ""
688
 
689
- #: admin/includes/tab-settings.php:995
690
  msgid "Unauthenticated user"
691
  msgstr ""
692
 
693
- #: admin/includes/tab-settings.php:996
694
  msgid "Authenticated user"
695
  msgstr ""
696
 
697
- #: admin/includes/tab-settings.php:997
698
  msgid "All of validation"
699
  msgstr ""
700
 
701
- #: admin/includes/tab-settings.php:1006
702
  msgid "Recording period of the logs (days)"
703
  msgstr ""
704
 
705
- #: admin/includes/tab-settings.php:1022
706
  msgid "Maximum length of logs for each target"
707
  msgstr ""
708
 
709
- #: admin/includes/tab-settings.php:1039
710
  msgid ""
711
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
712
  "with their values in logs</dfn>"
713
  msgstr ""
714
 
715
- #: admin/includes/tab-settings.php:1057
716
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
717
  msgstr ""
718
 
719
- #: admin/includes/tab-settings.php:1075
720
- msgid "IP address cache settings"
721
  msgstr ""
722
 
723
- #: admin/includes/tab-settings.php:1084
724
  #, php-format
725
  msgid ""
726
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
@@ -728,115 +579,111 @@ msgid ""
728
  "\">Expiration time [sec]</dfn>"
729
  msgstr ""
730
 
731
- #: admin/includes/tab-settings.php:1100
732
- msgid "Garbage collection period [sec]"
733
- msgstr ""
734
-
735
- #: admin/includes/tab-settings.php:1117
736
  msgid "Number of entries to be displayed in cache"
737
  msgstr ""
738
 
739
- #: admin/includes/tab-settings.php:1136
740
  msgid "Submission settings"
741
  msgstr ""
742
 
743
- #: admin/includes/tab-settings.php:1148
744
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
745
  msgstr ""
746
 
747
- #: admin/includes/tab-settings.php:1148
748
  msgid "Message on comment form"
749
  msgstr ""
750
 
751
- #: admin/includes/tab-settings.php:1160
752
  msgid "None"
753
  msgstr ""
754
 
755
- #: admin/includes/tab-settings.php:1161
756
  msgid "Top"
757
  msgstr ""
758
 
759
- #: admin/includes/tab-settings.php:1162
760
  msgid "Bottom"
761
  msgstr ""
762
 
763
- #: admin/includes/tab-settings.php:1174
764
  msgid "Plugin settings"
765
  msgstr ""
766
 
767
- #: admin/includes/tab-settings.php:1183
768
  msgid "Remove all settings at uninstallation"
769
  msgstr ""
770
 
771
- #: admin/includes/tab-settings.php:1201
772
  msgid ""
773
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
774
  "dfn>"
775
  msgstr ""
776
 
777
- #: admin/includes/tab-settings.php:1215
778
  msgid ""
779
  "You need to click the &#8220;Save Changes&#8221; button for imported "
780
  "settings to take effect."
781
  msgstr ""
782
 
783
- #: admin/includes/tab-settings.php:1221
784
  msgid "Export / Import settings"
785
  msgstr ""
786
 
787
- #: admin/includes/tab-settings.php:1228
788
  msgid "Export settings"
789
  msgstr ""
790
 
791
- #: admin/includes/tab-settings.php:1229
792
  msgid "Import from the local file"
793
  msgstr ""
794
 
795
- #: admin/includes/tab-settings.php:1229
796
  msgid "Import settings"
797
  msgstr ""
798
 
799
- #: admin/includes/tab-settings.php:1238
800
  msgid "Import pre-defined settings"
801
  msgstr ""
802
 
803
- #: admin/includes/tab-settings.php:1245
804
  msgid ""
805
  "Import the default settings to revert to the &#8220;Right after "
806
  "installing&#8221; state"
807
  msgstr ""
808
 
809
- #: admin/includes/tab-settings.php:1245
810
  msgid "Default settings"
811
  msgstr ""
812
 
813
- #: admin/includes/tab-settings.php:1246
814
  msgid ""
815
  "Import the preferred settings mainly for the &#8220;Validation target "
816
  "settings&#8221;"
817
  msgstr ""
818
 
819
- #: admin/includes/tab-settings.php:1246
820
  msgid "Best practice"
821
  msgstr ""
822
 
823
- #: admin/includes/tab-settings.php:1256
824
  msgid "Delete DB table for validation logs"
825
  msgstr ""
826
 
827
- #: admin/includes/tab-settings.php:1264
828
  msgid "Delete now"
829
  msgstr ""
830
 
831
- #: admin/includes/tab-settings.php:1272
832
  msgid "Create DB table for validation logs"
833
  msgstr ""
834
 
835
- #: admin/includes/tab-settings.php:1280
836
  msgid "Create now"
837
  msgstr ""
838
 
839
- #: admin/includes/tab-settings.php:1295
840
  msgid ""
841
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
842
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
@@ -844,7 +691,7 @@ msgid ""
844
  "target settings</a>&#8221;."
845
  msgstr ""
846
 
847
- #: admin/includes/tab-settings.php:1296
848
  msgid ""
849
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
850
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
@@ -852,33 +699,17 @@ msgid ""
852
  "target=_blank>support forum</a>."
853
  msgstr ""
854
 
855
- #: admin/includes/tab-settings.php:1303
856
  msgid ""
857
  "While Maxmind and IP2Location will fetch the local database, others will "
858
  "pass an IP address to the APIs via HTTP."
859
  msgstr ""
860
 
861
- #: admin/includes/tab-settings.php:1304
862
  msgid ""
863
  "Please select the appropriate APIs to fit the privacy law in your country."
864
  msgstr ""
865
 
866
- #: admin/includes/tab-settings.php:1311
867
- msgid ""
868
- "Please refer to the document &#8220;<a href=\"http://www.ipgeoblock.com/"
869
- "codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block\" "
870
- "target=_blank>Blocking on front-end</a>&#8221; for details, including "
871
- "restrictions on cache plugin."
872
- msgstr ""
873
-
874
- #: admin/includes/tab-settings.php:1312
875
- msgid ""
876
- "If you find any issues or have something to suggest, please feel free to "
877
- "open an issue at <a class=\"ip-geo-block-link\" href=\"http://wordpress.org/"
878
- "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
879
- "Geo Block\" target=_blank>support forum</a>."
880
- msgstr ""
881
-
882
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
883
  msgid "Statistics of validation"
884
  msgstr ""
@@ -931,46 +762,46 @@ msgstr ""
931
  msgid "Elapsed [sec] / Calls"
932
  msgstr ""
933
 
934
- #: admin/includes/tab-statistics.php:252
935
  msgid "IP address in cache"
936
  msgstr ""
937
 
938
- #: admin/includes/tab-statistics.php:267
939
  msgid "Clear cache"
940
  msgstr ""
941
 
942
- #: admin/includes/tab-statistics.php:286
943
  msgid ""
944
  "Current setting of [<strong>Record validation statistics</strong>] on "
945
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
946
  msgstr ""
947
 
948
- #: admin/includes/tab-statistics.php:287
949
  msgid ""
950
  "Please set the proper condition to record and analyze the validation "
951
  "statistics."
952
  msgstr ""
953
 
954
- #: classes/class-ip-geo-block-apis.php:651
955
  msgid ""
956
  "You need to select at least one IP geolocation service. Otherwise "
957
  "<strong>you'll be blocked</strong> after the cache expires."
958
  msgstr ""
959
 
960
- #: classes/class-ip-geo-block-cron.php:224
961
- msgid "Your database file is up-to-date."
 
 
 
962
  msgstr ""
963
 
964
- #: classes/class-ip-geo-block-cron.php:253
965
- #, php-format
966
- msgid "Unable to read %s. Please check the permission."
967
  msgstr ""
968
 
969
- #: classes/class-ip-geo-block-logs.php:131
970
  #, php-format
971
- msgid ""
972
- "Creating a DB table %s had failed. Once de-activate this plugin, and then "
973
- "activate again."
974
  msgstr ""
975
 
976
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 2.2.9.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2016-11-12 15:12+0900\n"
8
+ "PO-Revision-Date: 2016-11-12 15:14+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
25
  "posted from outside your nation, and also prevents zero-day exploit."
26
  msgstr ""
27
 
28
+ #: admin/class-ip-geo-block-admin.php:185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  msgid "Contribute at GitHub"
30
  msgstr ""
31
 
32
+ #: admin/class-ip-geo-block-admin.php:202
33
+ #: admin/class-ip-geo-block-admin.php:356
34
  msgid "Settings"
35
  msgstr ""
36
 
37
+ #: admin/class-ip-geo-block-admin.php:248
38
+ #: admin/class-ip-geo-block-admin.php:249
39
  msgid "IP Geo Block"
40
  msgstr ""
41
 
42
+ #: admin/class-ip-geo-block-admin.php:270
43
  msgid "You need WordPress 3.7+."
44
  msgstr ""
45
 
46
+ #: admin/class-ip-geo-block-admin.php:278
47
  #, php-format
48
  msgid ""
49
  "Now downloading geolocation databases in background. After a little while, "
51
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
52
  msgstr ""
53
 
54
+ #: admin/class-ip-geo-block-admin.php:284
55
  #, php-format
56
  msgid ""
57
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
58
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
59
  msgstr ""
60
 
61
+ #: admin/class-ip-geo-block-admin.php:293
62
  msgid "Local database and matching rule have been updated."
63
  msgstr ""
64
 
65
+ #: admin/class-ip-geo-block-admin.php:304
66
  msgid ""
67
  "Once you logout, you will be unable to login again because your country code "
68
  "or IP address is in the blacklist."
69
  msgstr ""
70
 
71
+ #: admin/class-ip-geo-block-admin.php:305
72
  msgid ""
73
  "Once you logout, you will be unable to login again because your country code "
74
  "or IP address is not in the whitelist."
75
  msgstr ""
76
 
77
+ #: admin/class-ip-geo-block-admin.php:308
78
  #, php-format
79
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
80
  msgstr ""
81
 
82
+ #: admin/class-ip-geo-block-admin.php:357
83
  msgid "Statistics"
84
  msgstr ""
85
 
86
+ #: admin/class-ip-geo-block-admin.php:358
87
  msgid "Logs"
88
  msgstr ""
89
 
90
+ #: admin/class-ip-geo-block-admin.php:359
91
  msgid "Search"
92
  msgstr ""
93
 
94
+ #: admin/class-ip-geo-block-admin.php:360
95
  msgid "Attribution"
96
  msgstr ""
97
 
98
+ #: admin/class-ip-geo-block-admin.php:372
99
  msgid "Toggle all"
100
  msgstr ""
101
 
102
+ #: admin/class-ip-geo-block-admin.php:396
103
  msgid "Thanks for providing these great services for free."
104
  msgstr ""
105
 
106
+ #: admin/class-ip-geo-block-admin.php:397
107
  msgid ""
108
  "(Most browsers will redirect you to each site <a href=\"http://www."
109
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
110
  "when you click the link</a>.)"
111
  msgstr ""
112
 
113
+ #: admin/class-ip-geo-block-admin.php:402
114
  msgid "Back to top"
115
  msgstr ""
116
 
117
+ #: admin/class-ip-geo-block-admin.php:494
118
  msgid "Enable"
119
  msgstr ""
120
 
121
+ #: admin/class-ip-geo-block-admin.php:789
122
+ #: admin/class-ip-geo-block-admin.php:802
123
+ #: classes/class-ip-geo-block-opts.php:257
124
+ #: classes/class-ip-geo-block-util.php:114
125
  #, php-format
126
  msgid "Unable to write %s. Please check the permission."
127
  msgstr ""
128
 
129
+ #: admin/class-ip-geo-block-admin.php:790
130
  #, php-format
131
  msgid "Or please refer to %s to set it manually."
132
  msgid_plural "Or please refer to %s to set them manually."
141
  msgid "UNKNOWN"
142
  msgstr ""
143
 
144
+ #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:65
145
  msgid "Validation logs"
146
  msgstr ""
147
 
148
+ #: admin/includes/tab-accesslog.php:30
 
 
 
 
 
 
 
 
149
  msgid "Clear logs"
150
  msgstr ""
151
 
152
+ #: admin/includes/tab-accesslog.php:38 admin/includes/tab-statistics.php:171
153
+ #: admin/includes/tab-statistics.php:277
154
  msgid "Clear now"
155
  msgstr ""
156
 
157
+ #: admin/includes/tab-accesslog.php:46
158
  msgid "Export logs"
159
  msgstr ""
160
 
161
+ #: admin/includes/tab-accesslog.php:52 admin/includes/tab-settings.php:942
162
  msgid "Export to the local file"
163
  msgstr ""
164
 
165
+ #: admin/includes/tab-accesslog.php:52
166
  msgid "Export csv"
167
  msgstr ""
168
 
169
+ #: admin/includes/tab-accesslog.php:92 admin/includes/tab-settings.php:330
170
  #, php-format
171
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
172
  msgstr ""
173
 
174
+ #: admin/includes/tab-accesslog.php:94 admin/includes/tab-settings.php:332
175
  msgid "Comment post"
176
  msgstr ""
177
 
178
+ #: admin/includes/tab-accesslog.php:95 admin/includes/tab-settings.php:333
179
  msgid "XML-RPC"
180
  msgstr ""
181
 
182
+ #: admin/includes/tab-accesslog.php:96 admin/includes/tab-settings.php:334
183
  msgid "Login form"
184
  msgstr ""
185
 
186
+ #: admin/includes/tab-accesslog.php:97 admin/includes/tab-settings.php:335
187
  msgid "Admin area"
188
  msgstr ""
189
 
190
+ #: admin/includes/tab-accesslog.php:103
 
 
 
 
191
  msgid "Date"
192
  msgstr ""
193
 
194
+ #: admin/includes/tab-accesslog.php:104 admin/includes/tab-geolocation.php:65
195
  #: admin/includes/tab-statistics.php:217
196
  msgid "IP address"
197
  msgstr ""
198
 
199
+ #: admin/includes/tab-accesslog.php:105
200
  msgid "Code"
201
  msgstr ""
202
 
203
+ #: admin/includes/tab-accesslog.php:106
204
  msgid "Result"
205
  msgstr ""
206
 
207
+ #: admin/includes/tab-accesslog.php:107
208
  msgid "Request"
209
  msgstr ""
210
 
211
+ #: admin/includes/tab-accesslog.php:108
212
  msgid "User agent"
213
  msgstr ""
214
 
215
+ #: admin/includes/tab-accesslog.php:109
216
  msgid "HTTP headers"
217
  msgstr ""
218
 
219
+ #: admin/includes/tab-accesslog.php:110
220
  msgid "$_POST data"
221
  msgstr ""
222
 
223
+ #: admin/includes/tab-accesslog.php:128
224
  msgid ""
225
  "Current selection of [<strong>Record validation logs</strong>] on "
226
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
227
  msgstr ""
228
 
229
+ #: admin/includes/tab-accesslog.php:129
230
  msgid ""
231
  "Please select the proper condition to record and analyze the validation logs."
232
  msgstr ""
305
  msgid "(comma or RET separated)"
306
  msgstr ""
307
 
308
+ #: admin/includes/tab-settings.php:107
309
  msgid "Matching rule"
310
  msgstr ""
311
 
358
  "directory.\">Response code</dfn> %s"
359
  msgstr ""
360
 
361
+ #: admin/includes/tab-settings.php:269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  msgid ""
363
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
364
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
365
  "\">Max number of failed login attempts per IP address</dfn>"
366
  msgstr ""
367
 
368
+ #: admin/includes/tab-settings.php:296
369
  msgid "Select when to run the validation."
370
  msgstr ""
371
 
372
+ #: admin/includes/tab-settings.php:296
373
  msgid "Validation timing"
374
  msgstr ""
375
 
376
+ #: admin/includes/tab-settings.php:307
377
  msgid "&#8220;init&#8221; action hook"
378
  msgstr ""
379
 
380
+ #: admin/includes/tab-settings.php:308
381
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
382
  msgstr ""
383
 
384
+ #: admin/includes/tab-settings.php:311
385
  msgid ""
386
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
387
  "plugins."
388
  msgstr ""
389
 
390
+ #: admin/includes/tab-settings.php:312
391
  msgid ""
392
  "Validate at an earlier phase than other typical plugins. It can reduce load "
393
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
394
  "html' title='Validation timing | IP Geo Block'>some restrictions</a>."
395
  msgstr ""
396
 
397
+ #: admin/includes/tab-settings.php:324
398
+ msgid "Validation target settings"
 
 
 
 
399
  msgstr ""
400
 
401
+ #: admin/includes/tab-settings.php:353 admin/includes/tab-settings.php:373
402
+ #: admin/includes/tab-settings.php:406 admin/includes/tab-settings.php:412
 
403
  msgid "Block by country"
404
  msgstr ""
405
 
406
+ #: admin/includes/tab-settings.php:372 admin/includes/tab-settings.php:459
407
+ #: admin/includes/tab-settings.php:723
408
  msgid "Disable"
409
  msgstr ""
410
 
411
+ #: admin/includes/tab-settings.php:374
412
  msgid "Completely close"
413
  msgstr ""
414
 
415
+ #: admin/includes/tab-settings.php:407
416
  msgid ""
417
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
418
  "actions</dfn>"
419
  msgstr ""
420
 
421
+ #: admin/includes/tab-settings.php:413
422
  msgid "Prevent Zero-day Exploit"
423
  msgstr ""
424
 
425
+ #: admin/includes/tab-settings.php:416
426
  msgid ""
427
  "It will block a request related to the services for both public facing pages "
428
  "and the dashboard."
429
  msgstr ""
430
 
431
+ #: admin/includes/tab-settings.php:417
432
  msgid ""
433
  "Regardless of the country code, it will block a malicious request related to "
434
  "the services only for the dashboard."
435
  msgstr ""
436
 
437
+ #: admin/includes/tab-settings.php:444
438
  msgid "Admin ajax/post"
439
  msgstr ""
440
 
441
+ #: admin/includes/tab-settings.php:461
 
 
 
 
442
  #, php-format
443
  msgid ""
444
  "Regardless of the country code, it will block a malicious request to <code>"
445
  "%s&hellip;/*.php</code>."
446
  msgstr ""
447
 
448
+ #: admin/includes/tab-settings.php:462
449
  #, php-format
450
  msgid ""
451
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
452
  "does not load WordPress core."
453
  msgstr ""
454
 
455
+ #: admin/includes/tab-settings.php:463
456
  msgid ""
457
  "<dfn title=\"Select the item which causes undesired blocking in order to "
458
  "exclude from the validation target. Grayed item indicates &#8220;"
459
  "INACTIVE&#8221;.\">Exceptions</dfn>"
460
  msgstr ""
461
 
462
+ #: admin/includes/tab-settings.php:499 admin/includes/tab-settings.php:552
463
  msgid "Force to load WP core"
464
  msgstr ""
465
 
466
+ #: admin/includes/tab-settings.php:504
467
  msgid "Plugins area"
468
  msgstr ""
469
 
470
+ #: admin/includes/tab-settings.php:557
471
  msgid "Themes area"
472
  msgstr ""
473
 
474
+ #: admin/includes/tab-settings.php:585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  msgid "Geolocation API settings"
476
  msgstr ""
477
 
478
+ #: admin/includes/tab-settings.php:594
479
  msgid ""
480
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
481
  "selection and key settings</dfn>"
482
  msgstr ""
483
 
484
+ #: admin/includes/tab-settings.php:616
485
  #, php-format
486
  msgid ""
487
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
492
  "code> to <code>%s</code> with write permission."
493
  msgstr ""
494
 
495
+ #: admin/includes/tab-settings.php:625
496
  msgid "Local database settings"
497
  msgstr ""
498
 
499
+ #: admin/includes/tab-settings.php:640
500
  msgid "database"
501
  msgstr ""
502
 
503
+ #: admin/includes/tab-settings.php:641 classes/class-ip-geo-block-util.php:159
504
  #, php-format
505
  msgid "Last update: %s"
506
  msgstr ""
507
 
508
+ #: admin/includes/tab-settings.php:650
509
  msgid "Auto updating (once a month)"
510
  msgstr ""
511
 
512
+ #: admin/includes/tab-settings.php:667
513
  msgid "Download database"
514
  msgstr ""
515
 
516
+ #: admin/includes/tab-settings.php:675
517
  msgid "Download now"
518
  msgstr ""
519
 
520
+ #: admin/includes/tab-settings.php:687
521
  msgid "Record settings"
522
  msgstr ""
523
 
524
+ #: admin/includes/tab-settings.php:696
525
  msgid "Record validation statistics"
526
  msgstr ""
527
 
528
+ #: admin/includes/tab-settings.php:712
529
  msgid "Record validation logs"
530
  msgstr ""
531
 
532
+ #: admin/includes/tab-settings.php:724
533
  msgid "Only when blocked"
534
  msgstr ""
535
 
536
+ #: admin/includes/tab-settings.php:725
537
  msgid "Only when passed"
538
  msgstr ""
539
 
540
+ #: admin/includes/tab-settings.php:726
541
  msgid "Unauthenticated user"
542
  msgstr ""
543
 
544
+ #: admin/includes/tab-settings.php:727
545
  msgid "Authenticated user"
546
  msgstr ""
547
 
548
+ #: admin/includes/tab-settings.php:728
549
  msgid "All of validation"
550
  msgstr ""
551
 
552
+ #: admin/includes/tab-settings.php:737
553
  msgid "Recording period of the logs (days)"
554
  msgstr ""
555
 
556
+ #: admin/includes/tab-settings.php:753
557
  msgid "Maximum length of logs for each target"
558
  msgstr ""
559
 
560
+ #: admin/includes/tab-settings.php:770
561
  msgid ""
562
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
563
  "with their values in logs</dfn>"
564
  msgstr ""
565
 
566
+ #: admin/includes/tab-settings.php:788
567
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
568
  msgstr ""
569
 
570
+ #: admin/includes/tab-settings.php:806
571
+ msgid "Cache settings"
572
  msgstr ""
573
 
574
+ #: admin/includes/tab-settings.php:815
575
  #, php-format
576
  msgid ""
577
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
579
  "\">Expiration time [sec]</dfn>"
580
  msgstr ""
581
 
582
+ #: admin/includes/tab-settings.php:831
 
 
 
 
583
  msgid "Number of entries to be displayed in cache"
584
  msgstr ""
585
 
586
+ #: admin/includes/tab-settings.php:849
587
  msgid "Submission settings"
588
  msgstr ""
589
 
590
+ #: admin/includes/tab-settings.php:861
591
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
592
  msgstr ""
593
 
594
+ #: admin/includes/tab-settings.php:861
595
  msgid "Message on comment form"
596
  msgstr ""
597
 
598
+ #: admin/includes/tab-settings.php:873
599
  msgid "None"
600
  msgstr ""
601
 
602
+ #: admin/includes/tab-settings.php:874
603
  msgid "Top"
604
  msgstr ""
605
 
606
+ #: admin/includes/tab-settings.php:875
607
  msgid "Bottom"
608
  msgstr ""
609
 
610
+ #: admin/includes/tab-settings.php:887
611
  msgid "Plugin settings"
612
  msgstr ""
613
 
614
+ #: admin/includes/tab-settings.php:896
615
  msgid "Remove all settings at uninstallation"
616
  msgstr ""
617
 
618
+ #: admin/includes/tab-settings.php:915
619
  msgid ""
620
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
621
  "dfn>"
622
  msgstr ""
623
 
624
+ #: admin/includes/tab-settings.php:929
625
  msgid ""
626
  "You need to click the &#8220;Save Changes&#8221; button for imported "
627
  "settings to take effect."
628
  msgstr ""
629
 
630
+ #: admin/includes/tab-settings.php:935
631
  msgid "Export / Import settings"
632
  msgstr ""
633
 
634
+ #: admin/includes/tab-settings.php:942
635
  msgid "Export settings"
636
  msgstr ""
637
 
638
+ #: admin/includes/tab-settings.php:943
639
  msgid "Import from the local file"
640
  msgstr ""
641
 
642
+ #: admin/includes/tab-settings.php:943
643
  msgid "Import settings"
644
  msgstr ""
645
 
646
+ #: admin/includes/tab-settings.php:952
647
  msgid "Import pre-defined settings"
648
  msgstr ""
649
 
650
+ #: admin/includes/tab-settings.php:959
651
  msgid ""
652
  "Import the default settings to revert to the &#8220;Right after "
653
  "installing&#8221; state"
654
  msgstr ""
655
 
656
+ #: admin/includes/tab-settings.php:959
657
  msgid "Default settings"
658
  msgstr ""
659
 
660
+ #: admin/includes/tab-settings.php:960
661
  msgid ""
662
  "Import the preferred settings mainly for the &#8220;Validation target "
663
  "settings&#8221;"
664
  msgstr ""
665
 
666
+ #: admin/includes/tab-settings.php:960
667
  msgid "Best practice"
668
  msgstr ""
669
 
670
+ #: admin/includes/tab-settings.php:970
671
  msgid "Delete DB table for validation logs"
672
  msgstr ""
673
 
674
+ #: admin/includes/tab-settings.php:978
675
  msgid "Delete now"
676
  msgstr ""
677
 
678
+ #: admin/includes/tab-settings.php:986
679
  msgid "Create DB table for validation logs"
680
  msgstr ""
681
 
682
+ #: admin/includes/tab-settings.php:994
683
  msgid "Create now"
684
  msgstr ""
685
 
686
+ #: admin/includes/tab-settings.php:1009
687
  msgid ""
688
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
689
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
691
  "target settings</a>&#8221;."
692
  msgstr ""
693
 
694
+ #: admin/includes/tab-settings.php:1010
695
  msgid ""
696
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
697
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
699
  "target=_blank>support forum</a>."
700
  msgstr ""
701
 
702
+ #: admin/includes/tab-settings.php:1017
703
  msgid ""
704
  "While Maxmind and IP2Location will fetch the local database, others will "
705
  "pass an IP address to the APIs via HTTP."
706
  msgstr ""
707
 
708
+ #: admin/includes/tab-settings.php:1018
709
  msgid ""
710
  "Please select the appropriate APIs to fit the privacy law in your country."
711
  msgstr ""
712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
714
  msgid "Statistics of validation"
715
  msgstr ""
762
  msgid "Elapsed [sec] / Calls"
763
  msgstr ""
764
 
765
+ #: admin/includes/tab-statistics.php:254
766
  msgid "IP address in cache"
767
  msgstr ""
768
 
769
+ #: admin/includes/tab-statistics.php:269
770
  msgid "Clear cache"
771
  msgstr ""
772
 
773
+ #: admin/includes/tab-statistics.php:288
774
  msgid ""
775
  "Current setting of [<strong>Record validation statistics</strong>] on "
776
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
777
  msgstr ""
778
 
779
+ #: admin/includes/tab-statistics.php:289
780
  msgid ""
781
  "Please set the proper condition to record and analyze the validation "
782
  "statistics."
783
  msgstr ""
784
 
785
+ #: classes/class-ip-geo-block-apis.php:672
786
  msgid ""
787
  "You need to select at least one IP geolocation service. Otherwise "
788
  "<strong>you'll be blocked</strong> after the cache expires."
789
  msgstr ""
790
 
791
+ #: classes/class-ip-geo-block-logs.php:112
792
+ #, php-format
793
+ msgid ""
794
+ "Creating a DB table %s had failed. Once de-activate this plugin, and then "
795
+ "activate again."
796
  msgstr ""
797
 
798
+ #: classes/class-ip-geo-block-util.php:77
799
+ msgid "Your database file is up-to-date."
 
800
  msgstr ""
801
 
802
+ #: classes/class-ip-geo-block-util.php:106
803
  #, php-format
804
+ msgid "Unable to read %s. Please check the permission."
 
 
805
  msgstr ""
806
 
807
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
languages/ip-geo-block.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2016-12-05 21:17+0900\n"
8
- "PO-Revision-Date: 2016-12-05 21:17+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
@@ -25,53 +25,25 @@ msgid ""
25
  "posted from outside your nation, and also prevents zero-day exploit."
26
  msgstr ""
27
 
28
- #: admin/class-ip-geo-block-admin.php:161
29
- msgid "Import settings ?"
30
- msgstr ""
31
-
32
- #: admin/class-ip-geo-block-admin.php:162
33
- msgid "Create table ?"
34
- msgstr ""
35
-
36
- #: admin/class-ip-geo-block-admin.php:163
37
- msgid "Delete table ?"
38
- msgstr ""
39
-
40
- #: admin/class-ip-geo-block-admin.php:164
41
- msgid "Clear statistics ?"
42
- msgstr ""
43
-
44
- #: admin/class-ip-geo-block-admin.php:165
45
- msgid "Clear cache ?"
46
- msgstr ""
47
-
48
- #: admin/class-ip-geo-block-admin.php:166
49
- msgid "Clear logs ?"
50
- msgstr ""
51
-
52
- #: admin/class-ip-geo-block-admin.php:167
53
- msgid "This feature is available with HTML5 compliant browsers."
54
- msgstr ""
55
-
56
- #: admin/class-ip-geo-block-admin.php:194
57
  msgid "Contribute at GitHub"
58
  msgstr ""
59
 
60
- #: admin/class-ip-geo-block-admin.php:211
61
- #: admin/class-ip-geo-block-admin.php:365
62
  msgid "Settings"
63
  msgstr ""
64
 
65
- #: admin/class-ip-geo-block-admin.php:257
66
- #: admin/class-ip-geo-block-admin.php:258
67
  msgid "IP Geo Block"
68
  msgstr ""
69
 
70
- #: admin/class-ip-geo-block-admin.php:279
71
  msgid "You need WordPress 3.7+."
72
  msgstr ""
73
 
74
- #: admin/class-ip-geo-block-admin.php:287
75
  #, php-format
76
  msgid ""
77
  "Now downloading geolocation databases in background. After a little while, "
@@ -79,82 +51,82 @@ msgid ""
79
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
80
  msgstr ""
81
 
82
- #: admin/class-ip-geo-block-admin.php:293
83
  #, php-format
84
  msgid ""
85
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
86
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
87
  msgstr ""
88
 
89
- #: admin/class-ip-geo-block-admin.php:302
90
  msgid "Local database and matching rule have been updated."
91
  msgstr ""
92
 
93
- #: admin/class-ip-geo-block-admin.php:313
94
  msgid ""
95
  "Once you logout, you will be unable to login again because your country code "
96
  "or IP address is in the blacklist."
97
  msgstr ""
98
 
99
- #: admin/class-ip-geo-block-admin.php:314
100
  msgid ""
101
  "Once you logout, you will be unable to login again because your country code "
102
  "or IP address is not in the whitelist."
103
  msgstr ""
104
 
105
- #: admin/class-ip-geo-block-admin.php:317
106
  #, php-format
107
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
108
  msgstr ""
109
 
110
- #: admin/class-ip-geo-block-admin.php:366
111
  msgid "Statistics"
112
  msgstr ""
113
 
114
- #: admin/class-ip-geo-block-admin.php:367
115
  msgid "Logs"
116
  msgstr ""
117
 
118
- #: admin/class-ip-geo-block-admin.php:368
119
  msgid "Search"
120
  msgstr ""
121
 
122
- #: admin/class-ip-geo-block-admin.php:369
123
  msgid "Attribution"
124
  msgstr ""
125
 
126
- #: admin/class-ip-geo-block-admin.php:381
127
  msgid "Toggle all"
128
  msgstr ""
129
 
130
- #: admin/class-ip-geo-block-admin.php:405
131
  msgid "Thanks for providing these great services for free."
132
  msgstr ""
133
 
134
- #: admin/class-ip-geo-block-admin.php:406
135
  msgid ""
136
  "(Most browsers will redirect you to each site <a href=\"http://www."
137
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
138
  "when you click the link</a>.)"
139
  msgstr ""
140
 
141
- #: admin/class-ip-geo-block-admin.php:411
142
  msgid "Back to top"
143
  msgstr ""
144
 
145
- #: admin/class-ip-geo-block-admin.php:503
146
  msgid "Enable"
147
  msgstr ""
148
 
149
- #: admin/class-ip-geo-block-admin.php:819
150
- #: admin/class-ip-geo-block-admin.php:832
151
- #: classes/class-ip-geo-block-cron.php:261
152
- #: classes/class-ip-geo-block-opts.php:310
153
  #, php-format
154
  msgid "Unable to write %s. Please check the permission."
155
  msgstr ""
156
 
157
- #: admin/class-ip-geo-block-admin.php:820
158
  #, php-format
159
  msgid "Or please refer to %s to set it manually."
160
  msgid_plural "Or please refer to %s to set them manually."
@@ -169,104 +141,92 @@ msgstr ""
169
  msgid "UNKNOWN"
170
  msgstr ""
171
 
172
- #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:82
173
  msgid "Validation logs"
174
  msgstr ""
175
 
176
- #: admin/includes/tab-accesslog.php:31
177
- msgid "Filter logs"
178
- msgstr ""
179
-
180
- #: admin/includes/tab-accesslog.php:40
181
- msgid "Reset"
182
- msgstr ""
183
-
184
- #: admin/includes/tab-accesslog.php:47
185
  msgid "Clear logs"
186
  msgstr ""
187
 
188
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-statistics.php:171
189
- #: admin/includes/tab-statistics.php:275
190
  msgid "Clear now"
191
  msgstr ""
192
 
193
- #: admin/includes/tab-accesslog.php:63
194
  msgid "Export logs"
195
  msgstr ""
196
 
197
- #: admin/includes/tab-accesslog.php:69 admin/includes/tab-settings.php:1228
198
  msgid "Export to the local file"
199
  msgstr ""
200
 
201
- #: admin/includes/tab-accesslog.php:69
202
  msgid "Export csv"
203
  msgstr ""
204
 
205
- #: admin/includes/tab-accesslog.php:109 admin/includes/tab-settings.php:363
206
  #, php-format
207
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
208
  msgstr ""
209
 
210
- #: admin/includes/tab-accesslog.php:111 admin/includes/tab-settings.php:365
211
  msgid "Comment post"
212
  msgstr ""
213
 
214
- #: admin/includes/tab-accesslog.php:112 admin/includes/tab-settings.php:366
215
  msgid "XML-RPC"
216
  msgstr ""
217
 
218
- #: admin/includes/tab-accesslog.php:113 admin/includes/tab-settings.php:367
219
  msgid "Login form"
220
  msgstr ""
221
 
222
- #: admin/includes/tab-accesslog.php:114 admin/includes/tab-settings.php:368
223
  msgid "Admin area"
224
  msgstr ""
225
 
226
- #: admin/includes/tab-accesslog.php:115 admin/includes/tab-settings.php:370
227
- msgid "Pubic facing pages"
228
- msgstr ""
229
-
230
- #: admin/includes/tab-accesslog.php:121
231
  msgid "Date"
232
  msgstr ""
233
 
234
- #: admin/includes/tab-accesslog.php:122 admin/includes/tab-geolocation.php:65
235
  #: admin/includes/tab-statistics.php:217
236
  msgid "IP address"
237
  msgstr ""
238
 
239
- #: admin/includes/tab-accesslog.php:123
240
  msgid "Code"
241
  msgstr ""
242
 
243
- #: admin/includes/tab-accesslog.php:124
244
  msgid "Result"
245
  msgstr ""
246
 
247
- #: admin/includes/tab-accesslog.php:125
248
  msgid "Request"
249
  msgstr ""
250
 
251
- #: admin/includes/tab-accesslog.php:126
252
  msgid "User agent"
253
  msgstr ""
254
 
255
- #: admin/includes/tab-accesslog.php:127
256
  msgid "HTTP headers"
257
  msgstr ""
258
 
259
- #: admin/includes/tab-accesslog.php:128
260
  msgid "$_POST data"
261
  msgstr ""
262
 
263
- #: admin/includes/tab-accesslog.php:146
264
  msgid ""
265
  "Current selection of [<strong>Record validation logs</strong>] on "
266
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
267
  msgstr ""
268
 
269
- #: admin/includes/tab-accesslog.php:147
270
  msgid ""
271
  "Please select the proper condition to record and analyze the validation logs."
272
  msgstr ""
@@ -345,7 +305,7 @@ msgstr ""
345
  msgid "(comma or RET separated)"
346
  msgstr ""
347
 
348
- #: admin/includes/tab-settings.php:107 admin/includes/tab-settings.php:671
349
  msgid "Matching rule"
350
  msgstr ""
351
 
@@ -398,239 +358,130 @@ msgid ""
398
  "directory.\">Response code</dfn> %s"
399
  msgstr ""
400
 
401
- #: admin/includes/tab-settings.php:268
402
- msgid ""
403
- "<dfn title=\"Specify the URL for response code 2xx and 3xx. Front-end URL on "
404
- "your site would not be blocked to prevent loop of redirection even when you "
405
- "enable [Front-end target settings]. Empty URL is altered to your home."
406
- "\">Redirect URL</dfn>"
407
- msgstr ""
408
-
409
- #: admin/includes/tab-settings.php:285
410
- msgid ""
411
- "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
412
- "message</dfn>"
413
- msgstr ""
414
-
415
- #: admin/includes/tab-settings.php:302
416
  msgid ""
417
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
418
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
419
  "\">Max number of failed login attempts per IP address</dfn>"
420
  msgstr ""
421
 
422
- #: admin/includes/tab-settings.php:329
423
  msgid "Select when to run the validation."
424
  msgstr ""
425
 
426
- #: admin/includes/tab-settings.php:329
427
  msgid "Validation timing"
428
  msgstr ""
429
 
430
- #: admin/includes/tab-settings.php:340
431
  msgid "&#8220;init&#8221; action hook"
432
  msgstr ""
433
 
434
- #: admin/includes/tab-settings.php:341
435
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
436
  msgstr ""
437
 
438
- #: admin/includes/tab-settings.php:344
439
  msgid ""
440
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
441
  "plugins."
442
  msgstr ""
443
 
444
- #: admin/includes/tab-settings.php:345
445
  msgid ""
446
  "Validate at an earlier phase than other typical plugins. It can reduce load "
447
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
448
  "html' title='Validation timing | IP Geo Block'>some restrictions</a>."
449
  msgstr ""
450
 
451
- #: admin/includes/tab-settings.php:357
452
- msgid "Back-end target settings"
453
- msgstr ""
454
-
455
- #: admin/includes/tab-settings.php:369
456
- msgid "Other areas"
457
  msgstr ""
458
 
459
- #: admin/includes/tab-settings.php:388 admin/includes/tab-settings.php:408
460
- #: admin/includes/tab-settings.php:441 admin/includes/tab-settings.php:447
461
- #: admin/includes/tab-settings.php:659
462
  msgid "Block by country"
463
  msgstr ""
464
 
465
- #: admin/includes/tab-settings.php:407 admin/includes/tab-settings.php:514
466
- #: admin/includes/tab-settings.php:992
467
  msgid "Disable"
468
  msgstr ""
469
 
470
- #: admin/includes/tab-settings.php:409
471
  msgid "Completely close"
472
  msgstr ""
473
 
474
- #: admin/includes/tab-settings.php:442
475
  msgid ""
476
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
477
  "actions</dfn>"
478
  msgstr ""
479
 
480
- #: admin/includes/tab-settings.php:448
481
  msgid "Prevent Zero-day Exploit"
482
  msgstr ""
483
 
484
- #: admin/includes/tab-settings.php:452
485
  msgid ""
486
  "It will block a request related to the services for both public facing pages "
487
  "and the dashboard."
488
  msgstr ""
489
 
490
- #: admin/includes/tab-settings.php:453
491
  msgid ""
492
  "Regardless of the country code, it will block a malicious request related to "
493
  "the services only for the dashboard."
494
  msgstr ""
495
 
496
- #: admin/includes/tab-settings.php:480
497
  msgid "Admin ajax/post"
498
  msgstr ""
499
 
500
- #: admin/includes/tab-settings.php:500
501
- msgid "Exception for admin action and page"
502
- msgstr ""
503
-
504
- #: admin/includes/tab-settings.php:516
505
  #, php-format
506
  msgid ""
507
  "Regardless of the country code, it will block a malicious request to <code>"
508
  "%s&hellip;/*.php</code>."
509
  msgstr ""
510
 
511
- #: admin/includes/tab-settings.php:517
512
  #, php-format
513
  msgid ""
514
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
515
  "does not load WordPress core."
516
  msgstr ""
517
 
518
- #: admin/includes/tab-settings.php:518
519
  msgid ""
520
  "<dfn title=\"Select the item which causes undesired blocking in order to "
521
  "exclude from the validation target. Grayed item indicates &#8220;"
522
  "INACTIVE&#8221;.\">Exceptions</dfn>"
523
  msgstr ""
524
 
525
- #: admin/includes/tab-settings.php:554 admin/includes/tab-settings.php:607
526
  msgid "Force to load WP core"
527
  msgstr ""
528
 
529
- #: admin/includes/tab-settings.php:559
530
  msgid "Plugins area"
531
  msgstr ""
532
 
533
- #: admin/includes/tab-settings.php:612
534
  msgid "Themes area"
535
  msgstr ""
536
 
537
- #: admin/includes/tab-settings.php:640
538
- msgid "Front-end target settings"
539
- msgstr ""
540
-
541
- #: admin/includes/tab-settings.php:664
542
- msgid "Follow &#8220;Validation rule settings&#8221;"
543
- msgstr ""
544
-
545
- #: admin/includes/tab-settings.php:721
546
- msgid ""
547
- "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
548
- msgstr ""
549
-
550
- #: admin/includes/tab-settings.php:733
551
- msgid ""
552
- "<dfn title=\"Specify the individual post type on a single page as a blocking "
553
- "target.\">Post type</dfn>"
554
- msgstr ""
555
-
556
- #: admin/includes/tab-settings.php:745
557
- msgid ""
558
- "<dfn title=\"Specify the individual category on a single page or archive "
559
- "page as a blocking target.\">Category</dfn>"
560
- msgstr ""
561
-
562
- #: admin/includes/tab-settings.php:757
563
- msgid ""
564
- "<dfn title=\"Specify the individual tag on a single page or archive page as "
565
- "a blocking target.\">Tag</dfn>"
566
- msgstr ""
567
-
568
- #: admin/includes/tab-settings.php:772
569
- msgid "Specify the validation target on front-end."
570
- msgstr ""
571
-
572
- #: admin/includes/tab-settings.php:772
573
- msgid "Validation target"
574
- msgstr ""
575
-
576
- #: admin/includes/tab-settings.php:783
577
- msgid "All requests"
578
- msgstr ""
579
-
580
- #: admin/includes/tab-settings.php:784
581
- msgid "Specify the targets"
582
- msgstr ""
583
-
584
- #: admin/includes/tab-settings.php:787
585
- msgid ""
586
- "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
587
- "wp&#8221; action hook. It means that this feature would not be compatible "
588
- "with any page caching."
589
- msgstr ""
590
-
591
- #: admin/includes/tab-settings.php:797
592
- msgid ""
593
- "A part of user agent string and a qualification connected with a separator "
594
- "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
595
- "&#8220;#&#8221; (block). A &#8220;qualification&#8221; can be &#8220;"
596
- "DNS&#8221;, &#8220;FEED&#8221;, country code or IP address with CIDR. A "
597
- "negative operator &#8220;!&#8221; can be placed just before a &#8220;"
598
- "qualification&#8221;."
599
- msgstr ""
600
-
601
- #: admin/includes/tab-settings.php:797
602
- msgid "UA string and qualification"
603
- msgstr ""
604
-
605
- #: admin/includes/tab-settings.php:816
606
- msgid "Specify the name of action that is invariably blocked."
607
- msgstr ""
608
-
609
- #: admin/includes/tab-settings.php:816
610
- msgid "Excluded actions"
611
- msgstr ""
612
-
613
- #: admin/includes/tab-settings.php:835
614
- msgid ""
615
- "It enables to simulate validation without deployment. The results can be "
616
- "found at &#8220;Pubic facing pages&#8221; in Logs."
617
- msgstr ""
618
-
619
- #: admin/includes/tab-settings.php:835
620
- msgid "Simulation mode"
621
- msgstr ""
622
-
623
- #: admin/includes/tab-settings.php:854
624
  msgid "Geolocation API settings"
625
  msgstr ""
626
 
627
- #: admin/includes/tab-settings.php:863
628
  msgid ""
629
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
630
  "selection and key settings</dfn>"
631
  msgstr ""
632
 
633
- #: admin/includes/tab-settings.php:885
634
  #, php-format
635
  msgid ""
636
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
@@ -641,86 +492,86 @@ msgid ""
641
  "code> to <code>%s</code> with write permission."
642
  msgstr ""
643
 
644
- #: admin/includes/tab-settings.php:894
645
  msgid "Local database settings"
646
  msgstr ""
647
 
648
- #: admin/includes/tab-settings.php:909
649
  msgid "database"
650
  msgstr ""
651
 
652
- #: admin/includes/tab-settings.php:910 classes/class-ip-geo-block-cron.php:306
653
  #, php-format
654
  msgid "Last update: %s"
655
  msgstr ""
656
 
657
- #: admin/includes/tab-settings.php:919
658
  msgid "Auto updating (once a month)"
659
  msgstr ""
660
 
661
- #: admin/includes/tab-settings.php:936
662
  msgid "Download database"
663
  msgstr ""
664
 
665
- #: admin/includes/tab-settings.php:944
666
  msgid "Download now"
667
  msgstr ""
668
 
669
- #: admin/includes/tab-settings.php:956
670
  msgid "Record settings"
671
  msgstr ""
672
 
673
- #: admin/includes/tab-settings.php:965
674
  msgid "Record validation statistics"
675
  msgstr ""
676
 
677
- #: admin/includes/tab-settings.php:981
678
  msgid "Record validation logs"
679
  msgstr ""
680
 
681
- #: admin/includes/tab-settings.php:993
682
  msgid "Only when blocked"
683
  msgstr ""
684
 
685
- #: admin/includes/tab-settings.php:994
686
  msgid "Only when passed"
687
  msgstr ""
688
 
689
- #: admin/includes/tab-settings.php:995
690
  msgid "Unauthenticated user"
691
  msgstr ""
692
 
693
- #: admin/includes/tab-settings.php:996
694
  msgid "Authenticated user"
695
  msgstr ""
696
 
697
- #: admin/includes/tab-settings.php:997
698
  msgid "All of validation"
699
  msgstr ""
700
 
701
- #: admin/includes/tab-settings.php:1006
702
  msgid "Recording period of the logs (days)"
703
  msgstr ""
704
 
705
- #: admin/includes/tab-settings.php:1022
706
  msgid "Maximum length of logs for each target"
707
  msgstr ""
708
 
709
- #: admin/includes/tab-settings.php:1039
710
  msgid ""
711
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
712
  "with their values in logs</dfn>"
713
  msgstr ""
714
 
715
- #: admin/includes/tab-settings.php:1057
716
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
717
  msgstr ""
718
 
719
- #: admin/includes/tab-settings.php:1075
720
- msgid "IP address cache settings"
721
  msgstr ""
722
 
723
- #: admin/includes/tab-settings.php:1084
724
  #, php-format
725
  msgid ""
726
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
@@ -728,115 +579,111 @@ msgid ""
728
  "\">Expiration time [sec]</dfn>"
729
  msgstr ""
730
 
731
- #: admin/includes/tab-settings.php:1100
732
- msgid "Garbage collection period [sec]"
733
- msgstr ""
734
-
735
- #: admin/includes/tab-settings.php:1117
736
  msgid "Number of entries to be displayed in cache"
737
  msgstr ""
738
 
739
- #: admin/includes/tab-settings.php:1136
740
  msgid "Submission settings"
741
  msgstr ""
742
 
743
- #: admin/includes/tab-settings.php:1148
744
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
745
  msgstr ""
746
 
747
- #: admin/includes/tab-settings.php:1148
748
  msgid "Message on comment form"
749
  msgstr ""
750
 
751
- #: admin/includes/tab-settings.php:1160
752
  msgid "None"
753
  msgstr ""
754
 
755
- #: admin/includes/tab-settings.php:1161
756
  msgid "Top"
757
  msgstr ""
758
 
759
- #: admin/includes/tab-settings.php:1162
760
  msgid "Bottom"
761
  msgstr ""
762
 
763
- #: admin/includes/tab-settings.php:1174
764
  msgid "Plugin settings"
765
  msgstr ""
766
 
767
- #: admin/includes/tab-settings.php:1183
768
  msgid "Remove all settings at uninstallation"
769
  msgstr ""
770
 
771
- #: admin/includes/tab-settings.php:1201
772
  msgid ""
773
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
774
  "dfn>"
775
  msgstr ""
776
 
777
- #: admin/includes/tab-settings.php:1215
778
  msgid ""
779
  "You need to click the &#8220;Save Changes&#8221; button for imported "
780
  "settings to take effect."
781
  msgstr ""
782
 
783
- #: admin/includes/tab-settings.php:1221
784
  msgid "Export / Import settings"
785
  msgstr ""
786
 
787
- #: admin/includes/tab-settings.php:1228
788
  msgid "Export settings"
789
  msgstr ""
790
 
791
- #: admin/includes/tab-settings.php:1229
792
  msgid "Import from the local file"
793
  msgstr ""
794
 
795
- #: admin/includes/tab-settings.php:1229
796
  msgid "Import settings"
797
  msgstr ""
798
 
799
- #: admin/includes/tab-settings.php:1238
800
  msgid "Import pre-defined settings"
801
  msgstr ""
802
 
803
- #: admin/includes/tab-settings.php:1245
804
  msgid ""
805
  "Import the default settings to revert to the &#8220;Right after "
806
  "installing&#8221; state"
807
  msgstr ""
808
 
809
- #: admin/includes/tab-settings.php:1245
810
  msgid "Default settings"
811
  msgstr ""
812
 
813
- #: admin/includes/tab-settings.php:1246
814
  msgid ""
815
  "Import the preferred settings mainly for the &#8220;Validation target "
816
  "settings&#8221;"
817
  msgstr ""
818
 
819
- #: admin/includes/tab-settings.php:1246
820
  msgid "Best practice"
821
  msgstr ""
822
 
823
- #: admin/includes/tab-settings.php:1256
824
  msgid "Delete DB table for validation logs"
825
  msgstr ""
826
 
827
- #: admin/includes/tab-settings.php:1264
828
  msgid "Delete now"
829
  msgstr ""
830
 
831
- #: admin/includes/tab-settings.php:1272
832
  msgid "Create DB table for validation logs"
833
  msgstr ""
834
 
835
- #: admin/includes/tab-settings.php:1280
836
  msgid "Create now"
837
  msgstr ""
838
 
839
- #: admin/includes/tab-settings.php:1295
840
  msgid ""
841
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
842
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
@@ -844,7 +691,7 @@ msgid ""
844
  "target settings</a>&#8221;."
845
  msgstr ""
846
 
847
- #: admin/includes/tab-settings.php:1296
848
  msgid ""
849
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
850
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
@@ -852,33 +699,17 @@ msgid ""
852
  "target=_blank>support forum</a>."
853
  msgstr ""
854
 
855
- #: admin/includes/tab-settings.php:1303
856
  msgid ""
857
  "While Maxmind and IP2Location will fetch the local database, others will "
858
  "pass an IP address to the APIs via HTTP."
859
  msgstr ""
860
 
861
- #: admin/includes/tab-settings.php:1304
862
  msgid ""
863
  "Please select the appropriate APIs to fit the privacy law in your country."
864
  msgstr ""
865
 
866
- #: admin/includes/tab-settings.php:1311
867
- msgid ""
868
- "Please refer to the document &#8220;<a href=\"http://www.ipgeoblock.com/"
869
- "codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block\" "
870
- "target=_blank>Blocking on front-end</a>&#8221; for details, including "
871
- "restrictions on cache plugin."
872
- msgstr ""
873
-
874
- #: admin/includes/tab-settings.php:1312
875
- msgid ""
876
- "If you find any issues or have something to suggest, please feel free to "
877
- "open an issue at <a class=\"ip-geo-block-link\" href=\"http://wordpress.org/"
878
- "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
879
- "Geo Block\" target=_blank>support forum</a>."
880
- msgstr ""
881
-
882
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
883
  msgid "Statistics of validation"
884
  msgstr ""
@@ -931,46 +762,46 @@ msgstr ""
931
  msgid "Elapsed [sec] / Calls"
932
  msgstr ""
933
 
934
- #: admin/includes/tab-statistics.php:252
935
  msgid "IP address in cache"
936
  msgstr ""
937
 
938
- #: admin/includes/tab-statistics.php:267
939
  msgid "Clear cache"
940
  msgstr ""
941
 
942
- #: admin/includes/tab-statistics.php:286
943
  msgid ""
944
  "Current setting of [<strong>Record validation statistics</strong>] on "
945
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
946
  msgstr ""
947
 
948
- #: admin/includes/tab-statistics.php:287
949
  msgid ""
950
  "Please set the proper condition to record and analyze the validation "
951
  "statistics."
952
  msgstr ""
953
 
954
- #: classes/class-ip-geo-block-apis.php:651
955
  msgid ""
956
  "You need to select at least one IP geolocation service. Otherwise "
957
  "<strong>you'll be blocked</strong> after the cache expires."
958
  msgstr ""
959
 
960
- #: classes/class-ip-geo-block-cron.php:224
961
- msgid "Your database file is up-to-date."
 
 
 
962
  msgstr ""
963
 
964
- #: classes/class-ip-geo-block-cron.php:253
965
- #, php-format
966
- msgid "Unable to read %s. Please check the permission."
967
  msgstr ""
968
 
969
- #: classes/class-ip-geo-block-logs.php:131
970
  #, php-format
971
- msgid ""
972
- "Creating a DB table %s had failed. Once de-activate this plugin, and then "
973
- "activate again."
974
  msgstr ""
975
 
976
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 2.2.9.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2016-11-12 15:12+0900\n"
8
+ "PO-Revision-Date: 2016-11-12 15:12+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "MIME-Version: 1.0\n"
25
  "posted from outside your nation, and also prevents zero-day exploit."
26
  msgstr ""
27
 
28
+ #: admin/class-ip-geo-block-admin.php:185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  msgid "Contribute at GitHub"
30
  msgstr ""
31
 
32
+ #: admin/class-ip-geo-block-admin.php:202
33
+ #: admin/class-ip-geo-block-admin.php:356
34
  msgid "Settings"
35
  msgstr ""
36
 
37
+ #: admin/class-ip-geo-block-admin.php:248
38
+ #: admin/class-ip-geo-block-admin.php:249
39
  msgid "IP Geo Block"
40
  msgstr ""
41
 
42
+ #: admin/class-ip-geo-block-admin.php:270
43
  msgid "You need WordPress 3.7+."
44
  msgstr ""
45
 
46
+ #: admin/class-ip-geo-block-admin.php:278
47
  #, php-format
48
  msgid ""
49
  "Now downloading geolocation databases in background. After a little while, "
51
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
52
  msgstr ""
53
 
54
+ #: admin/class-ip-geo-block-admin.php:284
55
  #, php-format
56
  msgid ""
57
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
58
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
59
  msgstr ""
60
 
61
+ #: admin/class-ip-geo-block-admin.php:293
62
  msgid "Local database and matching rule have been updated."
63
  msgstr ""
64
 
65
+ #: admin/class-ip-geo-block-admin.php:304
66
  msgid ""
67
  "Once you logout, you will be unable to login again because your country code "
68
  "or IP address is in the blacklist."
69
  msgstr ""
70
 
71
+ #: admin/class-ip-geo-block-admin.php:305
72
  msgid ""
73
  "Once you logout, you will be unable to login again because your country code "
74
  "or IP address is not in the whitelist."
75
  msgstr ""
76
 
77
+ #: admin/class-ip-geo-block-admin.php:308
78
  #, php-format
79
  msgid "Please check your <a href=\"%s\">Validation rule settings</a>."
80
  msgstr ""
81
 
82
+ #: admin/class-ip-geo-block-admin.php:357
83
  msgid "Statistics"
84
  msgstr ""
85
 
86
+ #: admin/class-ip-geo-block-admin.php:358
87
  msgid "Logs"
88
  msgstr ""
89
 
90
+ #: admin/class-ip-geo-block-admin.php:359
91
  msgid "Search"
92
  msgstr ""
93
 
94
+ #: admin/class-ip-geo-block-admin.php:360
95
  msgid "Attribution"
96
  msgstr ""
97
 
98
+ #: admin/class-ip-geo-block-admin.php:372
99
  msgid "Toggle all"
100
  msgstr ""
101
 
102
+ #: admin/class-ip-geo-block-admin.php:396
103
  msgid "Thanks for providing these great services for free."
104
  msgstr ""
105
 
106
+ #: admin/class-ip-geo-block-admin.php:397
107
  msgid ""
108
  "(Most browsers will redirect you to each site <a href=\"http://www."
109
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
110
  "when you click the link</a>.)"
111
  msgstr ""
112
 
113
+ #: admin/class-ip-geo-block-admin.php:402
114
  msgid "Back to top"
115
  msgstr ""
116
 
117
+ #: admin/class-ip-geo-block-admin.php:494
118
  msgid "Enable"
119
  msgstr ""
120
 
121
+ #: admin/class-ip-geo-block-admin.php:789
122
+ #: admin/class-ip-geo-block-admin.php:802
123
+ #: classes/class-ip-geo-block-opts.php:257
124
+ #: classes/class-ip-geo-block-util.php:114
125
  #, php-format
126
  msgid "Unable to write %s. Please check the permission."
127
  msgstr ""
128
 
129
+ #: admin/class-ip-geo-block-admin.php:790
130
  #, php-format
131
  msgid "Or please refer to %s to set it manually."
132
  msgid_plural "Or please refer to %s to set them manually."
141
  msgid "UNKNOWN"
142
  msgstr ""
143
 
144
+ #: admin/includes/tab-accesslog.php:22 admin/includes/tab-accesslog.php:65
145
  msgid "Validation logs"
146
  msgstr ""
147
 
148
+ #: admin/includes/tab-accesslog.php:30
 
 
 
 
 
 
 
 
149
  msgid "Clear logs"
150
  msgstr ""
151
 
152
+ #: admin/includes/tab-accesslog.php:38 admin/includes/tab-statistics.php:171
153
+ #: admin/includes/tab-statistics.php:277
154
  msgid "Clear now"
155
  msgstr ""
156
 
157
+ #: admin/includes/tab-accesslog.php:46
158
  msgid "Export logs"
159
  msgstr ""
160
 
161
+ #: admin/includes/tab-accesslog.php:52 admin/includes/tab-settings.php:942
162
  msgid "Export to the local file"
163
  msgstr ""
164
 
165
+ #: admin/includes/tab-accesslog.php:52
166
  msgid "Export csv"
167
  msgstr ""
168
 
169
+ #: admin/includes/tab-accesslog.php:92 admin/includes/tab-settings.php:330
170
  #, php-format
171
  msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
172
  msgstr ""
173
 
174
+ #: admin/includes/tab-accesslog.php:94 admin/includes/tab-settings.php:332
175
  msgid "Comment post"
176
  msgstr ""
177
 
178
+ #: admin/includes/tab-accesslog.php:95 admin/includes/tab-settings.php:333
179
  msgid "XML-RPC"
180
  msgstr ""
181
 
182
+ #: admin/includes/tab-accesslog.php:96 admin/includes/tab-settings.php:334
183
  msgid "Login form"
184
  msgstr ""
185
 
186
+ #: admin/includes/tab-accesslog.php:97 admin/includes/tab-settings.php:335
187
  msgid "Admin area"
188
  msgstr ""
189
 
190
+ #: admin/includes/tab-accesslog.php:103
 
 
 
 
191
  msgid "Date"
192
  msgstr ""
193
 
194
+ #: admin/includes/tab-accesslog.php:104 admin/includes/tab-geolocation.php:65
195
  #: admin/includes/tab-statistics.php:217
196
  msgid "IP address"
197
  msgstr ""
198
 
199
+ #: admin/includes/tab-accesslog.php:105
200
  msgid "Code"
201
  msgstr ""
202
 
203
+ #: admin/includes/tab-accesslog.php:106
204
  msgid "Result"
205
  msgstr ""
206
 
207
+ #: admin/includes/tab-accesslog.php:107
208
  msgid "Request"
209
  msgstr ""
210
 
211
+ #: admin/includes/tab-accesslog.php:108
212
  msgid "User agent"
213
  msgstr ""
214
 
215
+ #: admin/includes/tab-accesslog.php:109
216
  msgid "HTTP headers"
217
  msgstr ""
218
 
219
+ #: admin/includes/tab-accesslog.php:110
220
  msgid "$_POST data"
221
  msgstr ""
222
 
223
+ #: admin/includes/tab-accesslog.php:128
224
  msgid ""
225
  "Current selection of [<strong>Record validation logs</strong>] on "
226
  "[<strong>Settings</strong>] tab is [<strong>Disable</strong>]."
227
  msgstr ""
228
 
229
+ #: admin/includes/tab-accesslog.php:129
230
  msgid ""
231
  "Please select the proper condition to record and analyze the validation logs."
232
  msgstr ""
305
  msgid "(comma or RET separated)"
306
  msgstr ""
307
 
308
+ #: admin/includes/tab-settings.php:107
309
  msgid "Matching rule"
310
  msgstr ""
311
 
358
  "directory.\">Response code</dfn> %s"
359
  msgstr ""
360
 
361
+ #: admin/includes/tab-settings.php:269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  msgid ""
363
  "<dfn title=\"Applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. "
364
  "Lockout period is defined as expiration time at &#8220;Cache settings&#8221;."
365
  "\">Max number of failed login attempts per IP address</dfn>"
366
  msgstr ""
367
 
368
+ #: admin/includes/tab-settings.php:296
369
  msgid "Select when to run the validation."
370
  msgstr ""
371
 
372
+ #: admin/includes/tab-settings.php:296
373
  msgid "Validation timing"
374
  msgstr ""
375
 
376
+ #: admin/includes/tab-settings.php:307
377
  msgid "&#8220;init&#8221; action hook"
378
  msgstr ""
379
 
380
+ #: admin/includes/tab-settings.php:308
381
  msgid "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)"
382
  msgstr ""
383
 
384
+ #: admin/includes/tab-settings.php:311
385
  msgid ""
386
  "Validate at &#8220;init&#8221; action hook in the same manner as typical "
387
  "plugins."
388
  msgstr ""
389
 
390
+ #: admin/includes/tab-settings.php:312
391
  msgid ""
392
  "Validate at an earlier phase than other typical plugins. It can reduce load "
393
  "on server but has <a href='http://www.ipgeoblock.com/codex/validation-timing."
394
  "html' title='Validation timing | IP Geo Block'>some restrictions</a>."
395
  msgstr ""
396
 
397
+ #: admin/includes/tab-settings.php:324
398
+ msgid "Validation target settings"
 
 
 
 
399
  msgstr ""
400
 
401
+ #: admin/includes/tab-settings.php:353 admin/includes/tab-settings.php:373
402
+ #: admin/includes/tab-settings.php:406 admin/includes/tab-settings.php:412
 
403
  msgid "Block by country"
404
  msgstr ""
405
 
406
+ #: admin/includes/tab-settings.php:372 admin/includes/tab-settings.php:459
407
+ #: admin/includes/tab-settings.php:723
408
  msgid "Disable"
409
  msgstr ""
410
 
411
+ #: admin/includes/tab-settings.php:374
412
  msgid "Completely close"
413
  msgstr ""
414
 
415
+ #: admin/includes/tab-settings.php:407
416
  msgid ""
417
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
418
  "actions</dfn>"
419
  msgstr ""
420
 
421
+ #: admin/includes/tab-settings.php:413
422
  msgid "Prevent Zero-day Exploit"
423
  msgstr ""
424
 
425
+ #: admin/includes/tab-settings.php:416
426
  msgid ""
427
  "It will block a request related to the services for both public facing pages "
428
  "and the dashboard."
429
  msgstr ""
430
 
431
+ #: admin/includes/tab-settings.php:417
432
  msgid ""
433
  "Regardless of the country code, it will block a malicious request related to "
434
  "the services only for the dashboard."
435
  msgstr ""
436
 
437
+ #: admin/includes/tab-settings.php:444
438
  msgid "Admin ajax/post"
439
  msgstr ""
440
 
441
+ #: admin/includes/tab-settings.php:461
 
 
 
 
442
  #, php-format
443
  msgid ""
444
  "Regardless of the country code, it will block a malicious request to <code>"
445
  "%s&hellip;/*.php</code>."
446
  msgstr ""
447
 
448
+ #: admin/includes/tab-settings.php:462
449
  #, php-format
450
  msgid ""
451
  "It configures &#8220%s&#8221 to validate a request to the PHP file which "
452
  "does not load WordPress core."
453
  msgstr ""
454
 
455
+ #: admin/includes/tab-settings.php:463
456
  msgid ""
457
  "<dfn title=\"Select the item which causes undesired blocking in order to "
458
  "exclude from the validation target. Grayed item indicates &#8220;"
459
  "INACTIVE&#8221;.\">Exceptions</dfn>"
460
  msgstr ""
461
 
462
+ #: admin/includes/tab-settings.php:499 admin/includes/tab-settings.php:552
463
  msgid "Force to load WP core"
464
  msgstr ""
465
 
466
+ #: admin/includes/tab-settings.php:504
467
  msgid "Plugins area"
468
  msgstr ""
469
 
470
+ #: admin/includes/tab-settings.php:557
471
  msgid "Themes area"
472
  msgstr ""
473
 
474
+ #: admin/includes/tab-settings.php:585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  msgid "Geolocation API settings"
476
  msgstr ""
477
 
478
+ #: admin/includes/tab-settings.php:594
479
  msgid ""
480
  "<dfn title=\"Cache and local database are scanned at the top priority.\">API "
481
  "selection and key settings</dfn>"
482
  msgstr ""
483
 
484
+ #: admin/includes/tab-settings.php:616
485
  #, php-format
486
  msgid ""
487
  "Please download <a href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-"
492
  "code> to <code>%s</code> with write permission."
493
  msgstr ""
494
 
495
+ #: admin/includes/tab-settings.php:625
496
  msgid "Local database settings"
497
  msgstr ""
498
 
499
+ #: admin/includes/tab-settings.php:640
500
  msgid "database"
501
  msgstr ""
502
 
503
+ #: admin/includes/tab-settings.php:641 classes/class-ip-geo-block-util.php:159
504
  #, php-format
505
  msgid "Last update: %s"
506
  msgstr ""
507
 
508
+ #: admin/includes/tab-settings.php:650
509
  msgid "Auto updating (once a month)"
510
  msgstr ""
511
 
512
+ #: admin/includes/tab-settings.php:667
513
  msgid "Download database"
514
  msgstr ""
515
 
516
+ #: admin/includes/tab-settings.php:675
517
  msgid "Download now"
518
  msgstr ""
519
 
520
+ #: admin/includes/tab-settings.php:687
521
  msgid "Record settings"
522
  msgstr ""
523
 
524
+ #: admin/includes/tab-settings.php:696
525
  msgid "Record validation statistics"
526
  msgstr ""
527
 
528
+ #: admin/includes/tab-settings.php:712
529
  msgid "Record validation logs"
530
  msgstr ""
531
 
532
+ #: admin/includes/tab-settings.php:724
533
  msgid "Only when blocked"
534
  msgstr ""
535
 
536
+ #: admin/includes/tab-settings.php:725
537
  msgid "Only when passed"
538
  msgstr ""
539
 
540
+ #: admin/includes/tab-settings.php:726
541
  msgid "Unauthenticated user"
542
  msgstr ""
543
 
544
+ #: admin/includes/tab-settings.php:727
545
  msgid "Authenticated user"
546
  msgstr ""
547
 
548
+ #: admin/includes/tab-settings.php:728
549
  msgid "All of validation"
550
  msgstr ""
551
 
552
+ #: admin/includes/tab-settings.php:737
553
  msgid "Recording period of the logs (days)"
554
  msgstr ""
555
 
556
+ #: admin/includes/tab-settings.php:753
557
  msgid "Maximum length of logs for each target"
558
  msgstr ""
559
 
560
+ #: admin/includes/tab-settings.php:770
561
  msgid ""
562
  "<dfn title=\"e.g. action, comment, log, pwd\">$_POST keys to be recorded "
563
  "with their values in logs</dfn>"
564
  msgstr ""
565
 
566
+ #: admin/includes/tab-settings.php:788
567
  msgid "<dfn title=\"e.g. 123.456.789.***\">Anonymize IP address</dfn>"
568
  msgstr ""
569
 
570
+ #: admin/includes/tab-settings.php:806
571
+ msgid "Cache settings"
572
  msgstr ""
573
 
574
+ #: admin/includes/tab-settings.php:815
575
  #, php-format
576
  msgid ""
577
  "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
579
  "\">Expiration time [sec]</dfn>"
580
  msgstr ""
581
 
582
+ #: admin/includes/tab-settings.php:831
 
 
 
 
583
  msgid "Number of entries to be displayed in cache"
584
  msgstr ""
585
 
586
+ #: admin/includes/tab-settings.php:849
587
  msgid "Submission settings"
588
  msgstr ""
589
 
590
+ #: admin/includes/tab-settings.php:861
591
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
592
  msgstr ""
593
 
594
+ #: admin/includes/tab-settings.php:861
595
  msgid "Message on comment form"
596
  msgstr ""
597
 
598
+ #: admin/includes/tab-settings.php:873
599
  msgid "None"
600
  msgstr ""
601
 
602
+ #: admin/includes/tab-settings.php:874
603
  msgid "Top"
604
  msgstr ""
605
 
606
+ #: admin/includes/tab-settings.php:875
607
  msgid "Bottom"
608
  msgstr ""
609
 
610
+ #: admin/includes/tab-settings.php:887
611
  msgid "Plugin settings"
612
  msgstr ""
613
 
614
+ #: admin/includes/tab-settings.php:896
615
  msgid "Remove all settings at uninstallation"
616
  msgstr ""
617
 
618
+ #: admin/includes/tab-settings.php:915
619
  msgid ""
620
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
621
  "dfn>"
622
  msgstr ""
623
 
624
+ #: admin/includes/tab-settings.php:929
625
  msgid ""
626
  "You need to click the &#8220;Save Changes&#8221; button for imported "
627
  "settings to take effect."
628
  msgstr ""
629
 
630
+ #: admin/includes/tab-settings.php:935
631
  msgid "Export / Import settings"
632
  msgstr ""
633
 
634
+ #: admin/includes/tab-settings.php:942
635
  msgid "Export settings"
636
  msgstr ""
637
 
638
+ #: admin/includes/tab-settings.php:943
639
  msgid "Import from the local file"
640
  msgstr ""
641
 
642
+ #: admin/includes/tab-settings.php:943
643
  msgid "Import settings"
644
  msgstr ""
645
 
646
+ #: admin/includes/tab-settings.php:952
647
  msgid "Import pre-defined settings"
648
  msgstr ""
649
 
650
+ #: admin/includes/tab-settings.php:959
651
  msgid ""
652
  "Import the default settings to revert to the &#8220;Right after "
653
  "installing&#8221; state"
654
  msgstr ""
655
 
656
+ #: admin/includes/tab-settings.php:959
657
  msgid "Default settings"
658
  msgstr ""
659
 
660
+ #: admin/includes/tab-settings.php:960
661
  msgid ""
662
  "Import the preferred settings mainly for the &#8220;Validation target "
663
  "settings&#8221;"
664
  msgstr ""
665
 
666
+ #: admin/includes/tab-settings.php:960
667
  msgid "Best practice"
668
  msgstr ""
669
 
670
+ #: admin/includes/tab-settings.php:970
671
  msgid "Delete DB table for validation logs"
672
  msgstr ""
673
 
674
+ #: admin/includes/tab-settings.php:978
675
  msgid "Delete now"
676
  msgstr ""
677
 
678
+ #: admin/includes/tab-settings.php:986
679
  msgid "Create DB table for validation logs"
680
  msgstr ""
681
 
682
+ #: admin/includes/tab-settings.php:994
683
  msgid "Create now"
684
  msgstr ""
685
 
686
+ #: admin/includes/tab-settings.php:1009
687
  msgid ""
688
  "To enhance the protection ability, please refer to &#8220;<a href=\"http://"
689
  "www.ipgeoblock.com/codex/the-best-practice-of-target-settings.html\" title="
691
  "target settings</a>&#8221;."
692
  msgstr ""
693
 
694
+ #: admin/includes/tab-settings.php:1010
695
  msgid ""
696
  "If you have any troubles with these, please open an issue at <a class=\"ip-"
697
  "geo-block-link\" href=\"http://wordpress.org/support/plugin/ip-geo-block\" "
699
  "target=_blank>support forum</a>."
700
  msgstr ""
701
 
702
+ #: admin/includes/tab-settings.php:1017
703
  msgid ""
704
  "While Maxmind and IP2Location will fetch the local database, others will "
705
  "pass an IP address to the APIs via HTTP."
706
  msgstr ""
707
 
708
+ #: admin/includes/tab-settings.php:1018
709
  msgid ""
710
  "Please select the appropriate APIs to fit the privacy law in your country."
711
  msgstr ""
712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  #: admin/includes/tab-statistics.php:24 admin/includes/tab-statistics.php:184
714
  msgid "Statistics of validation"
715
  msgstr ""
762
  msgid "Elapsed [sec] / Calls"
763
  msgstr ""
764
 
765
+ #: admin/includes/tab-statistics.php:254
766
  msgid "IP address in cache"
767
  msgstr ""
768
 
769
+ #: admin/includes/tab-statistics.php:269
770
  msgid "Clear cache"
771
  msgstr ""
772
 
773
+ #: admin/includes/tab-statistics.php:288
774
  msgid ""
775
  "Current setting of [<strong>Record validation statistics</strong>] on "
776
  "[<strong>Settings</strong>] tab is not selected [<strong>Enable</strong>]."
777
  msgstr ""
778
 
779
+ #: admin/includes/tab-statistics.php:289
780
  msgid ""
781
  "Please set the proper condition to record and analyze the validation "
782
  "statistics."
783
  msgstr ""
784
 
785
+ #: classes/class-ip-geo-block-apis.php:672
786
  msgid ""
787
  "You need to select at least one IP geolocation service. Otherwise "
788
  "<strong>you'll be blocked</strong> after the cache expires."
789
  msgstr ""
790
 
791
+ #: classes/class-ip-geo-block-logs.php:112
792
+ #, php-format
793
+ msgid ""
794
+ "Creating a DB table %s had failed. Once de-activate this plugin, and then "
795
+ "activate again."
796
  msgstr ""
797
 
798
+ #: classes/class-ip-geo-block-util.php:77
799
+ msgid "Your database file is up-to-date."
 
800
  msgstr ""
801
 
802
+ #: classes/class-ip-geo-block-util.php:106
803
  #, php-format
804
+ msgid "Unable to read %s. Please check the permission."
 
 
805
  msgstr ""
806
 
807
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:145
rewrite.php CHANGED
@@ -9,12 +9,12 @@
9
  * @copyright 2013-2016 tokkonopapa
10
  *
11
  * THIS IS FOR THE ADVANCED USERS:
12
- * This file is for WP-ZEP. If some php files in the plugins/themes directory
13
- * accept malicious requests directly without loading WP core, then validation
14
- * by WP-ZEP will be bypassed. To avoid such bypassing, those requests should
15
- * be redirected to this file in order to load WP core. The `.htaccess` in the
16
- * plugins/themes directory will help this redirection if it is configured as
17
- * follows (for apache):
18
  *
19
  * # BEGIN IP Geo Block
20
  * <IfModule mod_rewrite.c>
@@ -27,7 +27,7 @@
27
  *
28
  * The redirected requests will be verified against the certain attack patterns
29
  * such as null byte attack or directory traversal, and then load the WordPress
30
- * core module through wp-load.php to triger WP-ZEP. If it ends up successfully
31
  * this includes the originally requested php file to excute it.
32
  */
33
 
@@ -85,25 +85,19 @@ class IP_Geo_Block_Rewrite {
85
  if ( $settings['save_statistics'] )
86
  IP_Geo_Block_Logs::update_stat( 'admin', $validate, $settings );
87
 
88
- // compose status code and message
89
- if ( ! $exist && 404 != $settings['response_code'] ) {
90
- $settings['response_code'] = 404;
91
- $settings['response_msg' ] = 'Not Found';
92
- }
93
-
94
  // send response code to refuse
95
- $context->send_response( 'admin', $settings );
96
  }
97
 
98
  /**
99
  * Validation of direct excution
100
  *
101
- * Note: This function doesn't care about malicious query string.
102
  */
103
  public static function exec( $context, $validate, $settings ) {
104
 
105
  // get document root
106
- // Note: super global can not be infected even when `register_globals` is on.
107
  // @see wp-admin/network.php, get_home_path() in wp-admin/includes/file.php
108
  // @link http://php.net/manual/en/security.globals.php
109
  // @link http://php.net/manual/en/reserved.variables.php#63831
@@ -121,9 +115,9 @@ class IP_Geo_Block_Rewrite {
121
 
122
  // while malicios URI may be intercepted by the server,
123
  // null byte attack should be invalidated just in case.
124
- // Note: is_file(), is_readable(), file_exists() need a valid path.
125
- // @link http://php.net/releases/5_3_4.php, https://bugs.php.net/bug.php?id=39863
126
- // @example $path = "/etc/passwd\0.php"; is_file( $path ) === true (5.2.14), false (5.4.4)
127
  $path = self::realpath( str_replace( "\0", '', $path ) );
128
 
129
  // check path if under the document root
@@ -137,7 +131,7 @@ class IP_Geo_Block_Rewrite {
137
  $path .= 'index.php';
138
 
139
  // check file extention
140
- // if it fails, rewrite rule may be misconfigured
141
  if ( FALSE === strripos( strtolower( $path ), '.php', -4 ) )
142
  self::abort( $context, $validate, $settings, file_exists( $path ) );
143
 
@@ -215,7 +209,7 @@ endif; /* ! class_exists( 'IP_Geo_Block_Rewrite' ) */
215
  * RewriteRule ^.*\.php$ rewrite.php [L]
216
  * </IfModule>
217
  * # END IP Geo Block
218
- *
219
  * 2. `/wordpress/wp-content/themes/.htaccess`
220
  *
221
  * # BEGIN IP Geo Block
9
  * @copyright 2013-2016 tokkonopapa
10
  *
11
  * THIS IS FOR THE ADVANCED USERS:
12
+ * This file is for WP-ZEP. If a php file in the plugin/theme directory accepts
13
+ * some malicious requests directly without loading WP core, then validation by
14
+ * WP-ZEP will be bypassed. To avoid such a bypassing, those requests should be
15
+ * redirected to this file in order to load WP core. The `.htaccess` in the
16
+ * plugin/theme directory will help this redirection if it will be configured
17
+ * as follows (for apache):
18
  *
19
  * # BEGIN IP Geo Block
20
  * <IfModule mod_rewrite.c>
27
  *
28
  * The redirected requests will be verified against the certain attack patterns
29
  * such as null byte attack or directory traversal, and then load the WordPress
30
+ * core module through wp-load.php to triger WP-ZEP. If it ends up successfully,
31
  * this includes the originally requested php file to excute it.
32
  */
33
 
85
  if ( $settings['save_statistics'] )
86
  IP_Geo_Block_Logs::update_stat( 'admin', $validate, $settings );
87
 
 
 
 
 
 
 
88
  // send response code to refuse
89
+ $context->send_response( 'admin', $exist ? $settings['response_code'] : 404 );
90
  }
91
 
92
  /**
93
  * Validation of direct excution
94
  *
95
+ * @note: This function doesn't care about malicious query string.
96
  */
97
  public static function exec( $context, $validate, $settings ) {
98
 
99
  // get document root
100
+ // @note: super global can not be infected even when `register_globals` is on.
101
  // @see wp-admin/network.php, get_home_path() in wp-admin/includes/file.php
102
  // @link http://php.net/manual/en/security.globals.php
103
  // @link http://php.net/manual/en/reserved.variables.php#63831
115
 
116
  // while malicios URI may be intercepted by the server,
117
  // null byte attack should be invalidated just in case.
118
+ // @note: is_file(), is_readable(), file_exists() need a valid path.
119
+ // @link: http://php.net/releases/5_3_4.php, https://bugs.php.net/bug.php?id=39863
120
+ // ex) $path = "/etc/passwd\0.php"; is_file( $path ) === true (5.2.14), false (5.4.4)
121
  $path = self::realpath( str_replace( "\0", '', $path ) );
122
 
123
  // check path if under the document root
131
  $path .= 'index.php';
132
 
133
  // check file extention
134
+ // @note: if it fails, rewrite rule may be misconfigured
135
  if ( FALSE === strripos( strtolower( $path ), '.php', -4 ) )
136
  self::abort( $context, $validate, $settings, file_exists( $path ) );
137
 
209
  * RewriteRule ^.*\.php$ rewrite.php [L]
210
  * </IfModule>
211
  * # END IP Geo Block
212
+ *
213
  * 2. `/wordpress/wp-content/themes/.htaccess`
214
  *
215
  * # BEGIN IP Geo Block
uninstall.php CHANGED
@@ -15,11 +15,10 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
15
  }
16
 
17
  define( 'IP_GEO_BLOCK_PATH', plugin_dir_path( __FILE__ ) ); // @since 2.8
18
-
19
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php';
20
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php';
21
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php';
22
- require IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php';
23
 
24
  class IP_Geo_Block_Uninstall {
25
 
@@ -29,6 +28,7 @@ class IP_Geo_Block_Uninstall {
29
  */
30
  private static function delete_blog_options() {
31
  delete_option( IP_Geo_Block::OPTION_NAME ); // @since 1.2.0
 
32
  IP_Geo_Block_Logs::delete_tables();
33
  }
34
 
15
  }
16
 
17
  define( 'IP_GEO_BLOCK_PATH', plugin_dir_path( __FILE__ ) ); // @since 2.8
18
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block.php' );
19
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-util.php' );
20
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-opts.php' );
21
+ require_once( IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-logs.php' );
 
22
 
23
  class IP_Geo_Block_Uninstall {
24
 
28
  */
29
  private static function delete_blog_options() {
30
  delete_option( IP_Geo_Block::OPTION_NAME ); // @since 1.2.0
31
+ delete_transient( IP_Geo_Block::CACHE_NAME ); // @since 2.8
32
  IP_Geo_Block_Logs::delete_tables();
33
  }
34
 
wp-content/ip-geo-api/drop-in-sample.php CHANGED
@@ -8,8 +8,6 @@
8
  * @author tokkonopapa <tokkonopapa@yahoo.com>
9
  * @license GPL-2.0+
10
  * @link http://www.ipgeoblock.com/
11
- * @see http://www.ipgeoblock.com/codex/#filter-hooks
12
- * @example Use `IP_Geo_Block::add_filter()` instead of `add_filter()`
13
  */
14
  if ( ! class_exists( 'IP_Geo_Block' ) ) {
15
  die;
@@ -23,41 +21,12 @@ if ( ! class_exists( 'IP_Geo_Block' ) ) {
23
 
24
  /**
25
  * Example: Returns "404 Not found" to hide login page.
26
- *
27
- * @param int $code HTTP status code.
28
- * @return int modified HTTP status code.
29
  */
30
- /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTIONS -- *
31
  function my_login_status( $code ) {
32
  return 404;
33
  }
34
 
35
  IP_Geo_Block::add_filter( 'ip-geo-block-login-status', 'my_login_status', 10, 1 );
36
- //*/
37
-
38
- /**
39
- * Example: Change mode of recording log according to the target.
40
- *
41
- * @param int $mode 1:blocked 2:passed 3:unauth 4:auth 5:all
42
- * @param string $hook 'comment', 'xmlrpc', 'login', 'admin', 'public'
43
- * @param array 'ip', 'auth', 'code', 'result'
44
- * @return int $mode modefied recording mode.
45
- */
46
- /* -- EDIT THIS LINE AND ACTIVATE THE FOLLOWING FUNCTIONS -- *
47
- function my_record_logs( $mode, $hook, $validate ) {
48
- // Countries where you want to supress recording logs.
49
- $whitelist = array(
50
- 'JP',
51
- );
52
-
53
- // Suppress recording logs in case of whitelisted countries on public facing pages.
54
- if ( 'public' !== $hook || in_array( $validate['code'], $whitelist, TRUE ) ) {
55
- return 1; // Only when blocked
56
- }
57
- else {
58
- return 3; // Unauthenticated user
59
- }
60
- }
61
-
62
- IP_Geo_Block::add_filter( 'ip-geo-block-record-logs', 'my_record_logs', 10, 3 );
63
- //*/
8
  * @author tokkonopapa <tokkonopapa@yahoo.com>
9
  * @license GPL-2.0+
10
  * @link http://www.ipgeoblock.com/
 
 
11
  */
12
  if ( ! class_exists( 'IP_Geo_Block' ) ) {
13
  die;
21
 
22
  /**
23
  * Example: Returns "404 Not found" to hide login page.
24
+ * Note: Use IP_Geo_Block::add_filter() instead of add_filter()
 
 
25
  */
26
+ /*
27
  function my_login_status( $code ) {
28
  return 404;
29
  }
30
 
31
  IP_Geo_Block::add_filter( 'ip-geo-block-login-status', 'my_login_status', 10, 1 );
32
+ //*/