IP Geo Block - Version 3.0.17.1

Version Description

  • Fix issue: Inadequate verification of IPv4 with some CIDR notation.
  • Fix issue: Insufficient path parsing for document root and content directory when real path and symbolic link were mixtured on virtual host.
  • Fix issue: Unexpected blocking on admin dashboard when home url is different from site url.
  • Fix issue: wp-signup.php was not blocked when only "Register" was enabled as "Target actions" at "Login form" in "Back-end target settings" section.
  • Improvement: Improve compatibility with Advanced Access Manager.
  • Improvement: Use comment syntax @codingStandardsIgnoreLine for deprecated function on PHP7+ to avoid false positive by some scanning tool like PHP Compatibility Checker. Hava a happy new year!
Download this release

Release Info

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

Code changes from version 3.0.17 to 3.0.17.1

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: tokkonopapa
3
  Donate link:
4
  Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
5
  Requires at least: 3.7
6
- Tested up to: 4.9.8
7
- Stable tag: 3.0.17
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -146,7 +146,9 @@ See more details at "[How to test prevention of attacks](https://www.ipgeoblock.
146
 
147
  = I'm locked out! What shall I do? =
148
 
149
- You can find the "**Emergent Functionality**" code section near the bottom of `ip-geo-block.php`. This code block can be activated by replacing `/*` (opening multi-line comment) at the top of the line to `//` (single line comment), or `*` at the end of the line to `*/` (closing multi-line comment).
 
 
150
 
151
  `/**
152
  * Invalidate blocking behavior in case yourself is locked out.
@@ -232,6 +234,15 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
232
 
233
  == Changelog ==
234
 
 
 
 
 
 
 
 
 
 
235
  = 3.0.17 =
236
  * **Fix issue:** Avoid the error of "Can not load Geolocation API libraries" caused by the race condition on upgrading this plugin.
237
  * **New feature:** Enhance protecting against certain types of attacks by privilege escalation.
3
  Donate link:
4
  Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
5
  Requires at least: 3.7
6
+ Tested up to: 5.0.2
7
+ Stable tag: 3.0.17.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
146
 
147
  = I'm locked out! What shall I do? =
148
 
149
+ Please find the solution in [Quick recovery from blocking on your login page](https://www.ipgeoblock.com/codex/quick-recovery-from-blockig-on-login-page.html "Quick recovery from blocking on your login page | IP Geo Block") at first.
150
+
151
+ You can also find another solution by editing "**Emergent Functionality**" code section near the bottom of `ip-geo-block.php`. This code block can be activated by replacing `/*` (opening multi-line comment) at the top of the line to `//` (single line comment), or `*` at the end of the line to `*/` (closing multi-line comment).
152
 
153
  `/**
154
  * Invalidate blocking behavior in case yourself is locked out.
234
 
235
  == Changelog ==
236
 
237
+ = 3.0.17.1 =
238
+ * **Fix issue:** Inadequate verification of IPv4 with some CIDR notation.
239
+ * **Fix issue:** Insufficient path parsing for document root and content directory when real path and symbolic link were mixtured on virtual host.
240
+ * **Fix issue:** Unexpected blocking on admin dashboard when home url is different from site url.
241
+ * **Fix issue:** `wp-signup.php` was not blocked when only "Register" was enabled as "Target actions" at "Login form" in "Back-end target settings" section.
242
+ * **Improvement:** Improve compatibility with Advanced Access Manager.
243
+ * **Improvement:** Use comment syntax `@codingStandardsIgnoreLine` for deprecated function on PHP7+ to avoid false positive by some scanning tool like PHP Compatibility Checker.
244
+ Hava a happy new year!
245
+
246
  = 3.0.17 =
247
  * **Fix issue:** Avoid the error of "Can not load Geolocation API libraries" caused by the race condition on upgrading this plugin.
248
  * **New feature:** Enhance protecting against certain types of attacks by privilege escalation.
admin/css/admin.css CHANGED
@@ -236,7 +236,7 @@ ul#ip-geo-block-logs-preset {
236
  }
237
  ul#ip-geo-block-logs-preset li {
238
  float: left;
239
- line-height: 1.6;
240
  margin-right: 1em;
241
  min-width: 160px;
242
  }
236
  }
237
  ul#ip-geo-block-logs-preset li {
238
  float: left;
239
+ line-height: 1.5em;
240
  margin-right: 1em;
241
  min-width: 160px;
242
  }
admin/css/admin.min.css CHANGED
@@ -3,4 +3,4 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- dfn{cursor:help;border-bottom:1px dotted #888}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}label{display:inline-block;max-width:100%}.panel{border-color:#888;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}.ip-geo-block-help-link a{box-shadow:none}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em 0}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}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:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}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:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}fieldset.ip-geo-block-field input[type=checkbox],fieldset.ip-geo-block-field input[type=radio],p.ip-geo-block-navi-link input[type=checkbox]{margin-right:.4em}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786c2;display:inline-block}.ip-geo-block-primary{color:#fff!important;background:#00838f!important;border-color:#00707a!important;text-shadow:none}.ip-geo-block-primary:hover{background-color:#00919e!important;border-color:#00525a!important}ul#ip-geo-block-logs-preset{margin:.25em 0;max-width:600px}ul#ip-geo-block-logs-preset li{float:left;line-height:1.6;margin-right:1em;min-width:160px}#ip-geo-block-live-loading,.ip-geo-block-loading{height:16px;width:16px;background-size:16px 16px;background-position:center center;background-repeat:no-repeat;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7)}#ip-geo-block-map{height:400px;margin:1em auto}#ip-geo-block-apis div.nav-tab-wrapper{padding-top:0;margin-bottom:1em}#ip-geo-block-geoinfo{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-geoinfo ul{margin-top:0;margin-left:1em}.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}svg a{cursor:pointer}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}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:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative;cursor:pointer;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{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)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{padding-top:.15em;margin:.5em 0 0 .3em;position:relative;display:inline-block}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length:after{content:'';width:6px;height:6px;border:0;border-bottom:solid 2px #999;border-right:solid 2px #999;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:50%;right:10px;margin-top:-4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select{padding-top:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px!important;line-height:1.4em;width:100%;height:2.05em!important;background:0 0;position:relative;z-index:1;padding:.125em 1.5em .125em .25em;border:1px solid #ddd;border-radius:4px;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select::-ms-expand{display:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em;margin-top:0!important}@media screen and (min-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{margin:.5em 0 0 .6em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{position:relative;left:-2.25em}}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0 0;padding:.25em 0;display:inline-block;text-decoration:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body{padding:0}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{padding:0;background:gold}// Gold #ip-geo-block-live-log{margin:0}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:#0073aa;border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(0);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}.ip-geo-block-subitem-parent td,.ip-geo-block-subitem-parent th{padding-top:0}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ dfn{cursor:help;border-bottom:1px dotted #888}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}label{display:inline-block;max-width:100%}.panel{border-color:#888;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}.ip-geo-block-help-link a{box-shadow:none}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em 0}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}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:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}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:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}fieldset.ip-geo-block-field input[type=checkbox],fieldset.ip-geo-block-field input[type=radio],p.ip-geo-block-navi-link input[type=checkbox]{margin-right:.4em}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786c2;display:inline-block}.ip-geo-block-primary{color:#fff!important;background:#00838f!important;border-color:#00707a!important;text-shadow:none}.ip-geo-block-primary:hover{background-color:#00919e!important;border-color:#00525a!important}ul#ip-geo-block-logs-preset{margin:.25em 0;max-width:600px}ul#ip-geo-block-logs-preset li{float:left;line-height:1.5em;margin-right:1em;min-width:160px}#ip-geo-block-live-loading,.ip-geo-block-loading{height:16px;width:16px;background-size:16px 16px;background-position:center center;background-repeat:no-repeat;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7)}#ip-geo-block-map{height:400px;margin:1em auto}#ip-geo-block-apis div.nav-tab-wrapper{padding-top:0;margin-bottom:1em}#ip-geo-block-geoinfo{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-geoinfo ul{margin-top:0;margin-left:1em}.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}svg a{cursor:pointer}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}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:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative;cursor:pointer;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{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)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{padding-top:.15em;margin:.5em 0 0 .3em;position:relative;display:inline-block}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length:after{content:'';width:6px;height:6px;border:0;border-bottom:solid 2px #999;border-right:solid 2px #999;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:50%;right:10px;margin-top:-4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select{padding-top:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px!important;line-height:1.4em;width:100%;height:2.05em!important;background:0 0;position:relative;z-index:1;padding:.125em 1.5em .125em .25em;border:1px solid #ddd;border-radius:4px;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select::-ms-expand{display:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em;margin-top:0!important}@media screen and (min-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{margin:.5em 0 0 .6em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{position:relative;left:-2.25em}}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0 0;padding:.25em 0;display:inline-block;text-decoration:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body{padding:0}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{padding:0;background:gold}// Gold #ip-geo-block-live-log{margin:0}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:#0073aa;border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(0);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}.ip-geo-block-subitem-parent td,.ip-geo-block-subitem-parent th{padding-top:0}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
admin/includes/class-admin-ajax.php CHANGED
@@ -522,14 +522,14 @@ endif; // TEST_RESTORE_NETWORK
522
  '[extra_ips][white_list]',
523
  '[extra_ips][black_list]',
524
  '[anonymize]',
525
- '[restrict_api]', // 3.0.13
526
- '[simulate]', // 3.0.14
527
  '[signature]',
528
  '[login_fails]',
529
  '[response_code]',
530
- '[response_msg]', // 3.0.0
531
- '[redirect_uri]', // 3.0.0
532
- '[validation][timing]', // 2.2.9
533
  '[validation][proxy]',
534
  '[validation][comment]',
535
  '[validation][xmlrpc]',
@@ -600,7 +600,8 @@ endif; // TEST_RESTORE_NETWORK
600
  '[mimetype][capability][$]', // 3.0.4
601
  '[Maxmind][use_asn]', // 3.0.4
602
  '[live_update][in_memory]', // 3.0.5
603
- '[monitor][metadata]', // 3.0.17
 
604
  '[metadata][pre_update_option][$]', // 3.0.17
605
  '[metadata][pre_update_site_option][$]', // 3.0.17
606
  );
@@ -747,8 +748,7 @@ endif; // TEST_RESTORE_NETWORK
747
  switch ( $which ) {
748
  case 'page':
749
  case 'action':
750
- $dir = admin_url();
751
- $dir = preg_replace( '!https?://.+?/!', '/', IP_Geo_Block_Util::slashit( $dir ) );
752
 
753
  foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
754
  foreach ( array( 'method', 'data' ) as $key ) {
@@ -773,8 +773,8 @@ endif; // TEST_RESTORE_NETWORK
773
  }
774
 
775
  $dir = 'plugins' === $which ? plugins_url() : get_theme_root_uri();
776
- $dir = preg_replace( '!https?://.+?/!', '/', IP_Geo_Block_Util::slashit( $dir ) );
777
- $pat = preg_quote( $dir, '!' ); // `/wp-content/[plugins|themes]/`
778
 
779
  foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
780
  if ( preg_match( '!' . $pat . '(.+?)/!', $log['method'], $matches ) && in_array( $matches[1], $key, TRUE ) ) {
522
  '[extra_ips][white_list]',
523
  '[extra_ips][black_list]',
524
  '[anonymize]',
525
+ '[restrict_api]', // 3.0.13
526
+ '[simulate]', // 3.0.14
527
  '[signature]',
528
  '[login_fails]',
529
  '[response_code]',
530
+ '[response_msg]', // 3.0.0
531
+ '[redirect_uri]', // 3.0.0
532
+ '[validation][timing]', // 2.2.9
533
  '[validation][proxy]',
534
  '[validation][comment]',
535
  '[validation][xmlrpc]',
600
  '[mimetype][capability][$]', // 3.0.4
601
  '[Maxmind][use_asn]', // 3.0.4
602
  '[live_update][in_memory]', // 3.0.5
603
+ '[monitor][updated_option]', // 3.0.18
604
+ '[monitor][update_site_option]', // 3.0.18
605
  '[metadata][pre_update_option][$]', // 3.0.17
606
  '[metadata][pre_update_site_option][$]', // 3.0.17
607
  );
748
  switch ( $which ) {
749
  case 'page':
750
  case 'action':
751
+ $dir = IP_Geo_Block_Util::slashit( str_replace( site_url(), '', admin_url() ) ); /* `/wp-admin/` */
 
752
 
753
  foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
754
  foreach ( array( 'method', 'data' ) as $key ) {
773
  }
774
 
775
  $dir = 'plugins' === $which ? plugins_url() : get_theme_root_uri();
776
+ $dir = IP_Geo_Block_Util::slashit( str_replace( site_url(), '', $dir ) );
777
+ $pat = preg_quote( $dir, '!' ); /* `/wp-content/(plugins|themes)/` */
778
 
779
  foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
780
  if ( preg_match( '!' . $pat . '(.+?)/!', $log['method'], $matches ) && in_array( $matches[1], $key, TRUE ) ) {
admin/includes/class-admin-rewrite.php CHANGED
@@ -10,7 +10,7 @@ class IP_Geo_Block_Admin_Rewrite {
10
  private $doc_root = NULL; // document root
11
  private $base_uri = NULL; // plugins base uri
12
  private $config_file = NULL; // `.htaccess` or `.user.ini`
13
- private $wp_dirs = array(); // path to `plugins` and `themes`
14
 
15
  // template of rewrite rule in wp-content/(plugins|themes)/
16
  private $rewrite_rule = array(
@@ -71,8 +71,8 @@ class IP_Geo_Block_Admin_Rewrite {
71
  $this->doc_root = str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] ) );
72
  $this->base_uri = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', IP_GEO_BLOCK_PATH ) );
73
 
74
- // target directories
75
- $path = str_replace( $this->doc_root, '', str_replace( '\\', '/', WP_CONTENT_DIR ) );
76
  $this->wp_dirs = array(
77
  'plugins' => $path . '/plugins/',
78
  'themes' => $path . '/themes/',
10
  private $doc_root = NULL; // document root
11
  private $base_uri = NULL; // plugins base uri
12
  private $config_file = NULL; // `.htaccess` or `.user.ini`
13
+ private $wp_dirs = array(); // path to `plugins` and `themes` from document root
14
 
15
  // template of rewrite rule in wp-content/(plugins|themes)/
16
  private $rewrite_rule = array(
71
  $this->doc_root = str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] ) );
72
  $this->base_uri = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', IP_GEO_BLOCK_PATH ) );
73
 
74
+ // target directories (WP_CONTENT_DIR can be defined in wp-config.php as an aliased or symbolic linked path)
75
+ $path = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', realpath( WP_CONTENT_DIR ) ) );
76
  $this->wp_dirs = array(
77
  'plugins' => $path . '/plugins/',
78
  'themes' => $path . '/themes/',
admin/includes/tab-settings.php CHANGED
@@ -449,8 +449,8 @@ endif;
449
  $target = array(
450
  'comment' => sprintf( $dfn, 'wp-comments-post.php', __( 'Comment post', 'ip-geo-block' ) ),
451
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
452
- 'login' => sprintf( $dfn, 'wp-login.php', __( 'Login form', 'ip-geo-block' ) ),
453
- 'admin' => sprintf( $dfn, 'wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
454
  'others' => sprintf( $dfn, 'executable files', __( 'Other areas', 'ip-geo-block' ) ),
455
  'public' => sprintf( $dfn, __( 'public facing pages', 'ip-geo-block' ), __( 'Public facing pages', 'ip-geo-block' ) ),
456
  );
@@ -625,7 +625,7 @@ endif;
625
 
626
  // Admin ajax/post
627
  $path = IP_Geo_Block::get_wp_path();
628
- $val = esc_html( substr( $path['admin'], 1 ) );
629
  add_settings_field(
630
  $option_name.'_validation_ajax',
631
  sprintf( $dfn, $val.'admin-(ajax|post).php', __( 'Admin ajax/post', 'ip-geo-block' ) ),
@@ -698,7 +698,7 @@ endif;
698
  . ' value="1"' . checked( $options['rewrite']['plugins'], TRUE, FALSE )
699
  . disabled( $options['rewrite']['plugins'], -1, FALSE ) . ' />'
700
  . '<label for="ip_geo_block_settings_rewrite_plugins"><dfn title="'
701
- . ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
702
  . '">' . __( 'Force to load WP core', 'ip-geo-block' )
703
  . '</dfn></label><br />';
704
 
@@ -758,7 +758,7 @@ endif;
758
  . ' value="1"' . checked( $options['rewrite']['themes'], TRUE, FALSE )
759
  . disabled( $options['rewrite']['themes'], -1, FALSE ) . ' />'
760
  . '<label for="ip_geo_block_settings_rewrite_themes"><dfn title="'
761
- . ( $config ? sprintf( $desc[2], $val . $config ) : $desc[3] )
762
  . '">' . __( 'Force to load WP core', 'ip-geo-block' )
763
  . '</dfn></label><br />';
764
 
449
  $target = array(
450
  'comment' => sprintf( $dfn, 'wp-comments-post.php', __( 'Comment post', 'ip-geo-block' ) ),
451
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
452
+ 'login' => sprintf( $dfn, 'wp-login.php, wp-signup.php', __( 'Login form', 'ip-geo-block' ) ),
453
+ 'admin' => sprintf( $dfn, '/wp-admin/*.php', __( 'Admin area', 'ip-geo-block' ) ),
454
  'others' => sprintf( $dfn, 'executable files', __( 'Other areas', 'ip-geo-block' ) ),
455
  'public' => sprintf( $dfn, __( 'public facing pages', 'ip-geo-block' ), __( 'Public facing pages', 'ip-geo-block' ) ),
456
  );
625
 
626
  // Admin ajax/post
627
  $path = IP_Geo_Block::get_wp_path();
628
+ $val = esc_html( $path['admin'] );
629
  add_settings_field(
630
  $option_name.'_validation_ajax',
631
  sprintf( $dfn, $val.'admin-(ajax|post).php', __( 'Admin ajax/post', 'ip-geo-block' ) ),
698
  . ' value="1"' . checked( $options['rewrite']['plugins'], TRUE, FALSE )
699
  . disabled( $options['rewrite']['plugins'], -1, FALSE ) . ' />'
700
  . '<label for="ip_geo_block_settings_rewrite_plugins"><dfn title="'
701
+ . ( $config ? sprintf( $desc[2], esc_html( $path['home'] . $path['plugins'] ) . $config ) : $desc[3] )
702
  . '">' . __( 'Force to load WP core', 'ip-geo-block' )
703
  . '</dfn></label><br />';
704
 
758
  . ' value="1"' . checked( $options['rewrite']['themes'], TRUE, FALSE )
759
  . disabled( $options['rewrite']['themes'], -1, FALSE ) . ' />'
760
  . '<label for="ip_geo_block_settings_rewrite_themes"><dfn title="'
761
+ . ( $config ? sprintf( $desc[2], esc_html( $path['home'] . $path['themes'] ) . $config ) : $desc[3] )
762
  . '">' . __( 'Force to load WP core', 'ip-geo-block' )
763
  . '</dfn></label><br />';
764
 
admin/js/admin.js CHANGED
@@ -649,7 +649,9 @@
649
  // setHash( name, value, expires, path, domain, secure )
650
  if (wpCookies !== undefined) {
651
  wpCookies.setHash(
652
- 'ip-geo-block', c, new Date(Date.now() + 2592000000), ip_geo_block_auth.home + ip_geo_block_auth.admin
 
 
653
  );
654
  }
655
  }
@@ -1244,7 +1246,7 @@
1244
  id = ID('!', 'exception_' + target + '_' + val);
1245
 
1246
  // make an anchor tab with search query
1247
- s = 'admin' === target ? (key + '=' + val) : ('/' + key + '/' + val + '/');
1248
  s = '<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="' + ip_geo_block_auth.sites[0] + ip_geo_block_auth.admin + 'options-general.php' + // only main site
1249
  '?page=ip-geo-block&tab=4&s=' + encodeURIComponent(s) + '" title="' + title.replace('%s', s) + '" target="_blank"><span></span></a>';
1250
 
649
  // setHash( name, value, expires, path, domain, secure )
650
  if (wpCookies !== undefined) {
651
  wpCookies.setHash(
652
+ 'ip-geo-block', c, new Date(Date.now() + 2592000000),
653
+ // `/wp-admin/`, `/wp-admin/network/` or `/wp/wp-admin/`
654
+ window.location.pathname.replace(/\\/g, '/').match(/.*\//) || ip_geo_block_auth.home + ip_geo_block_auth.admin
655
  );
656
  }
657
  }
1246
  id = ID('!', 'exception_' + target + '_' + val);
1247
 
1248
  // make an anchor tab with search query
1249
+ s = 'admin' === target ? (key + ' ' + val) : ('/' + key + '/' + val + '/');
1250
  s = '<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="' + ip_geo_block_auth.sites[0] + ip_geo_block_auth.admin + 'options-general.php' + // only main site
1251
  '?page=ip-geo-block&tab=4&s=' + encodeURIComponent(s) + '" title="' + title.replace('%s', s) + '" target="_blank"><span></span></a>';
1252
 
admin/js/admin.min.js CHANGED
@@ -3,4 +3,4 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- !function(e,t,n,i){var a=!1,o=[],r=e(t).width(),l=IP_GEO_BLOCK,c=IP_GEO_BLOCK_AUTH;function s(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return t!==i?n[e]+t:n.$+e}function d(e){return e?function(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}).replace(/&amp;(#\d{2,4}|\w{4,7});/g,"&$1;")}(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function u(n,a){var l=e(t).width();l!==r&&(r=l,o[n]===i&&(o[n]={id:!1,callback:a}),e(t).off("resize").on("resize",function(){return!1!==o[n].id&&t.clearTimeout(o[n].id),o[n].time=t.setTimeout(o[n].callback,200),!1}))}function p(t,n){n?e(s("#",t)).addClass(s("loading")):e(s("#",t)).removeClass(s("loading"))}function h(e,n){t.confirm(d(e))&&n()}function f(e,n,i){t.alert(d(n||l.msg[11].replace("%s",i)+" ("+e+")"))}function g(){f(null,d(l.msg[9]))}function m(e,n){-1!==t.location.href.indexOf(e)&&(t.location=d(e)+(n?"&"+d(n):"")+"&"+(c.key?c.key+"="+c.nonce:""))}function v(t,n,i,o){t&&p(t,!0),n.action=l.action,n.nonce=l.nonce,e.ajax({type:"POST",url:l.url,data:n,dataType:"json"}).done(function(e){i&&i(e)}).fail(function(e){a||f(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof o?e.when.apply(e,o).then(function(){p(t,!1)}):p(t,!1))})}function b(e,t){v(e,{cmd:"clear-"+e,which:t},function(e){m(e.page,e.tab)})}function k(e){return e.stopImmediatePropagation(),!1}function w(e,t){t?e.removeClass("folding-disable"):(e.children(s(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(s("dropdown")).addClass(s("dropup")))}function x(t,n,i){var a=t.prop("type")||"",o=0===a.indexOf("checkbox")&&t.is(":checked")||0===a.indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+s("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(s(".","settings-folding")).each(function(n,a){w(e(a),o&&i[t])})}):n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),o&&i)})}function y(t){var n=s("@","validation_ajax_");w(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function _(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function C(e){return function(e){return t.btoa(e)}(_(e))}function P(e){return _(function(e){return t.atob(e)}(e))}function S(t){var n=t.is(":checked"),i=e(s("@","public_target_rule")),a=e(s("@","public_behavior")),o=t.closest("tr").nextAll("tr");o.find('[name^="'+s("%","settings")+'"]').prop("disabled",!n),o.find(s(".","desc")).css("opacity",n?1:.5),x(t,[i,a],["1"===i.val(),a.val()]),n&&a.change()}function A(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(s("#","import")).closest("form").deserialize(t),e(s("@","exception_admin")+","+s("@","validation_mimetype")).change(),e('select[name*="'+s("%","settings")+'"]').change(),e(s("@","validation_login")).change(),S(e(s("@","validation_public"))),y(e(s("@","validation_ajax_1"))),n&&(n=s("%","settings[providers][IPInfoDB]"),e(s("@","providers_IPInfoDB")).prop("checked",!!t[n])))}e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=d(decodeURIComponent(n)),a=d(decodeURIComponent(t[n])),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(e){}e.each(r,function(t,i){"hidden"!==(n=e('[name="'+t+'"]:input',o).val(i)).attr("type")&&n.before('<span style="color:red">*</span>')})})};var O={dataPie:[],viewPie:[],drawPie:function(a){var o,r;O.dataPie[a]===i&&((o=O.dataPie[a]=new t.google.visualization.DataTable).addColumn("string","Country"),o.addColumn("number","Requests"),r=e.parseJSON(e("#"+a).attr("data-"+a)),O.dataPie[a].addRows(r)),O.viewPie[a]===i&&(O.viewPie[a]=new t.google.visualization.PieChart(n.getElementById(a))),O.dataPie[a]!==i&&O.viewPie[a]!==i&&0<(o=e("#"+a).width())&&O.viewPie[a].draw(O.dataPie[a],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(a,o){var r,l,c;if(O.dataLine[a]===i){for((r=O.dataLine[a]=new t.google.visualization.DataTable).addColumn(o,"Date"),r.addColumn("number","comment"),r.addColumn("number","xmlrpc"),r.addColumn("number","login"),r.addColumn("number","admin"),r.addColumn("number","public"),l=(c=e.parseJSON(e("#"+a).attr("data-"+a))).length,r=0;r<l;++r)c[r][0]=new Date(1e3*c[r][0]);O.dataLine[a].addRows(c)}O.viewLine[a]===i&&(O.viewLine[a]=new t.google.visualization.LineChart(n.getElementById(a))),O.dataLine[a]!==i&&O.viewLine[a]!==i&&0<(r=e("#"+a).width())&&O.viewLine[a].draw(O.dataLine[a],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===o?" HH:mm":"")},vAxis:{textPosition:r>320?"out":"in"},chartArea:{left:r>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(a){var o,r,l,c,u=e("#"+d(a));O.dataStacked[a]===i&&(l=e.parseJSON(u.attr("data-"+a)))&&(l.unshift(["site","comment","xmlrpc","login","admin","public",{role:"link"}]),O.dataStacked[a]=t.google.visualization.arrayToDataTable(l)),O.viewStacked[a]===i&&(O.viewStacked[a]=new t.google.visualization.BarChart(n.getElementById(a)),t.google.visualization.events.addListener(O.viewStacked[a],"animationfinish",function(){var t,i,o,r=[],l=O.dataStacked[a],c=l.getNumberOfRows(),d=e(s("#","open-new")).prop("checked");for(t=0;t<c;t++)r.push({label:l.getValue(t,0),link:l.getValue(t,6)});c="http://www.w3.org/1999/xlink",u.find("text").each(function(e,t){"g"===(o=t.parentNode).tagName.toLowerCase()&&-1!==(e=function(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;n<i;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}(t.textContent,r))&&((i=n.createElementNS("http://www.w3.org/2000/svg","a")).setAttributeNS(c,"xlink:href",r[e].link),i.setAttributeNS(c,"title",r[e].label),i.setAttribute("target",d?"_blank":"_self"),i.setAttribute("class","site"),i.appendChild(o.removeChild(t)),o.appendChild(i),r.splice(e,1))})})),0<(r=u.width())&&O.dataStacked[a]!==i&&O.viewStacked[a]!==i&&(o=s("range"),c=e.parseJSON(e("."+o).attr("data-"+o)),o=40*(l=O.dataStacked[a]).getNumberOfRows(),O.viewStacked[a].draw(l,{width:r,height:o+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:o},hAxis:{minValue:0,maxValue:c[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,a,o){v(null,{cmd:"restore-network",which:t=Math.max(0,Math.min(4,t)),offset:(n=5*Math.max(1,Math.min(5,n)))*a*o,length:n},function(t){var a,o,r,l,c;t=function(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;n<a;++n)i=n*t,o.push(e.slice(i,i+t));return o}(t,n),e(s(".","network")).each(function(s,d){if(t[s]!==i){for(l=e(d).attr("id"),c=O.dataStacked[l],r=Math.min(n,t[s].length),a=0;a<r;++a)for(o=1;o<=5;o++)c.setValue(a,o,t[s][a][o]);O.drawStacked(l)}})})}};function I(n){"object"==typeof t.google&&(1===n?e(s("#","chart-countries")).length&&(O.drawPie(s("chart-countries")),O.drawLine(s("chart-daily"),"date")):5===n&&e(s(".","network")).each(function(t,n){O.drawStacked(e(n).attr("id"))}))}function N(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.charts.load("current",{packages:n,callback:function(){I(e)}}),u("draw-chart."+e,function(){I(e)})}}function D(t){var n,a,o=[];e.each(t,function(e,t){if(o[e]="",t!==i&&(a=t.length))for(o[e]=(t[0]||"o").toString(),n=1;n<a;++n)o[e]+=(t[n]||"o").toString()}),wpCookies!==i&&wpCookies.setHash("ip-geo-block",o,new Date(Date.now()+2592e6),c.home+c.admin)}function j(t){var a=function(e){var t,n=wpCookies!==i&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/gi,"").split(""));return n[e]===i&&(n[e]=[]),n}(t);return e(n).on("click","form>h2,h3",function(){return function(e,t,n){var i,a=e.closest("fieldset").data("section"),o=e.parent().nextAll(".panel-body").toggle();e.toggleClass(s("dropup")).toggleClass(s("dropdown")),(i=e.hasClass(s("dropdown")))?o.addClass(s("border")).trigger(s("show-body")):o.removeClass(s("border")),n[t][a]=i?"o":"x",D(n),I(t)}(e(this),t,a),!1}),e(s("#","toggle-sections")).on("click",function(){var n,i=e(s(".","field")).find("h2,h3"),o=[s("dropdown"),s("dropup")],r=i.filter("."+o[0]).length;return i.each(function(i){(n=e(this)).removeClass(o.join(" ")).addClass(r?o[1]:o[0]),n=n.parent().nextAll(".panel-body").toggle(!r),r?n.removeClass(s("border")):n.addClass(s("border")).trigger("show-body"),a[t][i]=r?"x":"o"}),D(a),I(t),!1}),a}function T(t){e("body").append('<div style="display:none"><form method="POST" id="'+s("export-form")+'" action="'+l.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+l.action+'" /><input type="hidden" name="nonce" value="'+l.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+s("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+s("file-dialog")+'" /></div>')}function L(e,t,n,i){var a,o;return(a=e.cloneNode(!1)).setAttribute("title",d(n)),(o=t.cloneNode(!1)).setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function R(n,a,o,r){var c=Number(r[n][1===n?3:2])||0;c=[10,25,50,100][c],e.extend(!0,e.fn.dataTable.defaults,o,{dom:"tlp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,language:{emptyTable:l.i18n[1],loadingRecords:l.i18n[0],processing:l.i18n[0],zeroRecords:l.i18n[2],lengthMenu:"_MENU_",paginate:{first:"&laquo;",last:"&raquo;",next:"&rsaquo;",previous:"&lsaquo;"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",lengthMenu:[10,25,50,100],pageLength:c,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(s("#",a.tableID)).find("td.dataTables_empty"),i="restore-logs"===a.ajaxCMD?3:2;i>t.iDraw?n.html(l.i18n[0]):i===t.iDraw&&(n.html(l.i18n[1]),(n=e(s("@","search_filter"))).val()&&n.trigger("keyup"))}});var d=e(s("#",a.tableID)).DataTable({ajax:{url:l.url,type:"POST",data:{cmd:a.ajaxCMD,action:l.action,nonce:l.nonce}},mark:!0}),p=function(){d.columns.adjust().responsive.recalc().draw(!1)};return u("draw-table."+n,p),e(s("#",a.sectionID)).find(".panel-body").off(s("show-body")).on(s("show-body"),function(){return p(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(s("#",a.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(s("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+s("target")+'"]:checked').val();return d.columns(a.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(s("#","bulk-action")).off("click").on("click",function(){var t,o,r=e(this).prev().val(),c=/(<([^>]+)>)/gi,u=/data-hash=[\W]([\w]+)[\W]/i,p={IP:[],AS:[]},h=d.$("input:checked");return!!r&&(h.length?(h.each(function(){o=d.cell(this.parentNode).data(),t=("bulk-action-remove"===r||"bulk-action-ip-erase"===r)&&(t=o[a.columnIP].match(u))?","+t[1]:"",p.IP.push(o[a.columnIP].replace(c,"")+t),p.AS.push(o[a.columnAS].replace(c,""))}),p.IP.length&&v("loading",{cmd:r,which:p},function(t){t.page!==i?m(t.page,"tab="+n):t&&(d.ajax.reload(),e(s("#",a.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(f(null,l.msg[10]),!1))}),e(s("@","search_filter")).off("keyup").on("keyup",function(){return d.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(s("#","reset-filter")).off("click").on("click",function(){return e(s("@","search_filter")).val(""),d.search("").draw(),!1}),e(s("@","clear_all")).off("click").on("click",function(){return h(l.msg[0],function(){b(1===n?"cache":"logs",null)}),!1}),e("table"+s(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;i<r;++i)l[(a=o[i].split("="))[0]]=a[1];for(i in l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[],l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),e(s("#",a.tableID)).on("length.dt",function(e,t,i){r[n][1===n?3:2]={10:0,25:1,50:2,100:3}[i]||0,D(r)}),d}e(function(){var o=Number(l.tab)||0,r=j(o);switch(e(s(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){a=!0}),o){case 0:var u=s("%","settings");e('[id^="'+s("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),i=t.parent();return v(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(s("scan-"),"")},function(e){var t,n;for(t in i.children("ul").length||i.append('<ul id="'+s("code-list")+'"></ul>'),i=i.children("ul").empty(),e)e.hasOwnProperty(t)&&("string"==typeof e[t=d(t)]?n=d(e[t]):(n=d(e[t].code),t='<abbr title="'+d(e[t].type)+'">'+t+"</abbr>"),i.append("<li>"+t+' : <span class="'+s("notice")+'">'+n+"</span></li>"));i.show("slow")}),!1}),e(s("@","matching_rule")).on("change",function(){var t=this.value;return e(s("@","white_list")).closest("tr").toggle("0"===t),e(s("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(s(".","icon-cidr")).on("click",function(){var n=e(s("#","admin-styles-css")).get(0).href,i=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),i.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=&rarr; class="col span_24" tabindex=3><li class=row><input id=f type=button value=&larr; class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"><\/script>'),i.document.close(),!1}),e(s("@","validation_mimetype")).on("change",function(t){var n=e(this),i=Number(n.val());return n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),i===t+1||i&&2===t)}),k(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),i=parseInt(n.val()/100,10),a=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===Number(e(s("@","public_matching_rule")).val())?(a.each(function(t){1>=t&&e(this).hide()}),k(t)):(i<=3?a.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):a.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),k(t))}).change(),e(s("#","decode")).on("click",function(){var t=e(s("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(P(n)):t.val(C(n)),!1}),e(s("@","validation_login")).on("change",function(t){var n=e(this);return x(n,n,u),k(t)}).change(),v(null,{cmd:"get-actions"},function(t){var i,a,o,r,u=e(s("#","list-admin")),p=n.createElement("li"),h=n.createElement("input"),f=n.createElement("label"),g=n.createElement("dfn"),m=n.createElement("span");for(r in t)t.hasOwnProperty(r)&&(r=d(r),u.find("#"+(o=s("!","exception_admin_"+r))).size()||((i=h.cloneNode(!1)).setAttribute("id",o),i.setAttribute("value",r),i.setAttribute("type","checkbox"),(a=p.cloneNode(!1)).appendChild(i),(i=f.cloneNode(!1)).setAttribute("for",o),i.appendChild(n.createTextNode(r)),a.appendChild(i),1&t[r]&&a.appendChild(L(g,m,l.msg[5],"lock")),2&t[r]&&a.appendChild(L(g,m,l.msg[6],"unlock")),u.append(a)));e(s(".","icon-unlock")).on("click",function(){return e(s("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(s("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(s("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),k(t)}).change(),e(s("#","list-admin")).on("click","input",function(){var t,n=e(this),i=e(s("@","exception_admin")),a=n.val(),o=e.grep(i.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});-1===(t=e.inArray(a,o))?o.push(a):o.splice(t,1),i.val(o.join(",")).change()}),e(s(".","icon-find")).on("click",function(){var t,n,i,a,o=e(this),r=[],u=0,p=d(l.msg[8]),h=d(o.data("target"));return e(s("#","find-"+h)).empty(),o.next().children(s(".","find-desc")).show(),(o=e(s("#","list-"+h))).children("li").each(function(t,n){r.push(e(n).find("input").val())}),v("find-"+h,{cmd:"find-"+h},function(f){var g;for(g in f)f.hasOwnProperty(g)&&(++u,t=d(f[g]),g=d(g),n=e.inArray(g,r),i=s("!","exception_"+h+"_"+g),a="admin"===h?t+"="+g:"/"+t+"/"+g+"/",a='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+c.sites[0]+c.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(a)+'" title="'+p.replace("%s",a)+'" target="_blank"><span></span></a>',n<0?(r.push(g),o.prepend('<li><input id="'+i+'" value="'+g+'" type="checkbox" '+("admin"===h?"/>":"name=ip_geo_block_settings[exception]["+h+"]["+g+"] />")+'<label for="'+i+'">'+g+"</lable>"+a+"</li>")):(i=o.find("#"+i).parent()).find("a").length||i.append(a));e(s("@","exception_"+h)).trigger("change"),e(s("#","find-"+h)).append(' <span class="ip-geo-block-warn">'+d(l.msg[7].replace("%d",u))+"</span>")}),!1})}),e('input[id^="'+s("!","validation_ajax_")+'"]').on("change",function(){y(e(this))}).change(),e(s("@","validation_public")).on("change",function(t){return S(e(this)),k(t)}).change(),e(s("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(s("@","public_white_list")).closest("tr").toggle("0"===n),e(s("@","public_black_list")).closest("tr").toggle("1"===n),e(s("@","public_response_code")).change().closest("tr").toggle("-1"!==n),k(t)}).change(),e(s("@","public_behavior")).on("change",function(t){var n=e(this);return w(n.siblings("ul"),n.prop("checked")),k(t)}).change(),e(s("@","update")).on("click",function(){return v("download",{cmd:"download"},function(t){var n,i,a;for(n in t)if(t.hasOwnProperty(n))for(i in a=t[n])a.hasOwnProperty(i)&&(a[i=d(i)].filename&&e(s("@",n+"_"+i+"_path")).val(d(a[i].filename)),a[i].message&&e(s("#",n+"-"+i)).text(d(a[i].message)))}),!1}),e(s("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(s("@","save_statistics")).on("change",function(){return e(s("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(s("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(s("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(s("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),T("validate"),e(s("#","export")).on("click",function(){if(JSON===i)return g(),!1;var t=u,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=C(n[t]),e(s("#","export-data")).val(JSON.stringify(n)),e(s("#","export-form")).submit(),!1}),e(s("#","file-dialog")).on("change",function(e){if(t.FileReader===i)return g(),!1;var n,a=e.target.files[0];return a&&function(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){f("Error",e.target.error.code)},i.readAsText(e)}(a,function(e){(e=JSON.parse(e))[n=u+"[signature]"]!==i&&(e[n]=C(e[n])),v("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){A(e,!0)})}),!1}),e(s("#","import")).on("click",function(){return e(s("#","file-dialog")).click(),!1}),e(s("#","default")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-default"},function(e){A(e,!0)})}),!1}),e(s("#","preferred")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-preferred"},function(e){A(e,!1)})}),!1}),e(s("@","reset_live")).on("click",function(){return v("reset-live",{cmd:"reset-live"}),!1}),e(s("#","login-link")).on("click",function(){var t=e(this),n=s("$","primary");return t.hasClass(n)?v("login-loading",{cmd:"generate-link"},function(i){t.text(l.msg[3]),t.removeClass(n).nextAll(s(".","desc")).remove(),e('<p class="ip-geo-block-desc"></p>').appendTo(t.parent()).append(l.msg[4],'<a href="'+i.link+'" title="'+l.msg[1]+'" target=_blank>'+i.link+"</a></p>")}):h(l.msg[0],function(){v("login-loading",{cmd:"delete-link"},function(){t.text(l.msg[2]),t.addClass(n).nextAll(s(".","desc")).remove()})}),!1}),e(s("@","diag_tables")).on("click",function(){return h(l.msg[0],function(){var e;v(e="diag-tables",{cmd:e},function(e){m(e.page,e.tab)})}),!1}),e(s("#","show-info")).on("click",function(){e(s("#","wp-info")).empty(),v("wp-info",{cmd:"show-info"},function(t){var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push("- "+n+" "+t[n]);return e(s("#","wp-info")).html('<textarea class="regular-text code" rows="'+i.length+'">'+i.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+u+'"]').on("change",function(){var t,n,i,a=e(this);return t=a,i=s(".","desc"),t.next(i).empty(),(n=t.children("option:selected").data("desc"))&&t.next(i).html(e.parseHTML(n)),x(a,a,u),!1}).change(),e(s(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),i=n.find(s("@","exception_admin")),a=n.find("input:checkbox").filter(":visible"),o=a.filter(":checked").length;return a.prop("checked",!o),i.length&&(o?i.val(""):(t=[],a.each(function(n,i){t.push(e(i).val())}),i.val(t.join(",")))),e(this).blur(),!1}),e(s(".","settings-folding>dfn")).on("click",function(){var t=s("drop"),n=e(this).parent();return n.children(s(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(s("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(C(n)),!0});break;case 1:N(o);var p=0;e(s("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");(p=!p)?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return Number(e(t).text().replace(/^.*\((\d+)\)$/,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)$/,"$1"))}),t.children("li").remove(),n.appendTo(t)}),e(s("@","clear_statistics")).on("click",function(){return h(l.msg[0],function(){b("statistics",null)}),!1}),e(s("@","clear_logs")).on("click",function(){return h(l.msg[0],function(){b("logs",null)}),!1}),R(o,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[6]},{title:l.i18n[7]},{title:l.i18n[8]},{title:l.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]},r),T("export-cache"),e(s("#","export-cache")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 4:var _={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},I={columns:[{title:'<input type="checkbox">'},{title:""},{title:l.i18n[10]},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[7]},{title:l.i18n[11]},{title:l.i18n[12]},{title:l.i18n[13]},{title:l.i18n[14]},{title:l.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},M=null,z=null,E=e(s("#","live-loading")),$=null,J=function(e){M&&(t.clearTimeout(M),M=null),z&&(E.removeClass(s("live-timer")),t.clearTimeout(z),z=null),v(e===i?"live-loading":null,{cmd:"live-start"},function(n){if(n.error)f(null,n.error);else if(n.data.length){var a,o=n.data.length;for(a=0;a<o;a++)$.row.add(n.data[a]);$.draw(!1)}e===i&&(M=t.setTimeout(J,1e3*l.interval))})},B=function(e,t){J(!1),v(null,{cmd:e||"live-stop",callback:t})},q=s(""),H=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(q+i+"blocked"):e(t).addClass(q+i+"passed")},V=e(s("#","live-log")),G=e(s("#","live-update"));e(s("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+q+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(q+"passed").removeClass(q+"new-passed"):t.addClass(q+"blocked").removeClass(q+"new-blocked")}),!1}),V.on("change",function(){switch(e('input[name="'+s("live-log")+'"]:checked').val()){case"start":J();break;case"pause":B("live-pause",function(){E.addClass(s("live-timer")),z=t.setTimeout(function(){e(s("#","live-log-stop")).prop("checked",!0),B()},1e3*l.timeout)});break;case"stop":B()}}),G.on("change",function(){var t=V.closest("tr"),n=G.prop("checked");return r[o][1]=n?"o":"x",D(r),$&&$.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),_.ajaxCMD="live-stop",I.order=[1,"desc"],I.createdRow=function(e,t){H(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),_.ajaxCMD="restore-logs",I.order=[0,""],I.createdRow=function(e,t){H(e,t,"")}),e(s("#","live-log-stop")).trigger("click"),$=R(o,_,I,r),!1}).trigger("change"),e(s("#","logs-preset")).on("click","a",function(){var t=e(this).data("value");return e(s("@","search_filter")).val(t),$.search(t,!1,!0,!/[A-Z]/.test(t)).draw(),!1}),T("export-logs"),e(s("#","export-logs")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 2:e(t).on(s("gmap-error"),function(){v(null,{cmd:"gmap-error"},function(e){m(e.page,e.tab)})});var U=e(s("#","map"));"object"==typeof t.google?U.each(function(){e(this).GmapRS()}):U.each(function(){e(this).empty().html('<iframe src="'+l.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});I=[];e('select[id^="'+s("!","service")+'"]').on("change",function(){e(this).children("option").each(function(t,n){I[e(n).text()]=t,r[o][3+t]=e(n).prop("selected")?"o":"x"}),"o"!==r[o][3+(Number(r[o][2])||0)]&&(r[o][2]=e(this).prop("selectedIndex")),D(r)}).change(),e(s("@","get_location")).on("click",function(){var n,i=e(s("#","whois")),a=e(s("#","apis")),c=e(s("@","service")).val(),u=e.trim(e(s("@","ip_address")).val());if(u&&c){if(e(s("@","anonymize")).prop("checked")){if(/[^0-9a-f\.:]/.test(u))return f(null,"illegal format."),!1;-1!==u.indexOf(".")?u=u.replace(/\.\w+$/,".0"):(-1===(u=(u=u.split(":")).splice(0,4).join(":")).indexOf("::")&&(u+="::"),u=u.replace(/:{3,}/,"::")),e(s("@","ip_address")).val(u)}i.hide().empty(),a.hide().empty(),n=e.whois(u,function(t){var n,a="";for(n=0;n<t.length;++n)a+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";i.html('<fieldset id="'+s("section-1")+'" class="'+s("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+s("whois-title")+'" class="'+s("dropdown")+'">Whois</h3></legend><div class="panel-body '+s("border")+'"><table class="'+s("table")+'">'+a+"</table></div></fieldset>").fadeIn("slow"),"x"===r[o][1]&&e(s("#","whois-title")).trigger("click")}),v("loading",{cmd:"search",ip:u,which:c},function(n){var i,c="",p=Number(r[o][2])||0;for(i in n)n.hasOwnProperty(i)&&(c+='<a href="#!" class="nav-tab'+(I[i]===p?" nav-tab-active":"")+'" data-index="'+I[i]+"\" data-api='"+d(JSON.stringify(n[i]))+"'>"+i+"</a>");a.html('<div class="nav-tab-wrapper">'+c+'</div><div id="ip-geo-block-geoinfo"></div>').fadeIn("slow").on("click","a",function(){var n,i=e(this),a=e(this).data("api"),c="",p=d(a.latitude||"0"),h=d(a.longitude||"0"),f=a.latitude||a.longitude?7:2;for(n in i.parent().children("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),r[o][2]=i.data("index"),D(r),a)a.hasOwnProperty(n)&&(n=d(n),c+='<li><span class="'+s("title")+'">'+n+' : </span><span class="'+s("result")+'">'+d(a[n])+"</span></li>");"object"==typeof t.google?U.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+c+"</ul>",show:!0,zoom:f}):(U.empty().html('<iframe src="'+l.altgmap+"?q="+p+","+h+"&z="+f+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'),e(s("#","geoinfo")).html("<ul>"+c+"</ul>"))}).find(".nav-tab-active").trigger("click")},[n])}return!1}),e(s("@","ip_address")).on("keypress",function(t){if(t.which&&13===t.which||t.keyCode&&13===t.keyCode)return e(s("@","get_location")).click(),!1}),e(s("@","ip_address")).val()&&e(s("@","get_location")).click();break;case 5:N(o),e("input[name="+s("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();r[o][2]=e(this).val()||0,r[o][3]=r[o][3]||2,r[o][4]=r[o][4]||1,D(r),O.ajaxStacked(r[o][2],r[o][3],r[o][4],t-1)}),e(s("#","open-new")).on("change",function(){var t=e(this).prop("checked");r[o][1]=t?"o":"x",D(r),e(s("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(s("#","apply-layout")).on("click",function(){var t=e(s("#","select-layout"));r[o][3]=t.find('select[name="rows"] option:selected').val(),r[o][4]=t.find('select[name="cols"] option:selected').val(),D(r)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ !function(e,t,n,i){var a=!1,o=[],r=e(t).width(),l=IP_GEO_BLOCK,c=IP_GEO_BLOCK_AUTH;function s(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return t!==i?n[e]+t:n.$+e}function d(e){return e?function(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}).replace(/&amp;(#\d{2,4}|\w{4,7});/g,"&$1;")}(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function u(n,a){var l=e(t).width();l!==r&&(r=l,o[n]===i&&(o[n]={id:!1,callback:a}),e(t).off("resize").on("resize",function(){return!1!==o[n].id&&t.clearTimeout(o[n].id),o[n].time=t.setTimeout(o[n].callback,200),!1}))}function p(t,n){n?e(s("#",t)).addClass(s("loading")):e(s("#",t)).removeClass(s("loading"))}function h(e,n){t.confirm(d(e))&&n()}function f(e,n,i){t.alert(d(n||l.msg[11].replace("%s",i)+" ("+e+")"))}function g(){f(null,d(l.msg[9]))}function m(e,n){-1!==t.location.href.indexOf(e)&&(t.location=d(e)+(n?"&"+d(n):"")+"&"+(c.key?c.key+"="+c.nonce:""))}function v(t,n,i,o){t&&p(t,!0),n.action=l.action,n.nonce=l.nonce,e.ajax({type:"POST",url:l.url,data:n,dataType:"json"}).done(function(e){i&&i(e)}).fail(function(e){a||f(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof o?e.when.apply(e,o).then(function(){p(t,!1)}):p(t,!1))})}function b(e,t){v(e,{cmd:"clear-"+e,which:t},function(e){m(e.page,e.tab)})}function k(e){return e.stopImmediatePropagation(),!1}function w(e,t){t?e.removeClass("folding-disable"):(e.children(s(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(s("dropdown")).addClass(s("dropup")))}function x(t,n,i){var a=t.prop("type")||"",o=0===a.indexOf("checkbox")&&t.is(":checked")||0===a.indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+s("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(s(".","settings-folding")).each(function(n,a){w(e(a),o&&i[t])})}):n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),o&&i)})}function y(t){var n=s("@","validation_ajax_");w(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function _(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function C(e){return function(e){return t.btoa(e)}(_(e))}function P(e){return _(function(e){return t.atob(e)}(e))}function S(t){var n=t.is(":checked"),i=e(s("@","public_target_rule")),a=e(s("@","public_behavior")),o=t.closest("tr").nextAll("tr");o.find('[name^="'+s("%","settings")+'"]').prop("disabled",!n),o.find(s(".","desc")).css("opacity",n?1:.5),x(t,[i,a],["1"===i.val(),a.val()]),n&&a.change()}function A(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(s("#","import")).closest("form").deserialize(t),e(s("@","exception_admin")+","+s("@","validation_mimetype")).change(),e('select[name*="'+s("%","settings")+'"]').change(),e(s("@","validation_login")).change(),S(e(s("@","validation_public"))),y(e(s("@","validation_ajax_1"))),n&&(n=s("%","settings[providers][IPInfoDB]"),e(s("@","providers_IPInfoDB")).prop("checked",!!t[n])))}e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=d(decodeURIComponent(n)),a=d(decodeURIComponent(t[n])),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(e){}e.each(r,function(t,i){"hidden"!==(n=e('[name="'+t+'"]:input',o).val(i)).attr("type")&&n.before('<span style="color:red">*</span>')})})};var O={dataPie:[],viewPie:[],drawPie:function(a){var o,r;O.dataPie[a]===i&&((o=O.dataPie[a]=new t.google.visualization.DataTable).addColumn("string","Country"),o.addColumn("number","Requests"),r=e.parseJSON(e("#"+a).attr("data-"+a)),O.dataPie[a].addRows(r)),O.viewPie[a]===i&&(O.viewPie[a]=new t.google.visualization.PieChart(n.getElementById(a))),O.dataPie[a]!==i&&O.viewPie[a]!==i&&0<(o=e("#"+a).width())&&O.viewPie[a].draw(O.dataPie[a],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(a,o){var r,l,c;if(O.dataLine[a]===i){for((r=O.dataLine[a]=new t.google.visualization.DataTable).addColumn(o,"Date"),r.addColumn("number","comment"),r.addColumn("number","xmlrpc"),r.addColumn("number","login"),r.addColumn("number","admin"),r.addColumn("number","public"),l=(c=e.parseJSON(e("#"+a).attr("data-"+a))).length,r=0;r<l;++r)c[r][0]=new Date(1e3*c[r][0]);O.dataLine[a].addRows(c)}O.viewLine[a]===i&&(O.viewLine[a]=new t.google.visualization.LineChart(n.getElementById(a))),O.dataLine[a]!==i&&O.viewLine[a]!==i&&0<(r=e("#"+a).width())&&O.viewLine[a].draw(O.dataLine[a],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===o?" HH:mm":"")},vAxis:{textPosition:r>320?"out":"in"},chartArea:{left:r>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(a){var o,r,l,c,u=e("#"+d(a));O.dataStacked[a]===i&&(l=e.parseJSON(u.attr("data-"+a)))&&(l.unshift(["site","comment","xmlrpc","login","admin","public",{role:"link"}]),O.dataStacked[a]=t.google.visualization.arrayToDataTable(l)),O.viewStacked[a]===i&&(O.viewStacked[a]=new t.google.visualization.BarChart(n.getElementById(a)),t.google.visualization.events.addListener(O.viewStacked[a],"animationfinish",function(){var t,i,o,r=[],l=O.dataStacked[a],c=l.getNumberOfRows(),d=e(s("#","open-new")).prop("checked");for(t=0;t<c;t++)r.push({label:l.getValue(t,0),link:l.getValue(t,6)});c="http://www.w3.org/1999/xlink",u.find("text").each(function(e,t){"g"===(o=t.parentNode).tagName.toLowerCase()&&-1!==(e=function(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;n<i;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}(t.textContent,r))&&((i=n.createElementNS("http://www.w3.org/2000/svg","a")).setAttributeNS(c,"xlink:href",r[e].link),i.setAttributeNS(c,"title",r[e].label),i.setAttribute("target",d?"_blank":"_self"),i.setAttribute("class","site"),i.appendChild(o.removeChild(t)),o.appendChild(i),r.splice(e,1))})})),0<(r=u.width())&&O.dataStacked[a]!==i&&O.viewStacked[a]!==i&&(o=s("range"),c=e.parseJSON(e("."+o).attr("data-"+o)),o=40*(l=O.dataStacked[a]).getNumberOfRows(),O.viewStacked[a].draw(l,{width:r,height:o+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:o},hAxis:{minValue:0,maxValue:c[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,a,o){v(null,{cmd:"restore-network",which:t=Math.max(0,Math.min(4,t)),offset:(n=5*Math.max(1,Math.min(5,n)))*a*o,length:n},function(t){var a,o,r,l,c;t=function(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;n<a;++n)i=n*t,o.push(e.slice(i,i+t));return o}(t,n),e(s(".","network")).each(function(s,d){if(t[s]!==i){for(l=e(d).attr("id"),c=O.dataStacked[l],r=Math.min(n,t[s].length),a=0;a<r;++a)for(o=1;o<=5;o++)c.setValue(a,o,t[s][a][o]);O.drawStacked(l)}})})}};function I(n){"object"==typeof t.google&&(1===n?e(s("#","chart-countries")).length&&(O.drawPie(s("chart-countries")),O.drawLine(s("chart-daily"),"date")):5===n&&e(s(".","network")).each(function(t,n){O.drawStacked(e(n).attr("id"))}))}function N(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.charts.load("current",{packages:n,callback:function(){I(e)}}),u("draw-chart."+e,function(){I(e)})}}function D(n){var a,o,r=[];e.each(n,function(e,t){if(r[e]="",t!==i&&(o=t.length))for(r[e]=(t[0]||"o").toString(),a=1;a<o;++a)r[e]+=(t[a]||"o").toString()}),wpCookies!==i&&wpCookies.setHash("ip-geo-block",r,new Date(Date.now()+2592e6),t.location.pathname.replace(/\\/g,"/").match(/.*\//)||c.home+c.admin)}function j(t){var a=function(e){var t,n=wpCookies!==i&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/gi,"").split(""));return n[e]===i&&(n[e]=[]),n}(t);return e(n).on("click","form>h2,h3",function(){return function(e,t,n){var i,a=e.closest("fieldset").data("section"),o=e.parent().nextAll(".panel-body").toggle();e.toggleClass(s("dropup")).toggleClass(s("dropdown")),(i=e.hasClass(s("dropdown")))?o.addClass(s("border")).trigger(s("show-body")):o.removeClass(s("border")),n[t][a]=i?"o":"x",D(n),I(t)}(e(this),t,a),!1}),e(s("#","toggle-sections")).on("click",function(){var n,i=e(s(".","field")).find("h2,h3"),o=[s("dropdown"),s("dropup")],r=i.filter("."+o[0]).length;return i.each(function(i){(n=e(this)).removeClass(o.join(" ")).addClass(r?o[1]:o[0]),n=n.parent().nextAll(".panel-body").toggle(!r),r?n.removeClass(s("border")):n.addClass(s("border")).trigger("show-body"),a[t][i]=r?"x":"o"}),D(a),I(t),!1}),a}function T(t){e("body").append('<div style="display:none"><form method="POST" id="'+s("export-form")+'" action="'+l.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+l.action+'" /><input type="hidden" name="nonce" value="'+l.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+s("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+s("file-dialog")+'" /></div>')}function L(e,t,n,i){var a,o;return(a=e.cloneNode(!1)).setAttribute("title",d(n)),(o=t.cloneNode(!1)).setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function R(n,a,o,r){var c=Number(r[n][1===n?3:2])||0;c=[10,25,50,100][c],e.extend(!0,e.fn.dataTable.defaults,o,{dom:"tlp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,language:{emptyTable:l.i18n[1],loadingRecords:l.i18n[0],processing:l.i18n[0],zeroRecords:l.i18n[2],lengthMenu:"_MENU_",paginate:{first:"&laquo;",last:"&raquo;",next:"&rsaquo;",previous:"&lsaquo;"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",lengthMenu:[10,25,50,100],pageLength:c,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(s("#",a.tableID)).find("td.dataTables_empty"),i="restore-logs"===a.ajaxCMD?3:2;i>t.iDraw?n.html(l.i18n[0]):i===t.iDraw&&(n.html(l.i18n[1]),(n=e(s("@","search_filter"))).val()&&n.trigger("keyup"))}});var d=e(s("#",a.tableID)).DataTable({ajax:{url:l.url,type:"POST",data:{cmd:a.ajaxCMD,action:l.action,nonce:l.nonce}},mark:!0}),p=function(){d.columns.adjust().responsive.recalc().draw(!1)};return u("draw-table."+n,p),e(s("#",a.sectionID)).find(".panel-body").off(s("show-body")).on(s("show-body"),function(){return p(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(s("#",a.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(s("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+s("target")+'"]:checked').val();return d.columns(a.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(s("#","bulk-action")).off("click").on("click",function(){var t,o,r=e(this).prev().val(),c=/(<([^>]+)>)/gi,u=/data-hash=[\W]([\w]+)[\W]/i,p={IP:[],AS:[]},h=d.$("input:checked");return!!r&&(h.length?(h.each(function(){o=d.cell(this.parentNode).data(),t=("bulk-action-remove"===r||"bulk-action-ip-erase"===r)&&(t=o[a.columnIP].match(u))?","+t[1]:"",p.IP.push(o[a.columnIP].replace(c,"")+t),p.AS.push(o[a.columnAS].replace(c,""))}),p.IP.length&&v("loading",{cmd:r,which:p},function(t){t.page!==i?m(t.page,"tab="+n):t&&(d.ajax.reload(),e(s("#",a.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(f(null,l.msg[10]),!1))}),e(s("@","search_filter")).off("keyup").on("keyup",function(){return d.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(s("#","reset-filter")).off("click").on("click",function(){return e(s("@","search_filter")).val(""),d.search("").draw(),!1}),e(s("@","clear_all")).off("click").on("click",function(){return h(l.msg[0],function(){b(1===n?"cache":"logs",null)}),!1}),e("table"+s(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;i<r;++i)l[(a=o[i].split("="))[0]]=a[1];for(i in l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[],l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),e(s("#",a.tableID)).on("length.dt",function(e,t,i){r[n][1===n?3:2]={10:0,25:1,50:2,100:3}[i]||0,D(r)}),d}e(function(){var o=Number(l.tab)||0,r=j(o);switch(e(s(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){a=!0}),o){case 0:var u=s("%","settings");e('[id^="'+s("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),i=t.parent();return v(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(s("scan-"),"")},function(e){var t,n;for(t in i.children("ul").length||i.append('<ul id="'+s("code-list")+'"></ul>'),i=i.children("ul").empty(),e)e.hasOwnProperty(t)&&("string"==typeof e[t=d(t)]?n=d(e[t]):(n=d(e[t].code),t='<abbr title="'+d(e[t].type)+'">'+t+"</abbr>"),i.append("<li>"+t+' : <span class="'+s("notice")+'">'+n+"</span></li>"));i.show("slow")}),!1}),e(s("@","matching_rule")).on("change",function(){var t=this.value;return e(s("@","white_list")).closest("tr").toggle("0"===t),e(s("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(s(".","icon-cidr")).on("click",function(){var n=e(s("#","admin-styles-css")).get(0).href,i=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),i.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=&rarr; class="col span_24" tabindex=3><li class=row><input id=f type=button value=&larr; class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"><\/script>'),i.document.close(),!1}),e(s("@","validation_mimetype")).on("change",function(t){var n=e(this),i=Number(n.val());return n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),i===t+1||i&&2===t)}),k(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),i=parseInt(n.val()/100,10),a=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===Number(e(s("@","public_matching_rule")).val())?(a.each(function(t){1>=t&&e(this).hide()}),k(t)):(i<=3?a.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):a.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),k(t))}).change(),e(s("#","decode")).on("click",function(){var t=e(s("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(P(n)):t.val(C(n)),!1}),e(s("@","validation_login")).on("change",function(t){var n=e(this);return x(n,n,u),k(t)}).change(),v(null,{cmd:"get-actions"},function(t){var i,a,o,r,u=e(s("#","list-admin")),p=n.createElement("li"),h=n.createElement("input"),f=n.createElement("label"),g=n.createElement("dfn"),m=n.createElement("span");for(r in t)t.hasOwnProperty(r)&&(r=d(r),u.find("#"+(o=s("!","exception_admin_"+r))).size()||((i=h.cloneNode(!1)).setAttribute("id",o),i.setAttribute("value",r),i.setAttribute("type","checkbox"),(a=p.cloneNode(!1)).appendChild(i),(i=f.cloneNode(!1)).setAttribute("for",o),i.appendChild(n.createTextNode(r)),a.appendChild(i),1&t[r]&&a.appendChild(L(g,m,l.msg[5],"lock")),2&t[r]&&a.appendChild(L(g,m,l.msg[6],"unlock")),u.append(a)));e(s(".","icon-unlock")).on("click",function(){return e(s("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(s("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(s("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),k(t)}).change(),e(s("#","list-admin")).on("click","input",function(){var t,n=e(this),i=e(s("@","exception_admin")),a=n.val(),o=e.grep(i.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});-1===(t=e.inArray(a,o))?o.push(a):o.splice(t,1),i.val(o.join(",")).change()}),e(s(".","icon-find")).on("click",function(){var t,n,i,a,o=e(this),r=[],u=0,p=d(l.msg[8]),h=d(o.data("target"));return e(s("#","find-"+h)).empty(),o.next().children(s(".","find-desc")).show(),(o=e(s("#","list-"+h))).children("li").each(function(t,n){r.push(e(n).find("input").val())}),v("find-"+h,{cmd:"find-"+h},function(f){var g;for(g in f)f.hasOwnProperty(g)&&(++u,t=d(f[g]),g=d(g),n=e.inArray(g,r),i=s("!","exception_"+h+"_"+g),a="admin"===h?t+" "+g:"/"+t+"/"+g+"/",a='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+c.sites[0]+c.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(a)+'" title="'+p.replace("%s",a)+'" target="_blank"><span></span></a>',n<0?(r.push(g),o.prepend('<li><input id="'+i+'" value="'+g+'" type="checkbox" '+("admin"===h?"/>":"name=ip_geo_block_settings[exception]["+h+"]["+g+"] />")+'<label for="'+i+'">'+g+"</lable>"+a+"</li>")):(i=o.find("#"+i).parent()).find("a").length||i.append(a));e(s("@","exception_"+h)).trigger("change"),e(s("#","find-"+h)).append(' <span class="ip-geo-block-warn">'+d(l.msg[7].replace("%d",u))+"</span>")}),!1})}),e('input[id^="'+s("!","validation_ajax_")+'"]').on("change",function(){y(e(this))}).change(),e(s("@","validation_public")).on("change",function(t){return S(e(this)),k(t)}).change(),e(s("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(s("@","public_white_list")).closest("tr").toggle("0"===n),e(s("@","public_black_list")).closest("tr").toggle("1"===n),e(s("@","public_response_code")).change().closest("tr").toggle("-1"!==n),k(t)}).change(),e(s("@","public_behavior")).on("change",function(t){var n=e(this);return w(n.siblings("ul"),n.prop("checked")),k(t)}).change(),e(s("@","update")).on("click",function(){return v("download",{cmd:"download"},function(t){var n,i,a;for(n in t)if(t.hasOwnProperty(n))for(i in a=t[n])a.hasOwnProperty(i)&&(a[i=d(i)].filename&&e(s("@",n+"_"+i+"_path")).val(d(a[i].filename)),a[i].message&&e(s("#",n+"-"+i)).text(d(a[i].message)))}),!1}),e(s("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(s("@","save_statistics")).on("change",function(){return e(s("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(s("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(s("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(s("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),T("validate"),e(s("#","export")).on("click",function(){if(JSON===i)return g(),!1;var t=u,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=C(n[t]),e(s("#","export-data")).val(JSON.stringify(n)),e(s("#","export-form")).submit(),!1}),e(s("#","file-dialog")).on("change",function(e){if(t.FileReader===i)return g(),!1;var n,a=e.target.files[0];return a&&function(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){f("Error",e.target.error.code)},i.readAsText(e)}(a,function(e){(e=JSON.parse(e))[n=u+"[signature]"]!==i&&(e[n]=C(e[n])),v("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){A(e,!0)})}),!1}),e(s("#","import")).on("click",function(){return e(s("#","file-dialog")).click(),!1}),e(s("#","default")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-default"},function(e){A(e,!0)})}),!1}),e(s("#","preferred")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-preferred"},function(e){A(e,!1)})}),!1}),e(s("@","reset_live")).on("click",function(){return v("reset-live",{cmd:"reset-live"}),!1}),e(s("#","login-link")).on("click",function(){var t=e(this),n=s("$","primary");return t.hasClass(n)?v("login-loading",{cmd:"generate-link"},function(i){t.text(l.msg[3]),t.removeClass(n).nextAll(s(".","desc")).remove(),e('<p class="ip-geo-block-desc"></p>').appendTo(t.parent()).append(l.msg[4],'<a href="'+i.link+'" title="'+l.msg[1]+'" target=_blank>'+i.link+"</a></p>")}):h(l.msg[0],function(){v("login-loading",{cmd:"delete-link"},function(){t.text(l.msg[2]),t.addClass(n).nextAll(s(".","desc")).remove()})}),!1}),e(s("@","diag_tables")).on("click",function(){return h(l.msg[0],function(){var e;v(e="diag-tables",{cmd:e},function(e){m(e.page,e.tab)})}),!1}),e(s("#","show-info")).on("click",function(){e(s("#","wp-info")).empty(),v("wp-info",{cmd:"show-info"},function(t){var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push("- "+n+" "+t[n]);return e(s("#","wp-info")).html('<textarea class="regular-text code" rows="'+i.length+'">'+i.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+u+'"]').on("change",function(){var t,n,i,a=e(this);return t=a,i=s(".","desc"),t.next(i).empty(),(n=t.children("option:selected").data("desc"))&&t.next(i).html(e.parseHTML(n)),x(a,a,u),!1}).change(),e(s(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),i=n.find(s("@","exception_admin")),a=n.find("input:checkbox").filter(":visible"),o=a.filter(":checked").length;return a.prop("checked",!o),i.length&&(o?i.val(""):(t=[],a.each(function(n,i){t.push(e(i).val())}),i.val(t.join(",")))),e(this).blur(),!1}),e(s(".","settings-folding>dfn")).on("click",function(){var t=s("drop"),n=e(this).parent();return n.children(s(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(s("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(C(n)),!0});break;case 1:N(o);var p=0;e(s("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");(p=!p)?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return Number(e(t).text().replace(/^.*\((\d+)\)$/,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)$/,"$1"))}),t.children("li").remove(),n.appendTo(t)}),e(s("@","clear_statistics")).on("click",function(){return h(l.msg[0],function(){b("statistics",null)}),!1}),e(s("@","clear_logs")).on("click",function(){return h(l.msg[0],function(){b("logs",null)}),!1}),R(o,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[6]},{title:l.i18n[7]},{title:l.i18n[8]},{title:l.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]},r),T("export-cache"),e(s("#","export-cache")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 4:var _={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},I={columns:[{title:'<input type="checkbox">'},{title:""},{title:l.i18n[10]},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[7]},{title:l.i18n[11]},{title:l.i18n[12]},{title:l.i18n[13]},{title:l.i18n[14]},{title:l.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},M=null,z=null,E=e(s("#","live-loading")),$=null,J=function(e){M&&(t.clearTimeout(M),M=null),z&&(E.removeClass(s("live-timer")),t.clearTimeout(z),z=null),v(e===i?"live-loading":null,{cmd:"live-start"},function(n){if(n.error)f(null,n.error);else if(n.data.length){var a,o=n.data.length;for(a=0;a<o;a++)$.row.add(n.data[a]);$.draw(!1)}e===i&&(M=t.setTimeout(J,1e3*l.interval))})},B=function(e,t){J(!1),v(null,{cmd:e||"live-stop",callback:t})},q=s(""),H=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(q+i+"blocked"):e(t).addClass(q+i+"passed")},V=e(s("#","live-log")),G=e(s("#","live-update"));e(s("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+q+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(q+"passed").removeClass(q+"new-passed"):t.addClass(q+"blocked").removeClass(q+"new-blocked")}),!1}),V.on("change",function(){switch(e('input[name="'+s("live-log")+'"]:checked').val()){case"start":J();break;case"pause":B("live-pause",function(){E.addClass(s("live-timer")),z=t.setTimeout(function(){e(s("#","live-log-stop")).prop("checked",!0),B()},1e3*l.timeout)});break;case"stop":B()}}),G.on("change",function(){var t=V.closest("tr"),n=G.prop("checked");return r[o][1]=n?"o":"x",D(r),$&&$.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),_.ajaxCMD="live-stop",I.order=[1,"desc"],I.createdRow=function(e,t){H(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),_.ajaxCMD="restore-logs",I.order=[0,""],I.createdRow=function(e,t){H(e,t,"")}),e(s("#","live-log-stop")).trigger("click"),$=R(o,_,I,r),!1}).trigger("change"),e(s("#","logs-preset")).on("click","a",function(){var t=e(this).data("value");return e(s("@","search_filter")).val(t),$.search(t,!1,!0,!/[A-Z]/.test(t)).draw(),!1}),T("export-logs"),e(s("#","export-logs")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 2:e(t).on(s("gmap-error"),function(){v(null,{cmd:"gmap-error"},function(e){m(e.page,e.tab)})});var U=e(s("#","map"));"object"==typeof t.google?U.each(function(){e(this).GmapRS()}):U.each(function(){e(this).empty().html('<iframe src="'+l.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});I=[];e('select[id^="'+s("!","service")+'"]').on("change",function(){e(this).children("option").each(function(t,n){I[e(n).text()]=t,r[o][3+t]=e(n).prop("selected")?"o":"x"}),"o"!==r[o][3+(Number(r[o][2])||0)]&&(r[o][2]=e(this).prop("selectedIndex")),D(r)}).change(),e(s("@","get_location")).on("click",function(){var n,i=e(s("#","whois")),a=e(s("#","apis")),c=e(s("@","service")).val(),u=e.trim(e(s("@","ip_address")).val());if(u&&c){if(e(s("@","anonymize")).prop("checked")){if(/[^0-9a-f\.:]/.test(u))return f(null,"illegal format."),!1;-1!==u.indexOf(".")?u=u.replace(/\.\w+$/,".0"):(-1===(u=(u=u.split(":")).splice(0,4).join(":")).indexOf("::")&&(u+="::"),u=u.replace(/:{3,}/,"::")),e(s("@","ip_address")).val(u)}i.hide().empty(),a.hide().empty(),n=e.whois(u,function(t){var n,a="";for(n=0;n<t.length;++n)a+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";i.html('<fieldset id="'+s("section-1")+'" class="'+s("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+s("whois-title")+'" class="'+s("dropdown")+'">Whois</h3></legend><div class="panel-body '+s("border")+'"><table class="'+s("table")+'">'+a+"</table></div></fieldset>").fadeIn("slow"),"x"===r[o][1]&&e(s("#","whois-title")).trigger("click")}),v("loading",{cmd:"search",ip:u,which:c},function(n){var i,c="",p=Number(r[o][2])||0;for(i in n)n.hasOwnProperty(i)&&(c+='<a href="#!" class="nav-tab'+(I[i]===p?" nav-tab-active":"")+'" data-index="'+I[i]+"\" data-api='"+d(JSON.stringify(n[i]))+"'>"+i+"</a>");a.html('<div class="nav-tab-wrapper">'+c+'</div><div id="ip-geo-block-geoinfo"></div>').fadeIn("slow").on("click","a",function(){var n,i=e(this),a=e(this).data("api"),c="",p=d(a.latitude||"0"),h=d(a.longitude||"0"),f=a.latitude||a.longitude?7:2;for(n in i.parent().children("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),r[o][2]=i.data("index"),D(r),a)a.hasOwnProperty(n)&&(n=d(n),c+='<li><span class="'+s("title")+'">'+n+' : </span><span class="'+s("result")+'">'+d(a[n])+"</span></li>");"object"==typeof t.google?U.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+c+"</ul>",show:!0,zoom:f}):(U.empty().html('<iframe src="'+l.altgmap+"?q="+p+","+h+"&z="+f+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'),e(s("#","geoinfo")).html("<ul>"+c+"</ul>"))}).find(".nav-tab-active").trigger("click")},[n])}return!1}),e(s("@","ip_address")).on("keypress",function(t){if(t.which&&13===t.which||t.keyCode&&13===t.keyCode)return e(s("@","get_location")).click(),!1}),e(s("@","ip_address")).val()&&e(s("@","get_location")).click();break;case 5:N(o),e("input[name="+s("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();r[o][2]=e(this).val()||0,r[o][3]=r[o][3]||2,r[o][4]=r[o][4]||1,D(r),O.ajaxStacked(r[o][2],r[o][3],r[o][4],t-1)}),e(s("#","open-new")).on("change",function(){var t=e(this).prop("checked");r[o][1]=t?"o":"x",D(r),e(s("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(s("#","apply-layout")).on("click",function(){var t=e(s("#","select-layout"));r[o][3]=t.find('select[name="rows"] option:selected').val(),r[o][4]=t.find('select[name="cols"] option:selected').val(),D(r)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
admin/js/authenticate.js CHANGED
@@ -16,6 +16,7 @@
16
  '^(?:' + (auth.home || '') + auth.admin
17
  + '|' + (auth.home || '') + auth.plugins
18
  + '|' + (auth.home || '') + auth.themes
 
19
  + ')(?:.*\\.php|.*\\/)?$'
20
  ),
21
 
@@ -233,6 +234,7 @@
233
  } catch (e) {
234
  url = '';
235
  }
 
236
  var uri = parse_uri(url.toLowerCase());
237
 
238
  // possibly scheme is `javascript` and path is `void(0);`
16
  '^(?:' + (auth.home || '') + auth.admin
17
  + '|' + (auth.home || '') + auth.plugins
18
  + '|' + (auth.home || '') + auth.themes
19
+ + '|' + (auth.admin ) // when site url is different from home url
20
  + ')(?:.*\\.php|.*\\/)?$'
21
  ),
22
 
234
  } catch (e) {
235
  url = '';
236
  }
237
+
238
  var uri = parse_uri(url.toLowerCase());
239
 
240
  // possibly scheme is `javascript` and path is `void(0);`
admin/js/authenticate.min.js CHANGED
@@ -3,7 +3,7 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- !function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,regexp:new RegExp(r.key+"(?:=|%3D)\\w+")},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+")(?:.*\\.php|.*\\/)?$"),i=function(e){for(var t=e.length,n="request%5Bbrowse%5D="+r.key;t-- >0;)if(-1!==e[t].indexOf(n)){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length,n="query%5B"+r.key+"%5D=";t-- >0;)if(-1!==e[t].indexOf(n)){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function s(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var c,p=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,s=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(s=e;s.head.firstChild;)s.head.removeChild(s.head.firstChild);(a=s.createElement("base")).setAttribute("href",o),s.head.appendChild(a)}(i=s.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function l(e,n){"object"!=typeof e&&(e=s(e||t.location.href));for(var o=e.query?e.query.split("&"):[],a=o.length,i=r.key+"=";a-- >0;)if(0===o[a].indexOf(i)){o.splice(a,1);break}return o.push(r.key+"="+encodeURIComponent(n)),e.query=o.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=s(e.toLowerCase());if(f(n)){if((n=p(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
7
  /*
8
  * jQuery.bind-first library v0.2.3 (jquery >= 1.7)
9
  * Copyright (c) 2013 Vladimir Zhuravlev
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ !function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,regexp:new RegExp(r.key+"(?:=|%3D)\\w+")},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+"|"+r.admin+")(?:.*\\.php|.*\\/)?$"),i=function(e){for(var t=e.length,n="request%5Bbrowse%5D="+r.key;t-- >0;)if(-1!==e[t].indexOf(n)){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length,n="query%5B"+r.key+"%5D=";t-- >0;)if(-1!==e[t].indexOf(n)){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function s(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var c,p=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,s=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(s=e;s.head.firstChild;)s.head.removeChild(s.head.firstChild);(a=s.createElement("base")).setAttribute("href",o),s.head.appendChild(a)}(i=s.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function l(e,n){"object"!=typeof e&&(e=s(e||t.location.href));for(var o=e.query?e.query.split("&"):[],a=o.length,i=r.key+"=";a-- >0;)if(0===o[a].indexOf(i)){o.splice(a,1);break}return o.push(r.key+"="+encodeURIComponent(n)),e.query=o.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=s(e.toLowerCase());if(f(n)){if((n=p(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
7
  /*
8
  * jQuery.bind-first library v0.2.3 (jquery >= 1.7)
9
  * Copyright (c) 2013 Vladimir Zhuravlev
classes/class-ip-geo-block-load.php CHANGED
@@ -140,7 +140,7 @@ class IP_Geo_Block_Loader {
140
  * This part will be executed at the very beginning of WordPress core.
141
  * Execute callbacks that are specified by the component with 'init'.
142
  */
143
- else if ( defined( 'WP_ADMIN' ) && WP_ADMIN ) {
144
  // admin ajax/post needs to be deferred
145
  foreach ( $this->actions as $index => $hook ) {
146
  add_action( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );
140
  * This part will be executed at the very beginning of WordPress core.
141
  * Execute callbacks that are specified by the component with 'init'.
142
  */
143
+ elseif ( defined( 'WP_ADMIN' ) && WP_ADMIN ) {
144
  // admin ajax/post needs to be deferred
145
  foreach ( $this->actions as $index => $hook ) {
146
  add_action( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );
classes/class-ip-geo-block-opts.php CHANGED
@@ -74,7 +74,7 @@ class IP_Geo_Block_Opts {
74
  'cycle' => 30, // Updating cycle (days)
75
  ),
76
  // since version 3.0.9, 3.0.17
77
- 'priority' => array( 0, PHP_INT_MAX ), // 0:high, 1:log for WP-ZEP
78
  // since version 2.2.0
79
  'anonymize' => TRUE, // Anonymize IP address to hide privacy
80
  'signature' => '../,/wp-config.php,/passwd', // malicious signature
@@ -195,13 +195,14 @@ class IP_Geo_Block_Opts {
195
  'link' => NULL, // key of login link
196
  'hash' => NULL, // hash of 'link'
197
  ),
198
- // since version 3.0.17
199
  'monitor' => array(
200
- 'metadata' => TRUE,
 
201
  ),
202
  'metadata' => array(
203
- 'pre_update_option' => array( 'siteurl', 'admin_email', 'users_can_register', 'default_role' ),
204
- 'pre_update_site_option' => array( 'siteurl', 'admin_email', 'registration' ),
205
  ),
206
  );
207
 
@@ -429,24 +430,25 @@ class IP_Geo_Block_Opts {
429
  unset( $settings['public']['simulate'] );
430
  }
431
 
432
- if ( version_compare( $version, '3.0.17' ) < 0 ) {
433
  $settings['priority'] = $default['priority'];
 
 
434
  $settings['monitor' ] = $default['monitor' ];
435
  $settings['metadata'] = $default['metadata'];
 
436
 
437
- // re-install mu-plugins to re-order the priority
438
- if ( self::get_validation_timing( NULL ) ) {
439
- self::remove_mu_plugin( NULL );
440
- self::setup_validation_timing( $settings );
441
- }
442
  }
443
 
444
  // update package version number
445
  $settings['version'] = IP_Geo_Block::VERSION;
446
 
447
- // install addons for IP Geolocation database API ver. 1.1.14 at IP Geo Block 3.0.17
448
  $providers = IP_Geo_Block_Provider::get_addons();
449
- if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.17' ) < 0 )
450
  $settings['api_dir'] = self::install_api( $settings );
451
 
452
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
74
  'cycle' => 30, // Updating cycle (days)
75
  ),
76
  // since version 3.0.9, 3.0.17
77
+ 'priority' => array( 0, PHP_INT_MAX ), // 0:high, 1:low
78
  // since version 2.2.0
79
  'anonymize' => TRUE, // Anonymize IP address to hide privacy
80
  'signature' => '../,/wp-config.php,/passwd', // malicious signature
195
  'link' => NULL, // key of login link
196
  'hash' => NULL, // hash of 'link'
197
  ),
198
+ // since version 3.0.18
199
  'monitor' => array(
200
+ 'updated_option' => FALSE,
201
+ 'update_site_option' => FALSE,
202
  ),
203
  'metadata' => array(
204
+ 'pre_update_option' => array( 'siteurl', 'admin_email', 'users_can_register', 'default_role', 'wp_user_roles' ), // @since 2.0.0 `manage_options`
205
+ 'pre_update_site_option' => array( 'siteurl', 'admin_email', 'registration' ), // @since 3.0.0 `manage_network_options`
206
  ),
207
  );
208
 
430
  unset( $settings['public']['simulate'] );
431
  }
432
 
433
+ if ( version_compare( $version, '3.0.17' ) < 0 )
434
  $settings['priority'] = $default['priority'];
435
+
436
+ if ( version_compare( $version, '3.0.18' ) < 0 ) {
437
  $settings['monitor' ] = $default['monitor' ];
438
  $settings['metadata'] = $default['metadata'];
439
+ IP_Geo_Block::update_metadata( NULL );
440
 
441
+ self::remove_mu_plugin( ); // remove new file
442
+ self::remove_mu_plugin(''); // remove old file
443
+ self::setup_validation_timing( $settings );
 
 
444
  }
445
 
446
  // update package version number
447
  $settings['version'] = IP_Geo_Block::VERSION;
448
 
449
+ // install addons for IP Geolocation database API ver. 1.1.15 at IP Geo Block 3.0.18
450
  $providers = IP_Geo_Block_Provider::get_addons();
451
+ if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.18' ) < 0 )
452
  $settings['api_dir'] = self::install_api( $settings );
453
 
454
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
classes/class-ip-geo-block-util.php CHANGED
@@ -19,7 +19,7 @@ class IP_Geo_Block_Util {
19
  static $offset = NULL;
20
  static $format = NULL;
21
 
22
- NULL === $offset and $offset = wp_timezone_override_offset() * HOUR_IN_SECONDS;
23
  NULL === $format and $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
24
 
25
  return date_i18n( $fmt ? $fmt : $format, $timestamp ? (int)$timestamp + $offset : FALSE );
@@ -299,7 +299,7 @@ class IP_Geo_Block_Util {
299
  * Retrieve user info by a given field
300
  * @source wp-includes/pluggable.php @since 2.8.0
301
  */
302
- private static function get_user_by( $field, $value ) {
303
  if ( function_exists( 'get_user_by' ) )
304
  return get_user_by( $field, $value );
305
 
@@ -643,6 +643,23 @@ class IP_Geo_Block_Util {
643
  return ( $user = self::validate_auth_cookie() ) ? $user->has_cap( $capability ) : FALSE; // @since 2.0.0
644
  }
645
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
646
  /**
647
  * WP alternative function get_allowed_mime_types() for mu-plugins
648
  *
@@ -800,9 +817,10 @@ class IP_Geo_Block_Util {
800
  /**
801
  * Check proxy variable
802
  *
 
803
  */
804
  public static function get_proxy_var() {
805
- foreach ( array( 'HTTP_X_FORWARDED_FOR', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED' ) as $var ) {
806
  if ( isset( $_SERVER[ $var ] ) ) {
807
  return $var;
808
  }
@@ -942,10 +960,12 @@ class IP_Geo_Block_Util {
942
  * This function should be called after 'init' hook is fired.
943
  */
944
  public static function get_sites_of_user() {
945
- $sites = array();
946
 
947
- foreach ( get_blogs_of_user( get_current_user_id(), current_user_can( 'manage_network_options' ) ) as $site ) { // @since 3.0.0
948
- $sites[] = preg_replace( '/^https?:/', '', $site->siteurl );
 
 
949
  }
950
 
951
  return $sites;
@@ -1057,4 +1077,19 @@ class IP_Geo_Block_Util {
1057
  return self::hash_equals( self::hash_link( $link ), pack( 'H*', $hash ? $hash : self::get_link() ) ); // hex2bin() for PHP 5.4+
1058
  }
1059
 
1060
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  static $offset = NULL;
20
  static $format = NULL;
21
 
22
+ NULL === $offset and $offset = wp_timezone_override_offset() * HOUR_IN_SECONDS; // @since 2.8.0
23
  NULL === $format and $format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
24
 
25
  return date_i18n( $fmt ? $fmt : $format, $timestamp ? (int)$timestamp + $offset : FALSE );
299
  * Retrieve user info by a given field
300
  * @source wp-includes/pluggable.php @since 2.8.0
301
  */
302
+ public static function get_user_by( $field, $value ) {
303
  if ( function_exists( 'get_user_by' ) )
304
  return get_user_by( $field, $value );
305
 
643
  return ( $user = self::validate_auth_cookie() ) ? $user->has_cap( $capability ) : FALSE; // @since 2.0.0
644
  }
645
 
646
+ /**
647
+ * Check if the current user has the capabilities.
648
+ *
649
+ */
650
+ public static function current_user_has_caps( $caps ) {
651
+ $user = self::get_user_by( 'id', self::get_current_user_id() );
652
+ if ( is_object( $user ) ) {
653
+ foreach ( $caps as $cap ) {
654
+ if ( $user->has_cap( $cap ) ) {
655
+ return TRUE;
656
+ }
657
+ }
658
+ }
659
+
660
+ return FALSE;
661
+ }
662
+
663
  /**
664
  * WP alternative function get_allowed_mime_types() for mu-plugins
665
  *
817
  /**
818
  * Check proxy variable
819
  *
820
+ * @see https://developer.wordpress.org/reference/classes/wp_community_events/get_unsafe_client_ip/
821
  */
822
  public static function get_proxy_var() {
823
+ foreach ( array( 'HTTP_X_FORWARDED_FOR', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED' ) as $var ) {
824
  if ( isset( $_SERVER[ $var ] ) ) {
825
  return $var;
826
  }
960
  * This function should be called after 'init' hook is fired.
961
  */
962
  public static function get_sites_of_user() {
963
+ $sites = array( preg_replace( '/^https?:/', '', home_url() ) );
964
 
965
+ foreach ( get_blogs_of_user( self::get_current_user_id(), current_user_can( 'manage_network_options' ) ) as $site ) { // @since 3.0.0
966
+ if ( ! in_array( $url = preg_replace( '/^https?:/', '', $site->siteurl ), $sites, TRUE ) ) {
967
+ $sites[] = $url;
968
+ }
969
  }
970
 
971
  return $sites;
1077
  return self::hash_equals( self::hash_link( $link ), pack( 'H*', $hash ? $hash : self::get_link() ) ); // hex2bin() for PHP 5.4+
1078
  }
1079
 
1080
+ }
1081
+
1082
+ // Some plugins need this when this plugin is installed as mu-plugins
1083
+ if ( ! function_exists( 'get_userdata' ) ) :
1084
+ /**
1085
+ * Retrieve user info by user ID.
1086
+ *
1087
+ * @since 0.71
1088
+ *
1089
+ * @param int $user_id User ID
1090
+ * @return WP_User|false WP_User object on success, false on failure.
1091
+ */
1092
+ function get_userdata( $user_id ) {
1093
+ return IP_Geo_Block_Util::get_user_by( 'id', $user_id );
1094
+ }
1095
+ endif;
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.17';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
@@ -247,13 +247,13 @@ class IP_Geo_Block {
247
  *
248
  */
249
  public static function enqueue_nonce( $hook ) {
250
- if ( is_user_logged_in() ) {
251
  $settings = self::get_option();
252
  $validate = $settings['validation'];
253
 
254
- $args['sites'] = IP_Geo_Block_Util::get_sites_of_user();
255
- $args['nonce'] = IP_Geo_Block_Util::create_nonce( self::$auth_key );
256
- $args['key' ] = $validate['admin'] & 2 || $validate['ajax'] & 2 || $validate['plugins'] & 2 || $validate['themes'] & 2 ? self::$auth_key : FALSE;
257
 
258
  $script = plugins_url(
259
  ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
@@ -627,9 +627,13 @@ class IP_Geo_Block {
627
 
628
  public function validate_login() {
629
  // parse action
630
- $action = isset( $_GET['key'] ) ? 'resetpass' : ( isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login' );
631
- $action = 'retrievepassword' === $action ? 'lostpassword' : ( 'rp' === $action ? 'resetpass' : $action );
632
  $settings = self::get_option();
 
 
 
 
 
 
633
 
634
  // the same rule should be applied to login and logout
635
  ! empty( $settings['login_action']['login'] ) and $settings['login_action']['logout'] = TRUE;
@@ -697,7 +701,9 @@ class IP_Geo_Block {
697
  // in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker, bbPress
698
  'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test', 'bp_avatar_upload',
699
  // Anti-Malware Security and Brute-Force Firewall, Jetpack page & action, Email Subscribers & Newsletters by Icegram, Swift Performance
700
- 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', 'es_sendemail', 'swift_performance_setup'
 
 
701
  ) );
702
 
703
  // skip validation of country code and WP-ZEP if exceptions matches action or page
@@ -916,49 +922,42 @@ class IP_Geo_Block {
916
  }
917
 
918
  /**
919
- * Validate updating metadata.
920
  *
921
  */
922
  private function validate_metadata( $settings, $priority = 10 ) {
923
  // @since 2.6.0 apply_filters( "pre_update_option_{$option}", $value, $old_value, $option ); @since 4.4.0 `$option` was added.
924
  // @since 2.9.0 apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id );
925
- foreach ( array( 'pre_update_option', 'pre_update_site_option' ) as $key ) {
926
- foreach ( $settings['metadata'][ $key ] as $option ) {
927
  add_filter( "{$key}_{$option}", array( $this, 'check_capability' ), $priority, 3 );
928
  }
929
  }
930
 
931
- /**
932
- * @since 2.9.0
933
- * do_action( 'updated_option', $option, $old_value, $value );
934
- * @since 3.0.0, @since 4.7.0 The `$network_id` parameter was added.
935
- * do_action( 'update_site_option', $option, $value, $old_value, $network_id );
936
- */
937
- if ( ! empty( $settings['monitor']['metadata'] ) ) {
938
- add_action( 'updated_option', array( $this, 'update_meta_stats' ), $priority, 1 );
939
- add_action( 'update_site_option', array( $this, 'update_meta_stats' ), $priority, 1 );
940
  }
941
  }
942
 
943
  public function update_meta_stats( $option ) {
944
  if ( FALSE === strpos( $option, 'transient' ) && self::OPTION_META !== $option ) {
945
- $which = IP_Geo_Block_Util::current_user_can( 'manage_options' ) ||
946
- IP_Geo_Block_Util::current_user_can( 'manage_network_options' ) ? 0 : 1;
947
-
948
  $metadata = self::get_metadata();
949
  $action = current_filter(); // @since 2.5.0
950
 
951
  if ( ! isset( $metadata[ $action ][ $option ] ) )
952
  $metadata[ $action ][ $option ] = array( 0, 0 );
953
 
 
954
  $metadata[ $action ][ $option ][ $which ]++;
955
  self::update_metadata( $metadata );
956
  }
957
  }
958
 
959
  public function check_capability( $value, $old_value, $option = NULL ) {
960
- // check capability
961
- if ( ! IP_Geo_Block_Util::current_user_can( 'manage_options' ) && ! IP_Geo_Block_Util::current_user_can( 'manage_network_options' ) ) {
962
  $time = microtime( TRUE );
963
  $settings = self::get_option();
964
  $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr, $settings['cache_hold'] );
@@ -969,7 +968,7 @@ class IP_Geo_Block {
969
  ) + $cache );
970
 
971
  // send response code to die if the current user does not have the right capability
972
- $this->endof_validate( $this->target_type, $validate, $settings, TRUE, TRUE, FALSE );
973
  }
974
 
975
  return $value;
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
+ const VERSION = '3.0.17.1';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
247
  *
248
  */
249
  public static function enqueue_nonce( $hook ) {
250
+ if ( IP_Geo_Block_Util::is_user_logged_in() ) {
251
  $settings = self::get_option();
252
  $validate = $settings['validation'];
253
 
254
+ $args['sites' ] = IP_Geo_Block_Util::get_sites_of_user();
255
+ $args['nonce' ] = IP_Geo_Block_Util::create_nonce( self::$auth_key );
256
+ $args['key' ] = $validate['admin'] & 2 || $validate['ajax'] & 2 || $validate['plugins'] & 2 || $validate['themes'] & 2 ? self::$auth_key : FALSE;
257
 
258
  $script = plugins_url(
259
  ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
627
 
628
  public function validate_login() {
629
  // parse action
 
 
630
  $settings = self::get_option();
631
+ if ( 'wp-signup.php' === $this->pagenow && $settings['login_action']['register'] ) {
632
+ $action = 'register';
633
+ } else {
634
+ $action = isset( $_GET['key'] ) ? 'resetpass' : ( isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login' );
635
+ $action = 'retrievepassword' === $action ? 'lostpassword' : ( 'rp' === $action ? 'resetpass' : $action );
636
+ }
637
 
638
  // the same rule should be applied to login and logout
639
  ! empty( $settings['login_action']['login'] ) and $settings['login_action']['logout'] = TRUE;
701
  // in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker, bbPress
702
  'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test', 'bp_avatar_upload',
703
  // Anti-Malware Security and Brute-Force Firewall, Jetpack page & action, Email Subscribers & Newsletters by Icegram, Swift Performance
704
+ 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', 'es_sendemail', 'swift_performance_setup',
705
+ // Advanced Access Manager
706
+ 'aam', 'aamc',
707
  ) );
708
 
709
  // skip validation of country code and WP-ZEP if exceptions matches action or page
922
  }
923
 
924
  /**
925
+ * Validate capability on updating metadata.
926
  *
927
  */
928
  private function validate_metadata( $settings, $priority = 10 ) {
929
  // @since 2.6.0 apply_filters( "pre_update_option_{$option}", $value, $old_value, $option ); @since 4.4.0 `$option` was added.
930
  // @since 2.9.0 apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id );
931
+ foreach ( $settings['metadata'] as $key => $options ) {
932
+ foreach ( $options as $option ) {
933
  add_filter( "{$key}_{$option}", array( $this, 'check_capability' ), $priority, 3 );
934
  }
935
  }
936
 
937
+ // @since 2.9.0 do_action( "updated_option", $option, $old_value, $value );
938
+ // @since 3.0.0 do_action( "update_site_option", $option, $value, $old_value, $network_id ); @since 4.7.0 `$network_id` was added.
939
+ foreach ( $settings['monitor'] as $key => $options ) {
940
+ $options and add_action( $key, array( $this, 'update_meta_stats' ), $priority );
 
 
 
 
 
941
  }
942
  }
943
 
944
  public function update_meta_stats( $option ) {
945
  if ( FALSE === strpos( $option, 'transient' ) && self::OPTION_META !== $option ) {
 
 
 
946
  $metadata = self::get_metadata();
947
  $action = current_filter(); // @since 2.5.0
948
 
949
  if ( ! isset( $metadata[ $action ][ $option ] ) )
950
  $metadata[ $action ][ $option ] = array( 0, 0 );
951
 
952
+ $which =IP_Geo_Block_Util::current_user_has_caps( array( 'manage_options', 'manage_network_options' ) ) ? 1 : 0;
953
  $metadata[ $action ][ $option ][ $which ]++;
954
  self::update_metadata( $metadata );
955
  }
956
  }
957
 
958
  public function check_capability( $value, $old_value, $option = NULL ) {
959
+ // allow only admin and super admin
960
+ if ( ! IP_Geo_Block_Util::current_user_has_caps( array( 'manage_options', 'manage_network_options' ) ) ) {
961
  $time = microtime( TRUE );
962
  $settings = self::get_option();
963
  $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr, $settings['cache_hold'] );
968
  ) + $cache );
969
 
970
  // send response code to die if the current user does not have the right capability
971
+ $this->endof_validate( 'admin', $validate, $settings, TRUE, TRUE, FALSE );
972
  }
973
 
974
  return $value;
includes/Net/IPv4.php CHANGED
@@ -4,13 +4,13 @@
4
  *
5
  * PHP versions 4, 5 and 7
6
  *
7
- * @link http://php.net/manual/en/function.ip2long.php#82397
8
- * @link http://stackoverflow.com/questions/594112/matching-an-ip-to-a-cidr-mask-in-php-5#answer-14841828
9
  */
10
 
11
  class Net_IPv4 {
12
  public static function ipInNetwork( $ip, $cidr ) {
13
- list ( $net, $mask ) = explode ( '/', $cidr );
14
- return ( ip2long( $ip ) & ~ ( ( 1 << ( 32 - $mask ) ) - 1 ) ) == ip2long( $net );
 
15
  }
16
  }
4
  *
5
  * PHP versions 4, 5 and 7
6
  *
7
+ * @link https://stackoverflow.com/questions/594112/matching-an-ip-to-a-cidr-mask-in-php-5#answer-594134
 
8
  */
9
 
10
  class Net_IPv4 {
11
  public static function ipInNetwork( $ip, $cidr ) {
12
+ list( $subnet, $bitmask ) = explode( '/', $cidr );
13
+ $bitmask = -1 << ( 32 - $bitmask );
14
+ return ( ip2long( $ip ) & $bitmask ) === ( ip2long( $subnet ) & $bitmask );
15
  }
16
  }
includes/random_compat/byte_safe_strings.php CHANGED
@@ -29,8 +29,8 @@
29
  if (!is_callable('RandomCompat_strlen')) {
30
  if (
31
  defined('MB_OVERLOAD_STRING')
32
- && // https://github.com/PHPCompatibility/PHPCompatibility/issues/119
33
- ((int) ini_get(implode('.', array('mbstring', 'func_overload')))) & MB_OVERLOAD_STRING
34
  ) {
35
  /**
36
  * strlen() implementation that isn't brittle to mbstring.func_overload
@@ -83,8 +83,8 @@ if (!is_callable('RandomCompat_substr')) {
83
 
84
  if (
85
  defined('MB_OVERLOAD_STRING')
86
- && // https://github.com/PHPCompatibility/PHPCompatibility/issues/119
87
- ((int) ini_get(implode('.', array('mbstring', 'func_overload')))) & MB_OVERLOAD_STRING
88
  ) {
89
  /**
90
  * substr() implementation that isn't brittle to mbstring.func_overload
29
  if (!is_callable('RandomCompat_strlen')) {
30
  if (
31
  defined('MB_OVERLOAD_STRING')
32
+ && /* @codingStandardsIgnoreLine */ // phpcs:ignore
33
+ ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
34
  ) {
35
  /**
36
  * strlen() implementation that isn't brittle to mbstring.func_overload
83
 
84
  if (
85
  defined('MB_OVERLOAD_STRING')
86
+ && /* @codingStandardsIgnoreLine */ // phpcs:ignore
87
+ ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
88
  ) {
89
  /**
90
  * substr() implementation that isn't brittle to mbstring.func_overload
includes/random_compat/cast_to_int.php CHANGED
@@ -27,19 +27,19 @@
27
  */
28
 
29
  if (!is_callable('RandomCompat_intval')) {
30
-
31
  /**
32
  * Cast to an integer if we can, safely.
33
- *
34
  * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
35
  * (non-inclusive), it will sanely cast it to an int. If you it's equal to
36
  * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
37
  * lose precision, so the <= and => operators might accidentally let a float
38
  * through.
39
- *
40
  * @param int|float $number The number we want to convert to an int
41
  * @param bool $fail_open Set to true to not throw an exception
42
- *
43
  * @return float|int
44
  * @psalm-suppress InvalidReturnType
45
  *
27
  */
28
 
29
  if (!is_callable('RandomCompat_intval')) {
30
+
31
  /**
32
  * Cast to an integer if we can, safely.
33
+ *
34
  * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
35
  * (non-inclusive), it will sanely cast it to an int. If you it's equal to
36
  * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
37
  * lose precision, so the <= and => operators might accidentally let a float
38
  * through.
39
+ *
40
  * @param int|float $number The number we want to convert to an int
41
  * @param bool $fail_open Set to true to not throw an exception
42
+ *
43
  * @return float|int
44
  * @psalm-suppress InvalidReturnType
45
  *
includes/random_compat/error_polyfill.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
@@ -30,7 +30,7 @@ if (!class_exists('Error', false)) {
30
  // We can't really avoid making this extend Exception in PHP 5.
31
  class Error extends Exception
32
  {
33
-
34
  }
35
  }
36
 
@@ -38,12 +38,12 @@ if (!class_exists('TypeError', false)) {
38
  if (is_subclass_of('Error', 'Exception')) {
39
  class TypeError extends Error
40
  {
41
-
42
  }
43
  } else {
44
  class TypeError extends Exception
45
  {
46
-
47
  }
48
  }
49
  }
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
30
  // We can't really avoid making this extend Exception in PHP 5.
31
  class Error extends Exception
32
  {
33
+
34
  }
35
  }
36
 
38
  if (is_subclass_of('Error', 'Exception')) {
39
  class TypeError extends Error
40
  {
41
+
42
  }
43
  } else {
44
  class TypeError extends Exception
45
  {
46
+
47
  }
48
  }
49
  }
includes/random_compat/random_bytes_com_dotnet.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
- *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
- *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
- *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -88,4 +88,4 @@ if (!is_callable('random_bytes')) {
88
  'Could not gather sufficient random data'
89
  );
90
  }
91
- }
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
+ *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
+ *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
+ *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88
  'Could not gather sufficient random data'
89
  );
90
  }
91
+ }
includes/random_compat/random_bytes_dev_urandom.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
- *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
- *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -36,6 +36,7 @@ if (!is_callable('random_bytes')) {
36
  * random numbers in accordance with best practices
37
  *
38
  * Why we use /dev/urandom and not /dev/random
 
39
  * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
40
  *
41
  * @param int $bytes
@@ -54,17 +55,35 @@ if (!is_callable('random_bytes')) {
54
  */
55
  if (empty($fp)) {
56
  /**
57
- * We use /dev/urandom if it is a char device.
58
- * We never fall back to /dev/random
 
 
 
 
 
 
59
  */
60
- /** @var resource|bool $fp */
61
- $fp = fopen('/dev/urandom', 'rb');
62
- if (is_resource($fp)) {
63
- /** @var array<string, int> $st */
64
- $st = fstat($fp);
65
- if (($st['mode'] & 0170000) !== 020000) {
66
- fclose($fp);
67
- $fp = false;
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
  }
70
 
@@ -128,29 +147,28 @@ if (!is_callable('random_bytes')) {
128
  */
129
  $read = fread($fp, $remaining);
130
  if (!is_string($read)) {
131
- if ($read === false) {
132
- /**
133
- * We cannot safely read from the file. Exit the
134
- * do-while loop and trigger the exception condition
135
- *
136
- * @var string|bool
137
- */
138
- $buf = false;
139
- break;
140
- }
141
  }
142
  /**
143
  * Decrease the number of bytes returned from remaining
144
  */
145
  $remaining -= RandomCompat_strlen($read);
146
  /**
147
- * @var string|bool
148
  */
149
- $buf = $buf . $read;
150
  } while ($remaining > 0);
151
 
152
  /**
153
  * Is our result valid?
 
154
  */
155
  if (is_string($buf)) {
156
  if (RandomCompat_strlen($buf) === $bytes) {
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
+ *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
+ *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
  * random numbers in accordance with best practices
37
  *
38
  * Why we use /dev/urandom and not /dev/random
39
+ * @ref https://www.2uo.de/myths-about-urandom
40
  * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
41
  *
42
  * @param int $bytes
55
  */
56
  if (empty($fp)) {
57
  /**
58
+ * We don't want to ever read C:\dev\random, only /dev/urandom on
59
+ * Unix-like operating systems. While we guard against this
60
+ * condition in random.php, it doesn't hurt to be defensive in depth
61
+ * here.
62
+ *
63
+ * To that end, we only try to open /dev/urandom if we're on a Unix-
64
+ * like operating system (which means the directory separator is set
65
+ * to "/" not "\".
66
  */
67
+ if (DIRECTORY_SEPARATOR === '/') {
68
+ if (!is_readable('/dev/urandom')) {
69
+ throw new Exception(
70
+ 'Environment misconfiguration: ' .
71
+ '/dev/urandom cannot be read.'
72
+ );
73
+ }
74
+ /**
75
+ * We use /dev/urandom if it is a char device.
76
+ * We never fall back to /dev/random
77
+ */
78
+ /** @var resource|bool $fp */
79
+ $fp = fopen('/dev/urandom', 'rb');
80
+ if (is_resource($fp)) {
81
+ /** @var array<string, int> $st */
82
+ $st = fstat($fp);
83
+ if (($st['mode'] & 0170000) !== 020000) {
84
+ fclose($fp);
85
+ $fp = false;
86
+ }
87
  }
88
  }
89
 
147
  */
148
  $read = fread($fp, $remaining);
149
  if (!is_string($read)) {
150
+ /**
151
+ * We cannot safely read from the file. Exit the
152
+ * do-while loop and trigger the exception condition
153
+ *
154
+ * @var string|bool
155
+ */
156
+ $buf = false;
157
+ break;
 
 
158
  }
159
  /**
160
  * Decrease the number of bytes returned from remaining
161
  */
162
  $remaining -= RandomCompat_strlen($read);
163
  /**
164
+ * @var string $buf
165
  */
166
+ $buf .= $read;
167
  } while ($remaining > 0);
168
 
169
  /**
170
  * Is our result valid?
171
+ * @var string|bool $buf
172
  */
173
  if (is_string($buf)) {
174
  if (RandomCompat_strlen($buf) === $bytes) {
includes/random_compat/random_bytes_libsodium.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
- *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
- *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
+ *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
+ *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
includes/random_compat/random_bytes_libsodium_legacy.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
- *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
- *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
+ *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
+ *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
includes/random_compat/random_bytes_mcrypt.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
  /**
3
- * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
- *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
- *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
- *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
- *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -56,9 +56,8 @@ if (!is_callable('random_bytes')) {
56
  );
57
  }
58
 
59
- /** @var string|bool $buf */ /* MCRYPT_DEV_RANDOM:0, MCRYPT_DEV_URANDOM:1 */
60
- $fnc = implode('_', array('mcrypt', 'create', 'iv'));
61
- $buf = @$fnc((int) $bytes, (int) 1 /*MCRYPT_DEV_URANDOM*/);
62
  if (
63
  is_string($buf)
64
  &&
1
  <?php
2
  /**
3
+ * Random_* Compatibility Library
4
  * for using the new PHP 7 random_* API in PHP 5 projects
5
+ *
6
  * The MIT License (MIT)
7
  *
8
  * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
9
+ *
10
  * Permission is hereby granted, free of charge, to any person obtaining a copy
11
  * of this software and associated documentation files (the "Software"), to deal
12
  * in the Software without restriction, including without limitation the rights
13
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
  * copies of the Software, and to permit persons to whom the Software is
15
  * furnished to do so, subject to the following conditions:
16
+ *
17
  * The above copyright notice and this permission notice shall be included in
18
  * all copies or substantial portions of the Software.
19
+ *
20
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56
  );
57
  }
58
 
59
+ /** @var string|bool $buf */ /* @codingStandardsIgnoreLine */ // phpcs:ignore
60
+ $buf = @mcrypt_create_iv((int) $bytes, (int) MCRYPT_DEV_URANDOM);
 
61
  if (
62
  is_string($buf)
63
  &&
ip-geo-block.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: https://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.17
17
  * Author: tokkonopapa
18
  * Author URI: https://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: https://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.17.1
17
  * Author: tokkonopapa
18
  * Author URI: https://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
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.17\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-12-03 23:01+0900\n"
8
- "PO-Revision-Date: 2018-12-03 23:04+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -399,7 +399,7 @@ msgstr "このページにアクセスするための十分な権限がありま
399
  #: classes/class-ip-geo-block-cron.php:228
400
  #: classes/class-ip-geo-block-cron.php:332
401
  #: classes/class-ip-geo-block-cron.php:410
402
- #: classes/class-ip-geo-block-opts.php:482
403
  #, php-format
404
  msgid "Unable to write <code>%s</code>. Please check the permission."
405
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
@@ -1828,7 +1828,7 @@ msgstr "データベース・ファイルが見つかりません。"
1828
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1829
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1830
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1831
- msgid "Update service has already stopped."
1832
  msgstr "データベースの更新サービスは終了しました。"
1833
 
1834
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
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.17.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-12-31 01:11+0900\n"
8
+ "PO-Revision-Date: 2018-12-31 01:12+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
399
  #: classes/class-ip-geo-block-cron.php:228
400
  #: classes/class-ip-geo-block-cron.php:332
401
  #: classes/class-ip-geo-block-cron.php:410
402
+ #: classes/class-ip-geo-block-opts.php:484
403
  #, php-format
404
  msgid "Unable to write <code>%s</code>. Please check the permission."
405
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
1828
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1829
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1830
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1831
+ msgid "The download service of this database file had terminated."
1832
  msgstr "データベースの更新サービスは終了しました。"
1833
 
1834
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
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.17\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-12-03 23:01+0900\n"
8
- "PO-Revision-Date: 2018-12-03 23:35+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -361,7 +361,7 @@ msgstr ""
361
  #: classes/class-ip-geo-block-cron.php:228
362
  #: classes/class-ip-geo-block-cron.php:332
363
  #: classes/class-ip-geo-block-cron.php:410
364
- #: classes/class-ip-geo-block-opts.php:482
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
@@ -1660,7 +1660,7 @@ msgstr ""
1660
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1661
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1662
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1663
- msgid "Update service has already stopped."
1664
  msgstr ""
1665
 
1666
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
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.17.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-12-31 01:11+0900\n"
8
+ "PO-Revision-Date: 2018-12-31 01:12+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
361
  #: classes/class-ip-geo-block-cron.php:228
362
  #: classes/class-ip-geo-block-cron.php:332
363
  #: classes/class-ip-geo-block-cron.php:410
364
+ #: classes/class-ip-geo-block-opts.php:484
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
1660
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1661
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1662
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1663
+ msgid "The download service of this database file had terminated."
1664
  msgstr ""
1665
 
1666
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
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.17\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-12-03 23:01+0900\n"
8
- "PO-Revision-Date: 2018-12-03 23:02+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
@@ -361,7 +361,7 @@ msgstr ""
361
  #: classes/class-ip-geo-block-cron.php:228
362
  #: classes/class-ip-geo-block-cron.php:332
363
  #: classes/class-ip-geo-block-cron.php:410
364
- #: classes/class-ip-geo-block-opts.php:482
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
@@ -1660,7 +1660,7 @@ msgstr ""
1660
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1661
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1662
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1663
- msgid "Update service has already stopped."
1664
  msgstr ""
1665
 
1666
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
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.17.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-12-31 01:11+0900\n"
8
+ "PO-Revision-Date: 2018-12-31 01:11+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
361
  #: classes/class-ip-geo-block-cron.php:228
362
  #: classes/class-ip-geo-block-cron.php:332
363
  #: classes/class-ip-geo-block-cron.php:410
364
+ #: classes/class-ip-geo-block-opts.php:484
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
1660
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:179
1661
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:207
1662
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1663
+ msgid "The download service of this database file had terminated."
1664
  msgstr ""
1665
 
1666
  #: wp-content/mu-plugins/ip-geo-block-mu.php:72
rewrite.php CHANGED
@@ -35,6 +35,27 @@ if ( ! class_exists( 'IP_Geo_Block_Rewrite', FALSE ) ):
35
 
36
  class IP_Geo_Block_Rewrite {
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * Virtual requested uri to real path for multisite
40
  *
@@ -101,30 +122,17 @@ class IP_Geo_Block_Rewrite {
101
  */
102
  public static function exec( $context, $validate, $settings ) {
103
 
104
- // get document root
105
- // Note: super global can not be infected even when `register_globals` is on.
106
- // @see wp-admin/network.php, get_home_path() in wp-admin/includes/file.php
107
- // @link https://php.net/manual/en/security.globals.php
108
- // @link https://php.net/manual/en/reserved.variables.php#63831
109
- // @link https://blog.fyneworks.com/2007/08/php-documentroot-in-iis-windows-servers.html
110
- // @link https://stackoverflow.com/questions/11893832/is-it-a-good-idea-to-use-serverdocument-root-in-includes
111
- // @link http://community.sitepoint.com/t/-server-document-root-injection-vulnerability/5274
112
- // @link https://www.securityfocus.com/archive/1/476274/100/0/threaded
113
- // @link https://www.securityfocus.com/archive/1/476437/100/0/threaded
114
- $root = ! empty( $_SERVER['DOCUMENT_ROOT'] ) ?
115
- $_SERVER['DOCUMENT_ROOT'] :
116
- substr( $_SERVER['SCRIPT_FILENAME'], 0, -strlen( $_SERVER['SCRIPT_NAME'] ) );
117
-
118
  // get absolute path of requested uri
119
  // @link https://davidwalsh.name/iis-php-server-request_uri
120
- $path = ( $root = self::normalize_path( $root ) ) . parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
 
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 https://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 default index
130
  if ( FALSE === strripos( strtolower( $path ), '.php', -4 ) )
35
 
36
  class IP_Geo_Block_Rewrite {
37
 
38
+ /**
39
+ * Get document root
40
+ *
41
+ * Note: It assumes that the super global can not be infected because `register_globals` is off by default.
42
+ * @see network_step2() in wp-admin/includes/network.php, get_home_path() in wp-admin/includes/file.php
43
+ * @link https://php.net/manual/en/security.globals.php
44
+ * @link https://php.net/manual/en/reserved.variables.php#63831
45
+ * @link https://stackoverflow.com/questions/4577853/document-root-variable-on-php-iis
46
+ * @link https://stackoverflow.com/questions/11893832/is-it-a-good-idea-to-use-serverdocument-root-in-includes
47
+ * @link https://stackoverflow.com/questions/25017381/setting-php-document-root-on-webserver
48
+ * @link https://www.securityfocus.com/archive/1/476274/100/0/threaded
49
+ * @link https://www.securityfocus.com/archive/1/476437/100/0/threaded
50
+ */
51
+ private static function get_docroot() {
52
+ // $_SERVER['DOCUMENT_ROOT'] can be aliased or symbolic linked on virtual host while $_SERVER['SCRIPT_FILENAME'] and $_SERVER['SCRIPT_NAME'] are real path.
53
+ // $_SERVER['SCRIPT_FILENAME'] is the absolute pathname of the currently executing script while $_SERVER['SCRIPT_NAME'] is the path from document root.
54
+ // $root = isset( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : substr( $_SERVER['SCRIPT_FILENAME'], 0, -strlen( $_SERVER['SCRIPT_NAME'] ) );
55
+ $root = isset( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] );
56
+ return self::realpath( str_replace( DIRECTORY_SEPARATOR, '/', $root ) );
57
+ }
58
+
59
  /**
60
  * Virtual requested uri to real path for multisite
61
  *
122
  */
123
  public static function exec( $context, $validate, $settings ) {
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  // get absolute path of requested uri
126
  // @link https://davidwalsh.name/iis-php-server-request_uri
127
+ $root = self::get_docroot();
128
+ $path = self::realpath( $root . parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ) );
129
 
130
  // while malicios URI may be intercepted by the server,
131
  // null byte attack should be invalidated just in case.
132
  // Note: is_file(), is_readable(), file_exists() need a valid path.
133
  // @link https://php.net/releases/5_3_4.php, https://bugs.php.net/bug.php?id=39863
134
  // @example $path = "/etc/passwd\0.php"; is_file( $path ) === true (5.2.14), false (5.4.4)
135
+ $path = str_replace( "\0", '', $path );
136
 
137
  // check default index
138
  if ( FALSE === strripos( strtolower( $path ), '.php', -4 ) )
wp-content/ip-geo-api/ip2location/class-ip2location.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * IP Geo Block API class library for IP2Location
4
  *
5
- * @version 1.1.14
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
2
  /**
3
  * IP Geo Block API class library for IP2Location
4
  *
5
+ * @version 1.1.15
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
- * @version 1.1.14
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
+ * @version 1.1.15
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
- * @version 1.1.14
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
@@ -155,7 +155,7 @@ class IP_Geo_Block_API_Maxmind extends IP_Geo_Block_API {
155
  } else {
156
  $res['ipv4'] = array(
157
  'code' => 503,
158
- 'message' => __( 'Update service has already stopped.', 'ip-geo-block' )
159
  );
160
  }
161
 
@@ -176,7 +176,7 @@ class IP_Geo_Block_API_Maxmind extends IP_Geo_Block_API {
176
  } else {
177
  $res['ipv6'] = array(
178
  'code' => 503,
179
- 'message' => __( 'Update service has already stopped.', 'ip-geo-block' )
180
  );
181
  }
182
 
@@ -204,7 +204,7 @@ if ( ! empty( $db['use_asn'] ) || ! empty( $db['asn4_path'] ) ) :
204
  } else {
205
  $res['asn4'] = array(
206
  'code' => 503,
207
- 'message' => __( 'Update service has already stopped.', 'ip-geo-block' )
208
  );
209
  }
210
 
@@ -225,7 +225,7 @@ if ( ! empty( $db['use_asn'] ) || ! empty( $db['asn4_path'] ) ) :
225
  } else {
226
  $res['asn6'] = array(
227
  'code' => 503,
228
- 'message' => __( 'Update service has already stopped.', 'ip-geo-block' )
229
  );
230
  }
231
 
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
+ * @version 1.1.15
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
155
  } else {
156
  $res['ipv4'] = array(
157
  'code' => 503,
158
+ 'message' => __( 'The download service of this database file had terminated.', 'ip-geo-block' )
159
  );
160
  }
161
 
176
  } else {
177
  $res['ipv6'] = array(
178
  'code' => 503,
179
+ 'message' => __( 'The download service of this database file had terminated.', 'ip-geo-block' )
180
  );
181
  }
182
 
204
  } else {
205
  $res['asn4'] = array(
206
  'code' => 503,
207
+ 'message' => __( 'The download service of this database file had terminated.', 'ip-geo-block' )
208
  );
209
  }
210
 
225
  } else {
226
  $res['asn6'] = array(
227
  'code' => 503,
228
+ 'message' => __( 'The download service of this database file had terminated.', 'ip-geo-block' )
229
  );
230
  }
231
 
wp-content/ip-geo-api/maxmind/class-maxmind.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
- * @version 1.1.14
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
2
  /**
3
  * IP Geo Block API class library for Maxmind
4
  *
5
+ * @version 1.1.15
6
  * @author tokkonopapa <tokkonopapa@yahoo.com>
7
  * @license GPL-3.0
8
  * @link https://www.ipgeoblock.com/
wp-content/mu-plugins/ip-geo-block-mu.php CHANGED
@@ -26,30 +26,30 @@ defined( 'WPINC' ) or die;
26
 
27
  if ( ! class_exists( 'IP_Geo_Block', FALSE ) ):
28
 
29
- /*----------------------------------------------------------------------------*
30
- * Detect plugin. For use on Front End only.
31
- *----------------------------------------------------------------------------*/
 
32
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
33
 
34
- $plugin = 'ip-geo-block/ip-geo-block.php';
35
 
36
- if ( is_plugin_active( $plugin ) || is_plugin_active_for_network( $plugin ) ) {
37
 
38
  // Load plugin class
39
- if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin ) ) {
40
- require WP_PLUGIN_DIR . '/' . $plugin;
41
 
42
- $plugin = IP_Geo_Block::get_option();
43
 
44
  // check setup had already done
45
- if ( version_compare( $plugin['version'], IP_Geo_Block::VERSION ) >= 0 && $plugin['matching_rule'] >= 0 ) {
46
 
47
  // Remove instanciation
48
  remove_action( 'plugins_loaded', 'ip_geo_block_update' );
49
  remove_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
50
 
51
  // Upgrade then instanciate immediately
52
- ip_geo_block_update();
53
  IP_Geo_Block::get_instance();
54
  }
55
  }
@@ -60,7 +60,7 @@ if ( is_plugin_active( $plugin ) || is_plugin_active_for_network( $plugin ) ) {
60
 
61
  }
62
 
63
- unset( $plugin );
64
 
65
  /**
66
  * Show global notice.
26
 
27
  if ( ! class_exists( 'IP_Geo_Block', FALSE ) ):
28
 
29
+ // Avoud redirection loop
30
+ if ( 'wp-login.php' === basename( $_SERVER['SCRIPT_NAME'] ) && site_url() !== home_url() )
31
+ return;
32
+
33
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
34
 
35
+ $ipgeoblock = 'ip-geo-block/ip-geo-block.php';
36
 
37
+ if ( is_plugin_active( $ipgeoblock ) || is_plugin_active_for_network( $ipgeoblock ) ) {
38
 
39
  // Load plugin class
40
+ if ( file_exists( WP_PLUGIN_DIR . '/' . $ipgeoblock ) ) {
41
+ require WP_PLUGIN_DIR . '/' . $ipgeoblock;
42
 
43
+ $ipgeoblock = IP_Geo_Block::get_option();
44
 
45
  // check setup had already done
46
+ if ( version_compare( $ipgeoblock['version'], IP_Geo_Block::VERSION ) >= 0 && $ipgeoblock['matching_rule'] >= 0 ) {
47
 
48
  // Remove instanciation
49
  remove_action( 'plugins_loaded', 'ip_geo_block_update' );
50
  remove_action( 'plugins_loaded', array( 'IP_Geo_Block', 'get_instance' ) );
51
 
52
  // Upgrade then instanciate immediately
 
53
  IP_Geo_Block::get_instance();
54
  }
55
  }
60
 
61
  }
62
 
63
+ unset( $ipgeoblock );
64
 
65
  /**
66
  * Show global notice.