iQ Block Country - Version 1.1.24

Version Description

  • New: Added support for Lockdown WordPress Admin
  • New: Added support for WordPress Security Firewall
  • Change: Various small changes
Download this release

Release Info

Developer iqpascal
Plugin Icon 128x128 iQ Block Country
Version 1.1.24
Comparing to
See all releases

Code changes from version 1.1.23 to 1.1.24

iq-block-country.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: iQ Block Country
4
  Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
5
- Version: 1.1.23
6
  Author: Pascal
7
  Author URI: http://www.redeo.nl/
8
  Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
@@ -227,6 +227,9 @@ require_once('libs/blockcountry-search-engines.php');
227
  global $apiblacklist;
228
  $apiblacklist = FALSE;
229
  $backendblacklistcheck = FALSE;
 
 
 
230
  $blockcountry_is_login_page = iqblockcountry_is_login_page();
231
 
232
  register_activation_hook(__file__, 'iqblockcountry_this_plugin_first');
@@ -265,20 +268,29 @@ if (isset($_POST['action']))
265
  }
266
  }
267
 
 
 
 
 
 
268
  /*
269
  * Check first if users want to block the backend.
270
  */
271
- if (($blockcountry_is_login_page || is_admin()) && get_option('blockcountry_blockbackend'))
272
  {
273
- add_action ( 'login_head', 'iqblockcountry_checkCountry', 1 );
274
  }
275
- /*
276
- * Check first if users want to block the frontend.
277
- */
278
- if (get_option('blockcountry_blockfrontend') == "on")
279
  {
280
  add_action ( 'wp_head', 'iqblockcountry_checkCountry', 1 );
281
  }
 
 
 
 
 
 
 
282
 
283
  add_action ( 'admin_init', 'iqblockcountry_localization');
284
  add_action ( 'admin_menu', 'iqblockcountry_create_menu' );
@@ -287,8 +299,8 @@ add_filter ( 'add_option_blockcountry_tracking', 'iqblockcountry_schedule_tracki
287
  add_filter ( 'update_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
288
  add_filter ( 'add_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
289
 
290
- //add_filter ( 'update_option_blockcountry_backendlogging', 'iqblockcountry_blockcountry_backendlogging', 10, 2);
291
- //add_filter ( 'add_option_blockcountry_backendlogging', 'iqblockcountry_blockcountry_backendlogging', 10, 2);
292
  add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
293
  add_action ( 'blockcountry_retrievebanlist', 'iqblockcountry_tracking_retrieve_xml');
294
  if (get_option('blockcountry_buffer') == "on")
@@ -298,5 +310,4 @@ if (get_option('blockcountry_buffer') == "on")
298
  }
299
 
300
 
301
-
302
  ?>
2
  /*
3
  Plugin Name: iQ Block Country
4
  Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
5
+ Version: 1.1.24
6
  Author: Pascal
7
  Author URI: http://www.redeo.nl/
8
  Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
227
  global $apiblacklist;
228
  $apiblacklist = FALSE;
229
  $backendblacklistcheck = FALSE;
230
+
231
+ $blockcountry_is_login_page = iqblockcountry_is_login_page();
232
+
233
  $blockcountry_is_login_page = iqblockcountry_is_login_page();
234
 
235
  register_activation_hook(__file__, 'iqblockcountry_this_plugin_first');
268
  }
269
  }
270
 
271
+ $ip_address = iqblockcountry_get_ipaddress();
272
+ $country = iqblockcountry_check_ipaddress($ip_address);
273
+ iqblockcountry_debug_logging($ip_address,$country,'');
274
+
275
+
276
  /*
277
  * Check first if users want to block the backend.
278
  */
279
+ if (($blockcountry_is_login_page || is_admin()) && get_option('blockcountry_blockbackend') == 'on')
280
  {
281
+ add_action ( 'init', 'iqblockcountry_checkCountry', 1 );
282
  }
283
+ elseif (get_option('blockcountry_blockfrontend') == "on")
 
 
 
284
  {
285
  add_action ( 'wp_head', 'iqblockcountry_checkCountry', 1 );
286
  }
287
+ else
288
+ {
289
+ $ip_address = iqblockcountry_get_ipaddress();
290
+ $country = iqblockcountry_check_ipaddress($ip_address);
291
+ iqblockcountry_debug_logging($ip_address,$country,'NH');
292
+
293
+ }
294
 
295
  add_action ( 'admin_init', 'iqblockcountry_localization');
296
  add_action ( 'admin_menu', 'iqblockcountry_create_menu' );
299
  add_filter ( 'update_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
300
  add_filter ( 'add_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
301
 
302
+ add_filter ( 'update_option_blockcountry_debuglogging', 'iqblockcountry_blockcountry_debuglogging', 10, 2);
303
+ add_filter ( 'add_option_blockcountry_debuglogging', 'iqblockcountry_blockcountry_debuglogging', 10, 2);
304
  add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
305
  add_action ( 'blockcountry_retrievebanlist', 'iqblockcountry_tracking_retrieve_xml');
306
  if (get_option('blockcountry_buffer') == "on")
310
  }
311
 
312
 
 
313
  ?>
lang/en_EN.mo CHANGED
Binary file
lang/en_EN.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: iQ Block Country\n"
4
- "POT-Creation-Date: 2015-10-07 17:06+0100\n"
5
- "PO-Revision-Date: 2015-10-07 17:06+0100\n"
6
  "Last-Translator: Pascal <pascal@redeo.nl>\n"
7
  "Language-Team: iQ Block Country <info@redeo.nl>\n"
8
  "Language: English\n"
@@ -142,8 +142,8 @@ msgstr ""
142
  msgid "Version"
143
  msgstr ""
144
 
145
- #: libs/blockcountry-settings.php:285 libs/blockcountry-settings.php:1326
146
- #: libs/blockcountry-settings.php:1369
147
  msgid "URL"
148
  msgstr ""
149
 
@@ -430,7 +430,7 @@ msgstr ""
430
  #: libs/blockcountry-settings.php:678 libs/blockcountry-settings.php:732
431
  #: libs/blockcountry-settings.php:780 libs/blockcountry-settings.php:825
432
  #: libs/blockcountry-settings.php:953 libs/blockcountry-settings.php:1085
433
- #: libs/blockcountry-settings.php:1294
434
  msgid "Save Changes"
435
  msgstr ""
436
 
@@ -714,123 +714,123 @@ msgid ""
714
  "to work."
715
  msgstr ""
716
 
717
- #: libs/blockcountry-settings.php:1278
718
- msgid "Log all visits to the backend:"
719
  msgstr ""
720
 
721
- #: libs/blockcountry-settings.php:1279
722
- msgid ""
723
- "This logs all visits to the backend despite if they are blocked or not. This "
724
- "is mainly for debugging purposes."
725
  msgstr ""
726
 
727
  #: libs/blockcountry-settings.php:1286
728
- msgid "Accessibility options:"
729
  msgstr ""
730
 
731
  #: libs/blockcountry-settings.php:1287
732
- msgid "Set this option if you cannot use the default country selection box."
 
 
733
  msgstr ""
734
 
735
- #: libs/blockcountry-settings.php:1312
736
  msgid "Last blocked visits"
737
  msgstr ""
738
 
739
- #: libs/blockcountry-settings.php:1326
740
  msgid "Date / Time"
741
  msgstr ""
742
 
743
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1358
744
  msgid "IP Address"
745
  msgstr ""
746
 
747
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1358
748
  msgid "Hostname"
749
  msgstr ""
750
 
751
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1345
752
  msgid "Country"
753
  msgstr ""
754
 
755
- #: libs/blockcountry-settings.php:1326
756
  msgid "Frontend/Backend"
757
  msgstr ""
758
 
759
- #: libs/blockcountry-settings.php:1336 libs/blockcountry-settings.php:1438
760
  msgid "Frontend"
761
  msgstr ""
762
 
763
- #: libs/blockcountry-settings.php:1336
764
  msgid "Backend banlist"
765
  msgstr ""
766
 
767
- #: libs/blockcountry-settings.php:1336
768
  msgid "Backend & Backend banlist"
769
  msgstr ""
770
 
771
- #: libs/blockcountry-settings.php:1336 libs/blockcountry-settings.php:1439
772
  msgid "Backend"
773
  msgstr ""
774
 
775
- #: libs/blockcountry-settings.php:1343
776
  msgid "Top countries that are blocked"
777
  msgstr ""
778
 
779
- #: libs/blockcountry-settings.php:1345 libs/blockcountry-settings.php:1358
780
- #: libs/blockcountry-settings.php:1369
781
  msgid "# of blocked attempts"
782
  msgstr ""
783
 
784
- #: libs/blockcountry-settings.php:1356
785
  msgid "Top hosts that are blocked"
786
  msgstr ""
787
 
788
- #: libs/blockcountry-settings.php:1367
789
  msgid "Top URLs that are blocked"
790
  msgstr ""
791
 
792
- #: libs/blockcountry-settings.php:1383
793
  msgid "Clear database"
794
  msgstr ""
795
 
796
- #: libs/blockcountry-settings.php:1408
797
  msgid "Download as CSV file"
798
  msgstr ""
799
 
800
- #: libs/blockcountry-settings.php:1415
801
  msgid ""
802
  "You are not logging any information. Please uncheck the option 'Do not log "
803
  "IP addresses' if this is not what you want."
804
  msgstr ""
805
 
806
- #: libs/blockcountry-settings.php:1437
807
  msgid "Home"
808
  msgstr ""
809
 
810
- #: libs/blockcountry-settings.php:1440
811
  msgid "Pages"
812
  msgstr ""
813
 
814
- #: libs/blockcountry-settings.php:1441
815
  msgid "Categories"
816
  msgstr ""
817
 
818
- #: libs/blockcountry-settings.php:1442
819
  msgid "Post types"
820
  msgstr ""
821
 
822
- #: libs/blockcountry-settings.php:1443
823
  msgid "Search Engines"
824
  msgstr ""
825
 
826
- #: libs/blockcountry-settings.php:1444
827
  msgid "Tools"
828
  msgstr ""
829
 
830
- #: libs/blockcountry-settings.php:1445
831
  msgid "Logging"
832
  msgstr ""
833
 
834
- #: libs/blockcountry-settings.php:1446
835
  msgid "Import/Export"
836
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: iQ Block Country\n"
4
+ "POT-Creation-Date: 2015-12-13 16:07+0100\n"
5
+ "PO-Revision-Date: 2015-12-13 16:07+0100\n"
6
  "Last-Translator: Pascal <pascal@redeo.nl>\n"
7
  "Language-Team: iQ Block Country <info@redeo.nl>\n"
8
  "Language: English\n"
142
  msgid "Version"
143
  msgstr ""
144
 
145
+ #: libs/blockcountry-settings.php:285 libs/blockcountry-settings.php:1327
146
+ #: libs/blockcountry-settings.php:1370
147
  msgid "URL"
148
  msgstr ""
149
 
430
  #: libs/blockcountry-settings.php:678 libs/blockcountry-settings.php:732
431
  #: libs/blockcountry-settings.php:780 libs/blockcountry-settings.php:825
432
  #: libs/blockcountry-settings.php:953 libs/blockcountry-settings.php:1085
433
+ #: libs/blockcountry-settings.php:1295
434
  msgid "Save Changes"
435
  msgstr ""
436
 
714
  "to work."
715
  msgstr ""
716
 
717
+ #: libs/blockcountry-settings.php:1279
718
+ msgid "Accessibility options:"
719
  msgstr ""
720
 
721
+ #: libs/blockcountry-settings.php:1280
722
+ msgid "Set this option if you cannot use the default country selection box."
 
 
723
  msgstr ""
724
 
725
  #: libs/blockcountry-settings.php:1286
726
+ msgid "Log all visits:"
727
  msgstr ""
728
 
729
  #: libs/blockcountry-settings.php:1287
730
+ msgid ""
731
+ "This logs all visits despite if they are blocked or not. This is only for "
732
+ "debugging purposes."
733
  msgstr ""
734
 
735
+ #: libs/blockcountry-settings.php:1313
736
  msgid "Last blocked visits"
737
  msgstr ""
738
 
739
+ #: libs/blockcountry-settings.php:1327
740
  msgid "Date / Time"
741
  msgstr ""
742
 
743
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1359
744
  msgid "IP Address"
745
  msgstr ""
746
 
747
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1359
748
  msgid "Hostname"
749
  msgstr ""
750
 
751
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1346
752
  msgid "Country"
753
  msgstr ""
754
 
755
+ #: libs/blockcountry-settings.php:1327
756
  msgid "Frontend/Backend"
757
  msgstr ""
758
 
759
+ #: libs/blockcountry-settings.php:1337 libs/blockcountry-settings.php:1439
760
  msgid "Frontend"
761
  msgstr ""
762
 
763
+ #: libs/blockcountry-settings.php:1337
764
  msgid "Backend banlist"
765
  msgstr ""
766
 
767
+ #: libs/blockcountry-settings.php:1337
768
  msgid "Backend & Backend banlist"
769
  msgstr ""
770
 
771
+ #: libs/blockcountry-settings.php:1337 libs/blockcountry-settings.php:1440
772
  msgid "Backend"
773
  msgstr ""
774
 
775
+ #: libs/blockcountry-settings.php:1344
776
  msgid "Top countries that are blocked"
777
  msgstr ""
778
 
779
+ #: libs/blockcountry-settings.php:1346 libs/blockcountry-settings.php:1359
780
+ #: libs/blockcountry-settings.php:1370
781
  msgid "# of blocked attempts"
782
  msgstr ""
783
 
784
+ #: libs/blockcountry-settings.php:1357
785
  msgid "Top hosts that are blocked"
786
  msgstr ""
787
 
788
+ #: libs/blockcountry-settings.php:1368
789
  msgid "Top URLs that are blocked"
790
  msgstr ""
791
 
792
+ #: libs/blockcountry-settings.php:1384
793
  msgid "Clear database"
794
  msgstr ""
795
 
796
+ #: libs/blockcountry-settings.php:1409
797
  msgid "Download as CSV file"
798
  msgstr ""
799
 
800
+ #: libs/blockcountry-settings.php:1416
801
  msgid ""
802
  "You are not logging any information. Please uncheck the option 'Do not log "
803
  "IP addresses' if this is not what you want."
804
  msgstr ""
805
 
806
+ #: libs/blockcountry-settings.php:1438
807
  msgid "Home"
808
  msgstr ""
809
 
810
+ #: libs/blockcountry-settings.php:1441
811
  msgid "Pages"
812
  msgstr ""
813
 
814
+ #: libs/blockcountry-settings.php:1442
815
  msgid "Categories"
816
  msgstr ""
817
 
818
+ #: libs/blockcountry-settings.php:1443
819
  msgid "Post types"
820
  msgstr ""
821
 
822
+ #: libs/blockcountry-settings.php:1444
823
  msgid "Search Engines"
824
  msgstr ""
825
 
826
+ #: libs/blockcountry-settings.php:1445
827
  msgid "Tools"
828
  msgstr ""
829
 
830
+ #: libs/blockcountry-settings.php:1446
831
  msgid "Logging"
832
  msgstr ""
833
 
834
+ #: libs/blockcountry-settings.php:1447
835
  msgid "Import/Export"
836
  msgstr ""
lang/iqblockcountry-nl_NL.mo CHANGED
Binary file
lang/iqblockcountry-nl_NL.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: iQ Block Country\n"
4
- "POT-Creation-Date: 2015-10-07 17:06+0100\n"
5
- "PO-Revision-Date: 2015-10-07 17:07+0100\n"
6
  "Last-Translator: Pascal <pascal@redeo.nl>\n"
7
  "Language-Team: iQ Block Country <info@redeo.nl>\n"
8
  "Language: Dutch\n"
@@ -154,8 +154,8 @@ msgstr "Plugin naam"
154
  msgid "Version"
155
  msgstr "Versie"
156
 
157
- #: libs/blockcountry-settings.php:285 libs/blockcountry-settings.php:1326
158
- #: libs/blockcountry-settings.php:1369
159
  msgid "URL"
160
  msgstr "URL"
161
 
@@ -451,7 +451,7 @@ msgstr "Selecteer welke pagina's je wil blokkeren."
451
  #: libs/blockcountry-settings.php:678 libs/blockcountry-settings.php:732
452
  #: libs/blockcountry-settings.php:780 libs/blockcountry-settings.php:825
453
  #: libs/blockcountry-settings.php:953 libs/blockcountry-settings.php:1085
454
- #: libs/blockcountry-settings.php:1294
455
  msgid "Save Changes"
456
  msgstr "Bewaar wijzigingen"
457
 
@@ -786,94 +786,94 @@ msgstr ""
786
  "Dit is een experimentele optie. Je hebt geen API key nodig om deze plugin te "
787
  "laten werken."
788
 
789
- #: libs/blockcountry-settings.php:1278
790
- msgid "Log all visits to the backend:"
791
- msgstr "Log alle bezoekers op de achterkant:"
792
-
793
  #: libs/blockcountry-settings.php:1279
794
- msgid ""
795
- "This logs all visits to the backend despite if they are blocked or not. This "
796
- "is mainly for debugging purposes."
797
- msgstr ""
798
- "Dit logt alle bezoeken aan de achterkant ongeacht of de bezoeker werd "
799
- "geblokkeerd of niet. Dit is voornamelijk bedoeld voor fout opsporing."
800
-
801
- #: libs/blockcountry-settings.php:1286
802
  msgid "Accessibility options:"
803
  msgstr "Toegankelijkheids opties:"
804
 
805
- #: libs/blockcountry-settings.php:1287
806
  msgid "Set this option if you cannot use the default country selection box."
807
  msgstr ""
808
  "Selecteer deze optie indien je de landen standaard selectie methode niet "
809
  "kunt gebruiken. "
810
 
811
- #: libs/blockcountry-settings.php:1312
 
 
 
 
 
 
 
 
 
 
 
 
812
  msgid "Last blocked visits"
813
  msgstr "Laatste geblokkeerde bezoekers"
814
 
815
- #: libs/blockcountry-settings.php:1326
816
  msgid "Date / Time"
817
  msgstr "Datum / Tijd"
818
 
819
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1358
820
  msgid "IP Address"
821
  msgstr "IP adres"
822
 
823
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1358
824
  msgid "Hostname"
825
  msgstr "Hostnaam"
826
 
827
- #: libs/blockcountry-settings.php:1326 libs/blockcountry-settings.php:1345
828
  msgid "Country"
829
  msgstr "Land"
830
 
831
- #: libs/blockcountry-settings.php:1326
832
  msgid "Frontend/Backend"
833
  msgstr "Voorkant/Achterkant"
834
 
835
- #: libs/blockcountry-settings.php:1336 libs/blockcountry-settings.php:1438
836
  msgid "Frontend"
837
  msgstr "Voorkant"
838
 
839
- #: libs/blockcountry-settings.php:1336
840
  msgid "Backend banlist"
841
  msgstr "Achterkant banlist"
842
 
843
- #: libs/blockcountry-settings.php:1336
844
  msgid "Backend & Backend banlist"
845
  msgstr "Achterkant & Achterkant banlist"
846
 
847
- #: libs/blockcountry-settings.php:1336 libs/blockcountry-settings.php:1439
848
  msgid "Backend"
849
  msgstr "Achterkant"
850
 
851
- #: libs/blockcountry-settings.php:1343
852
  msgid "Top countries that are blocked"
853
  msgstr "Top landen welke zijn geblokkeerd"
854
 
855
- #: libs/blockcountry-settings.php:1345 libs/blockcountry-settings.php:1358
856
- #: libs/blockcountry-settings.php:1369
857
  msgid "# of blocked attempts"
858
  msgstr "# of geblokkeerde pogingen"
859
 
860
- #: libs/blockcountry-settings.php:1356
861
  msgid "Top hosts that are blocked"
862
  msgstr "Top hosts welke geblokkeerd zijn"
863
 
864
- #: libs/blockcountry-settings.php:1367
865
  msgid "Top URLs that are blocked"
866
  msgstr "Top URLs welke geblokkeerd zijn"
867
 
868
- #: libs/blockcountry-settings.php:1383
869
  msgid "Clear database"
870
  msgstr "Leeg database"
871
 
872
- #: libs/blockcountry-settings.php:1408
873
  msgid "Download as CSV file"
874
  msgstr "Download als een csv bestand."
875
 
876
- #: libs/blockcountry-settings.php:1415
877
  msgid ""
878
  "You are not logging any information. Please uncheck the option 'Do not log "
879
  "IP addresses' if this is not what you want."
@@ -881,35 +881,35 @@ msgstr ""
881
  "Je logt geen informatie. Deselecteer alstublieft de optie 'Log geen IP "
882
  "adressen' indien dit niet is wat je wilt."
883
 
884
- #: libs/blockcountry-settings.php:1437
885
  msgid "Home"
886
  msgstr "Home"
887
 
888
- #: libs/blockcountry-settings.php:1440
889
  msgid "Pages"
890
  msgstr "Pagina's"
891
 
892
- #: libs/blockcountry-settings.php:1441
893
  msgid "Categories"
894
  msgstr "Categorieen"
895
 
896
- #: libs/blockcountry-settings.php:1442
897
  msgid "Post types"
898
  msgstr "Post types"
899
 
900
- #: libs/blockcountry-settings.php:1443
901
  msgid "Search Engines"
902
  msgstr "Zoek machines"
903
 
904
- #: libs/blockcountry-settings.php:1444
905
  msgid "Tools"
906
  msgstr "Gereedschap"
907
 
908
- #: libs/blockcountry-settings.php:1445
909
  msgid "Logging"
910
  msgstr "Statistieken"
911
 
912
- #: libs/blockcountry-settings.php:1446
913
  msgid "Import/Export"
914
  msgstr "Importeren/Exporteren"
915
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: iQ Block Country\n"
4
+ "POT-Creation-Date: 2015-12-13 16:11+0100\n"
5
+ "PO-Revision-Date: 2015-12-13 16:12+0100\n"
6
  "Last-Translator: Pascal <pascal@redeo.nl>\n"
7
  "Language-Team: iQ Block Country <info@redeo.nl>\n"
8
  "Language: Dutch\n"
154
  msgid "Version"
155
  msgstr "Versie"
156
 
157
+ #: libs/blockcountry-settings.php:285 libs/blockcountry-settings.php:1327
158
+ #: libs/blockcountry-settings.php:1370
159
  msgid "URL"
160
  msgstr "URL"
161
 
451
  #: libs/blockcountry-settings.php:678 libs/blockcountry-settings.php:732
452
  #: libs/blockcountry-settings.php:780 libs/blockcountry-settings.php:825
453
  #: libs/blockcountry-settings.php:953 libs/blockcountry-settings.php:1085
454
+ #: libs/blockcountry-settings.php:1295
455
  msgid "Save Changes"
456
  msgstr "Bewaar wijzigingen"
457
 
786
  "Dit is een experimentele optie. Je hebt geen API key nodig om deze plugin te "
787
  "laten werken."
788
 
 
 
 
 
789
  #: libs/blockcountry-settings.php:1279
 
 
 
 
 
 
 
 
790
  msgid "Accessibility options:"
791
  msgstr "Toegankelijkheids opties:"
792
 
793
+ #: libs/blockcountry-settings.php:1280
794
  msgid "Set this option if you cannot use the default country selection box."
795
  msgstr ""
796
  "Selecteer deze optie indien je de landen standaard selectie methode niet "
797
  "kunt gebruiken. "
798
 
799
+ #: libs/blockcountry-settings.php:1286
800
+ msgid "Log all visits:"
801
+ msgstr "Log alle bezoekers:"
802
+
803
+ #: libs/blockcountry-settings.php:1287
804
+ msgid ""
805
+ "This logs all visits despite if they are blocked or not. This is only for "
806
+ "debugging purposes."
807
+ msgstr ""
808
+ "Dit logt alle bezoekers ondanks of ze geblokkeerd zijn of niet. Dit is "
809
+ "alleen voor debugging."
810
+
811
+ #: libs/blockcountry-settings.php:1313
812
  msgid "Last blocked visits"
813
  msgstr "Laatste geblokkeerde bezoekers"
814
 
815
+ #: libs/blockcountry-settings.php:1327
816
  msgid "Date / Time"
817
  msgstr "Datum / Tijd"
818
 
819
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1359
820
  msgid "IP Address"
821
  msgstr "IP adres"
822
 
823
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1359
824
  msgid "Hostname"
825
  msgstr "Hostnaam"
826
 
827
+ #: libs/blockcountry-settings.php:1327 libs/blockcountry-settings.php:1346
828
  msgid "Country"
829
  msgstr "Land"
830
 
831
+ #: libs/blockcountry-settings.php:1327
832
  msgid "Frontend/Backend"
833
  msgstr "Voorkant/Achterkant"
834
 
835
+ #: libs/blockcountry-settings.php:1337 libs/blockcountry-settings.php:1439
836
  msgid "Frontend"
837
  msgstr "Voorkant"
838
 
839
+ #: libs/blockcountry-settings.php:1337
840
  msgid "Backend banlist"
841
  msgstr "Achterkant banlist"
842
 
843
+ #: libs/blockcountry-settings.php:1337
844
  msgid "Backend & Backend banlist"
845
  msgstr "Achterkant & Achterkant banlist"
846
 
847
+ #: libs/blockcountry-settings.php:1337 libs/blockcountry-settings.php:1440
848
  msgid "Backend"
849
  msgstr "Achterkant"
850
 
851
+ #: libs/blockcountry-settings.php:1344
852
  msgid "Top countries that are blocked"
853
  msgstr "Top landen welke zijn geblokkeerd"
854
 
855
+ #: libs/blockcountry-settings.php:1346 libs/blockcountry-settings.php:1359
856
+ #: libs/blockcountry-settings.php:1370
857
  msgid "# of blocked attempts"
858
  msgstr "# of geblokkeerde pogingen"
859
 
860
+ #: libs/blockcountry-settings.php:1357
861
  msgid "Top hosts that are blocked"
862
  msgstr "Top hosts welke geblokkeerd zijn"
863
 
864
+ #: libs/blockcountry-settings.php:1368
865
  msgid "Top URLs that are blocked"
866
  msgstr "Top URLs welke geblokkeerd zijn"
867
 
868
+ #: libs/blockcountry-settings.php:1384
869
  msgid "Clear database"
870
  msgstr "Leeg database"
871
 
872
+ #: libs/blockcountry-settings.php:1409
873
  msgid "Download as CSV file"
874
  msgstr "Download als een csv bestand."
875
 
876
+ #: libs/blockcountry-settings.php:1416
877
  msgid ""
878
  "You are not logging any information. Please uncheck the option 'Do not log "
879
  "IP addresses' if this is not what you want."
881
  "Je logt geen informatie. Deselecteer alstublieft de optie 'Log geen IP "
882
  "adressen' indien dit niet is wat je wilt."
883
 
884
+ #: libs/blockcountry-settings.php:1438
885
  msgid "Home"
886
  msgstr "Home"
887
 
888
+ #: libs/blockcountry-settings.php:1441
889
  msgid "Pages"
890
  msgstr "Pagina's"
891
 
892
+ #: libs/blockcountry-settings.php:1442
893
  msgid "Categories"
894
  msgstr "Categorieen"
895
 
896
+ #: libs/blockcountry-settings.php:1443
897
  msgid "Post types"
898
  msgstr "Post types"
899
 
900
+ #: libs/blockcountry-settings.php:1444
901
  msgid "Search Engines"
902
  msgstr "Zoek machines"
903
 
904
+ #: libs/blockcountry-settings.php:1445
905
  msgid "Tools"
906
  msgstr "Gereedschap"
907
 
908
+ #: libs/blockcountry-settings.php:1446
909
  msgid "Logging"
910
  msgstr "Statistieken"
911
 
912
+ #: libs/blockcountry-settings.php:1447
913
  msgid "Import/Export"
914
  msgstr "Importeren/Exporteren"
915
 
libs/blockcountry-checks.php CHANGED
@@ -136,7 +136,7 @@ function iqblockcountry_check($country,$badcountries,$ip_address)
136
  }
137
 
138
 
139
- if ($blockcountry_is_login_page )
140
  {
141
  if (is_array($backendbanlistip) && in_array($ip_address,$backendbanlistip))
142
  {
@@ -249,7 +249,7 @@ function iqblockcountry_check($country,$badcountries,$ip_address)
249
  *
250
  */
251
  function iqblockcountry_CheckCountry() {
252
-
253
  $ip_address = iqblockcountry_get_ipaddress();
254
  $country = iqblockcountry_check_ipaddress($ip_address);
255
  global $blockcountry_is_login_page;
@@ -288,23 +288,25 @@ function iqblockcountry_CheckCountry() {
288
  if (empty($blocked)) { $blocked = 0; }
289
  $blocked++;
290
  update_option('blockcountry_backendnrblocks', $blocked);
291
- global $apiblacklist,$backendblacklistcheck;
292
  if (!get_option('blockcountry_logging'))
293
  {
294
  if (!$apiblacklist)
295
  {
296
  iqblockcountry_logging($ip_address, $country, "B");
 
297
  }
298
  elseif ($backendblacklistcheck && $apiblacklist)
299
  {
300
  iqblockcountry_logging($ip_address, $country, "T");
 
301
  }
302
  else
303
  {
304
- iqblockcountry_logging($ip_address, $country, "A");
 
305
  }
306
  }
307
-
308
  }
309
  else
310
  {
@@ -315,6 +317,7 @@ function iqblockcountry_CheckCountry() {
315
  if (!get_option('blockcountry_logging'))
316
  {
317
  iqblockcountry_logging($ip_address, $country, "F");
 
318
  }
319
  }
320
 
@@ -347,7 +350,15 @@ function iqblockcountry_CheckCountry() {
347
 
348
 
349
  exit ();
350
- }
 
 
 
 
 
 
 
 
351
  }
352
  }
353
 
@@ -365,9 +376,34 @@ function iqblockcountry_is_login_page() {
365
  $pos2 = strpos( $_SERVER['REQUEST_URI'], $aio['aiowps_login_page_slug'] );
366
  }
367
 
 
 
 
 
 
 
 
 
 
 
 
368
  $pos = strpos( $_SERVER['REQUEST_URI'], 'wp-login' );
369
  if ($pos !== false) { $found = TRUE; }
370
  elseif ($pos2 !== false) { $found = TRUE; }
371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  return $found;
373
  }
136
  }
137
 
138
 
139
+ if ($blockcountry_is_login_page || is_admin())
140
  {
141
  if (is_array($backendbanlistip) && in_array($ip_address,$backendbanlistip))
142
  {
249
  *
250
  */
251
  function iqblockcountry_CheckCountry() {
252
+
253
  $ip_address = iqblockcountry_get_ipaddress();
254
  $country = iqblockcountry_check_ipaddress($ip_address);
255
  global $blockcountry_is_login_page;
288
  if (empty($blocked)) { $blocked = 0; }
289
  $blocked++;
290
  update_option('blockcountry_backendnrblocks', $blocked);
291
+ global $apiblacklist,$backendblacklistcheck,$debughandled;
292
  if (!get_option('blockcountry_logging'))
293
  {
294
  if (!$apiblacklist)
295
  {
296
  iqblockcountry_logging($ip_address, $country, "B");
297
+ iqblockcountry_debug_logging($ip_address,$country,'BB');
298
  }
299
  elseif ($backendblacklistcheck && $apiblacklist)
300
  {
301
  iqblockcountry_logging($ip_address, $country, "T");
302
+ iqblockcountry_debug_logging($ip_address,$country,'TB');
303
  }
304
  else
305
  {
306
+ iqblockcountry_logging($ip_address, $country, "A");
307
+ iqblockcountry_debug_logging($ip_address,$country,'AB');
308
  }
309
  }
 
310
  }
311
  else
312
  {
317
  if (!get_option('blockcountry_logging'))
318
  {
319
  iqblockcountry_logging($ip_address, $country, "F");
320
+ iqblockcountry_debug_logging($ip_address,$country,'FB');
321
  }
322
  }
323
 
350
 
351
 
352
  exit ();
353
+ }
354
+ else
355
+ {
356
+ iqblockcountry_debug_logging($ip_address,$country,'NB');
357
+ }
358
+ }
359
+ else
360
+ {
361
+ iqblockcountry_debug_logging($ip_address,$country,'NB');
362
  }
363
  }
364
 
376
  $pos2 = strpos( $_SERVER['REQUEST_URI'], $aio['aiowps_login_page_slug'] );
377
  }
378
 
379
+ if ( is_plugin_active( 'lockdown-wp-admin/lockdown-wp-admin.php' ) ) {
380
+ $ld = get_option('ld_login_base');
381
+ $pos2 = strpos( $_SERVER['REQUEST_URI'], $ld);
382
+ }
383
+
384
+ if ( is_plugin_active( 'wp-simple-firewall/icwp-wpsf.php' ) ) {
385
+ $wpsf = get_option('icwp_wpsf_loginprotect_options');
386
+ $pos2 = strpos( $_SERVER['REQUEST_URI'], $wpsf['rename_wplogin_path'] );
387
+ }
388
+
389
+
390
  $pos = strpos( $_SERVER['REQUEST_URI'], 'wp-login' );
391
  if ($pos !== false) { $found = TRUE; }
392
  elseif ($pos2 !== false) { $found = TRUE; }
393
 
394
+ return $found;
395
+ }
396
+
397
+
398
+ /*
399
+ * Check if page is within wp-admin page
400
+ */
401
+ function iqblockcountry_is_admin() {
402
+ $found = FALSE;
403
+
404
+
405
+ $pos = strpos( $_SERVER['REQUEST_URI'], '/wp-admin/' );
406
+ if ($pos !== false) { $found = TRUE; }
407
+
408
  return $found;
409
  }
libs/blockcountry-logging.php CHANGED
@@ -19,6 +19,7 @@ function iqblockcountry_install_db() {
19
  dbDelta( $sql );
20
  }
21
 
 
22
  function iqblockcountry_uninstall_db() {
23
  global $wpdb;
24
 
@@ -52,16 +53,17 @@ function iqblockcountry_update_db_check() {
52
  function iqblockcountry_install_loggingdb() {
53
  global $wpdb;
54
 
55
- $table_name = $wpdb->prefix . "iqblock_logging_backend";
56
 
57
  $sql = "CREATE TABLE $table_name (
58
  id bigint(20) NOT NULL AUTO_INCREMENT,
59
  datetime datetime NOT NULL,
60
  ipaddress tinytext NOT NULL,
 
61
  country tinytext NOT NULL,
62
  url varchar(250) DEFAULT '/' NOT NULL,
63
- banned enum('NH','WL') NOT NULL,
64
- UNIQUE KEY id (id)
65
  );";
66
 
67
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
@@ -71,7 +73,7 @@ function iqblockcountry_install_loggingdb() {
71
  function iqblockcountry_uninstall_loggingdb() {
72
  global $wpdb;
73
 
74
- $table_name = $wpdb->prefix . "iqblock_logging_backend";
75
 
76
  $sql = "DROP TABLE IF EXISTS `$table_name`;";
77
 
@@ -84,7 +86,7 @@ function iqblockcountry_clean_loggingdb()
84
  {
85
  global $wpdb;
86
 
87
- $table_name = $wpdb->prefix . "iqblock_logging_db";
88
  $sql = "DELETE FROM " . $table_name . " WHERE DATE_SUB(CURDATE(),INTERVAL 14 DAY) >= datetime;";
89
  $wpdb->query($sql);
90
  }
@@ -92,7 +94,7 @@ function iqblockcountry_clean_loggingdb()
92
  /*
93
  * Schedule debug logging if this option was set in the admin panel
94
  */
95
- function iqblockcountry_blockcountry_backendlogging($old_value, $new_value)
96
  {
97
  if ($old_value !== $new_value)
98
  {
@@ -112,18 +114,22 @@ function iqblockcountry_logging($ipaddress,$country,$banend)
112
  {
113
  global $wpdb;
114
 
115
- $urlRequested = (isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '/' );
116
 
117
  $table_name = $wpdb->prefix . "iqblock_logging";
118
  $wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
119
  }
120
 
121
- function iqblockcountry_logging_backend($ipaddress,$country,$banend)
122
  {
123
- global $wpdb;
 
 
124
 
125
- $urlRequested = (isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '/' );
 
126
 
127
- $table_name = $wpdb->prefix . "iqblock_logging_backend";
128
- $wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
 
129
  }
19
  dbDelta( $sql );
20
  }
21
 
22
+
23
  function iqblockcountry_uninstall_db() {
24
  global $wpdb;
25
 
53
  function iqblockcountry_install_loggingdb() {
54
  global $wpdb;
55
 
56
+ $table_name = $wpdb->prefix . "iqblock_debug_logging";
57
 
58
  $sql = "CREATE TABLE $table_name (
59
  id bigint(20) NOT NULL AUTO_INCREMENT,
60
  datetime datetime NOT NULL,
61
  ipaddress tinytext NOT NULL,
62
+ type tinytext NOT NULL,
63
  country tinytext NOT NULL,
64
  url varchar(250) DEFAULT '/' NOT NULL,
65
+ banned enum('NH','NB','FB','BB','AB','TB') NOT NULL,
66
+ PRIMARY KEY id (id)
67
  );";
68
 
69
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
73
  function iqblockcountry_uninstall_loggingdb() {
74
  global $wpdb;
75
 
76
+ $table_name = $wpdb->prefix . "iqblock_debug_logging";
77
 
78
  $sql = "DROP TABLE IF EXISTS `$table_name`;";
79
 
86
  {
87
  global $wpdb;
88
 
89
+ $table_name = $wpdb->prefix . "iqblock_debug_logging";
90
  $sql = "DELETE FROM " . $table_name . " WHERE DATE_SUB(CURDATE(),INTERVAL 14 DAY) >= datetime;";
91
  $wpdb->query($sql);
92
  }
94
  /*
95
  * Schedule debug logging if this option was set in the admin panel
96
  */
97
+ function iqblockcountry_blockcountry_debuglogging($old_value, $new_value)
98
  {
99
  if ($old_value !== $new_value)
100
  {
114
  {
115
  global $wpdb;
116
 
117
+ $urlRequested = (isset($_SERVER["REQUEST_URI"]) ? htmlspecialchars($_SERVER["REQUEST_URI"]) : '/' );
118
 
119
  $table_name = $wpdb->prefix . "iqblock_logging";
120
  $wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
121
  }
122
 
123
+ function iqblockcountry_debug_logging($ipaddress,$country,$banend)
124
  {
125
+ if (get_option('blockcountry_debuglogging'))
126
+ {
127
+ global $wpdb;
128
 
129
+ $urlRequested = (isset($_SERVER["REQUEST_URI"]) ? htmlspecialchars($_SERVER["REQUEST_URI"]) : '/' );
130
+ $type = htmlspecialchars($_SERVER['REQUEST_METHOD']);
131
 
132
+ $table_name = $wpdb->prefix . "iqblock_debug_logging";
133
+ $wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'type' => $type, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
134
+ }
135
  }
libs/blockcountry-settings.php CHANGED
@@ -93,7 +93,7 @@ function iqblockcountry_register_mysettings()
93
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_geoapikey','iqblockcountry_check_geoapikey');
94
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_geoapilocation');
95
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_apikey','iqblockcountry_check_adminapikey');
96
- register_setting ( 'iqblockcountry-settings-group', 'blockcountry_backendlogging');
97
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_accessibility');
98
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_logging');
99
  register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_blockbackend' );
@@ -129,7 +129,7 @@ function iqblockcountry_get_options_arr() {
129
  'blockcountry_blockmessage','blockcountry_blocklogin','blockcountry_blockfrontend','blockcountry_blockbackend','blockcountry_header',
130
  'blockcountry_blockpages','blockcountry_pages','blockcountry_blockcategories','blockcountry_categories','blockcountry_tracking',
131
  'blockcountry_blockhome','blockcountry_nrstatistics','blockcountry_geoapikey','blockcountry_geoapilocation','blockcountry_apikey',
132
- 'blockcountry_redirect','blockcountry_redirect_url','blockcountry_allowse','blockcountry_backendlogging','blockcountry_buffer',
133
  'blockcountry_accessibility','blockcountry_logging','blockcountry_blockposttypes','blockcountry_posttypes','blockcountry_blocksearch');
134
  return apply_filters( 'iqblockcountry_options', $optarr );
135
  }
@@ -191,7 +191,7 @@ function iqblockcountry_uninstall() //deletes all the database entries that the
191
  delete_option('blockcountry_redirect');
192
  delete_option('blockcountry_redirect_url');
193
  delete_option('blockcountry_allowse');
194
- delete_option('blockcountry_backendlogging');
195
  delete_option('blockcountry_buffer');
196
  delete_option('blockcountry_accessibility');
197
  delete_option('blockcountry_logging');
@@ -1273,14 +1273,7 @@ if (is_file(IPV4DBFILE)) {
1273
  <td width="70%">
1274
  <input type="text" size="25" name="blockcountry_apikey" value="<?php echo get_option ( 'blockcountry_apikey' );?>">
1275
  </td></tr>
1276
- <!--
1277
- <tr valign="top">
1278
- <th width="30%"><?php _e('Log all visits to the backend:', 'iq-block-country'); ?><br />
1279
- <em><?php _e('This logs all visits to the backend despite if they are blocked or not. This is mainly for debugging purposes.', 'iq-block-country'); ?></em></th>
1280
- <td width="70%">
1281
- <input type="checkbox" name="blockcountry_backendlogging" <?php checked('on', get_option('blockcountry_backendlogging'), true); ?> />
1282
- </td></tr>
1283
- -->
1284
 
1285
  <tr valign="top">
1286
  <th width="30%"><?php _e('Accessibility options:', 'iq-block-country'); ?><br />
@@ -1288,6 +1281,14 @@ if (is_file(IPV4DBFILE)) {
1288
  <td width="70%">
1289
  <input type="checkbox" name="blockcountry_accessibility" <?php checked('on', get_option('blockcountry_accessibility'), true); ?> />
1290
  </td></tr>
 
 
 
 
 
 
 
 
1291
 
1292
  <tr><td></td><td>
1293
  <p class="submit"><input type="submit" class="button-primary"
@@ -1385,7 +1386,7 @@ function iqblockcountry_settings_logging()
1385
 
1386
  if ( isset($_POST['action']) && $_POST[ 'action' ] == 'cleardatabase') {
1387
  if (!isset($_POST['cleardatabase_nonce'])) die("Failed security check.");
1388
- if (!wp_verify_nonce($_POST['cleardatabase_nonce'],'cleardatabase_nonce')) die("Is this a CSRF attempts?");
1389
  global $wpdb;
1390
  $table_name = $wpdb->prefix . "iqblock_logging";
1391
  $sql = "TRUNCATE " . $table_name . ";";
93
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_geoapikey','iqblockcountry_check_geoapikey');
94
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_geoapilocation');
95
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_apikey','iqblockcountry_check_adminapikey');
96
+ register_setting ( 'iqblockcountry-settings-group', 'blockcountry_debuglogging');
97
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_accessibility');
98
  register_setting ( 'iqblockcountry-settings-group', 'blockcountry_logging');
99
  register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_blockbackend' );
129
  'blockcountry_blockmessage','blockcountry_blocklogin','blockcountry_blockfrontend','blockcountry_blockbackend','blockcountry_header',
130
  'blockcountry_blockpages','blockcountry_pages','blockcountry_blockcategories','blockcountry_categories','blockcountry_tracking',
131
  'blockcountry_blockhome','blockcountry_nrstatistics','blockcountry_geoapikey','blockcountry_geoapilocation','blockcountry_apikey',
132
+ 'blockcountry_redirect','blockcountry_redirect_url','blockcountry_allowse','blockcountry_debuglogging','blockcountry_buffer',
133
  'blockcountry_accessibility','blockcountry_logging','blockcountry_blockposttypes','blockcountry_posttypes','blockcountry_blocksearch');
134
  return apply_filters( 'iqblockcountry_options', $optarr );
135
  }
191
  delete_option('blockcountry_redirect');
192
  delete_option('blockcountry_redirect_url');
193
  delete_option('blockcountry_allowse');
194
+ delete_option('blockcountry_debuglogging');
195
  delete_option('blockcountry_buffer');
196
  delete_option('blockcountry_accessibility');
197
  delete_option('blockcountry_logging');
1273
  <td width="70%">
1274
  <input type="text" size="25" name="blockcountry_apikey" value="<?php echo get_option ( 'blockcountry_apikey' );?>">
1275
  </td></tr>
1276
+
 
 
 
 
 
 
 
1277
 
1278
  <tr valign="top">
1279
  <th width="30%"><?php _e('Accessibility options:', 'iq-block-country'); ?><br />
1281
  <td width="70%">
1282
  <input type="checkbox" name="blockcountry_accessibility" <?php checked('on', get_option('blockcountry_accessibility'), true); ?> />
1283
  </td></tr>
1284
+
1285
+ <tr valign="top">
1286
+ <th width="30%"><?php _e('Log all visits:', 'iq-block-country'); ?><br />
1287
+ <em><?php _e('This logs all visits despite if they are blocked or not. This is only for debugging purposes.', 'iq-block-country'); ?></em></th>
1288
+ <td width="70%">
1289
+ <input type="checkbox" name="blockcountry_debuglogging" <?php checked('on', get_option('blockcountry_debuglogging'), true); ?> />
1290
+ </td></tr>
1291
+
1292
 
1293
  <tr><td></td><td>
1294
  <p class="submit"><input type="submit" class="button-primary"
1386
 
1387
  if ( isset($_POST['action']) && $_POST[ 'action' ] == 'cleardatabase') {
1388
  if (!isset($_POST['cleardatabase_nonce'])) die("Failed security check.");
1389
+ if (!wp_verify_nonce($_POST['cleardatabase_nonce'],'cleardatabase_nonce')) die("Is this a CSRF attempt?");
1390
  global $wpdb;
1391
  $table_name = $wpdb->prefix . "iqblock_logging";
1392
  $sql = "TRUNCATE " . $table_name . ";";
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: iqpascal
3
  Donate link: http://www.redeo.nl/plugins/donate
4
  Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
5
  Requires at least: 3.5.2
6
- Tested up to: 4.3
7
- Stable tag: 1.1.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -169,6 +169,12 @@ You can select the option on the home tab "Do not log IP addresses" to stop iQ B
169
 
170
  == Changelog ==
171
 
 
 
 
 
 
 
172
  = 1.1.23 =
173
 
174
  * Bugfix: Fixed bug if cURL was not present in PHP version
3
  Donate link: http://www.redeo.nl/plugins/donate
4
  Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
5
  Requires at least: 3.5.2
6
+ Tested up to: 4.4
7
+ Stable tag: 1.1.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
169
 
170
  == Changelog ==
171
 
172
+ = 1.1.24 =
173
+
174
+ * New: Added support for Lockdown WordPress Admin
175
+ * New: Added support for WordPress Security Firewall
176
+ * Change: Various small changes
177
+
178
  = 1.1.23 =
179
 
180
  * Bugfix: Fixed bug if cURL was not present in PHP version