Skip to content

Commit

Permalink
Validated with WordPress 6.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
joho1968 committed Apr 29, 2024
1 parent f806d55 commit ce4da46
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 254 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The plugin also plays nicely with Fail2ban, which is an advanced way of blocking
### Other notes

* This plugin `may` work with earlier versions of WordPress
* This plugin has been tested with `WordPress 5.5+ and 6.2.x` at the time of this writing
* This plugin has been tested with `WordPress 5.5+ and 6.5.x` at the time of this writing
* This plugin has been tested with `PHP 7.2, 7.4, and 8.1.20` at the time of this writing
* This plugin optionally makes use of `mb_` PHP functions
* This plugin may create entries in your PHP error log (if active)
Expand Down Expand Up @@ -69,6 +69,10 @@ This is a hard question to answer. There are no known incompatibilities.

## Changelog

### 1.2.1
* Verified with WordPress 6.5.2
* Updated "About" information

### 1.2.0
* Verified with WordPress 6.2.2 and PHP 8.1.20
* Added support for allow/deny list for login (IP address, hostname with wildcard support)
Expand Down Expand Up @@ -96,6 +100,9 @@ This is a hard question to answer. There are no known incompatibilities.

## Upgrade Notice

### 1.2.1
* Install the new version, no changes have been made to settings.

### 1.2.0
* Install the new version and walk through the settings.
* Check your fail2ban configuration against the supplied sample `fail2wp.conf`!
Expand All @@ -113,7 +120,7 @@ This is a hard question to answer. There are no known incompatibilities.

Please see [LICENSE](LICENSE) for a full copy of GPLv2

Copyright (C) 2020, 2021, 2022, 2023 [Joaquim Homrighausen](https://github.com/joho1968); all rights reserved.
Copyright (C) 2020, 2021, 2022, 2023, 2024 [Joaquim Homrighausen](https://github.com/joho1968); all rights reserved.

This file is part of Fail2WP. Fail2WP is free software.

Expand Down
465 changes: 231 additions & 234 deletions fail2wp/fail2wp.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fail2wp/includes/class-fail2wp-syslog.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @author Joaquim Homrighausen <[email protected]>
*
* class-fail2wp-syslog.php
* Copyright (C) 2021, 2022 Joaquim Homrighausen; all rights reserved.
* Copyright (C) 2021,2022,2023,2024 Joaquim Homrighausen; all rights reserved.
* Development sponsored by WebbPlatsen i Sverige AB, www.webbplatsen.se
*
* This file is part of Fail2WP. Fail2WP is free software.
Expand Down
9 changes: 4 additions & 5 deletions fail2wp/includes/fail2wp_misc.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @author Joaquim Homrighausen <[email protected]>
*
* fail2wp_misc.inc.php
* Copyright (C) 2021, 2022, 2023 Joaquim Homrighausen; all rights reserved.
* Copyright (C) 2021,2022,2023,2024 Joaquim Homrighausen; all rights reserved.
* Development sponsored by WebbPlatsen i Sverige AB, www.webbplatsen.se
*
* This file is part of Fail2WP. Fail2WP is free software.
Expand All @@ -34,19 +34,19 @@
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: (misc) WPINC not defined ' );
}
die;
die;
}
if ( ! defined( 'ABSPATH' ) ) {
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: (misc) ABSPATH not defined ' );
}
die( '-1' );
die( '-1' );
}
if ( ! defined( 'FAIL2WP_WORDPRESS_PLUGIN' ) ) {
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: (misc) FAIL2WP_WORDPRESS_PLUGIN not defined ' );
}
die( '-1' );
die( '-1' );
}


Expand All @@ -58,7 +58,6 @@
* @since 1.1.0
*/
function fail2wp_misc_delete_all_settings() {

if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: ' . __FUNCTION__ . ' start' );
}
Expand Down
Binary file modified fail2wp/languages/fail2wp-sv_SE.mo
Binary file not shown.
24 changes: 20 additions & 4 deletions fail2wp/languages/fail2wp-sv_SE.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Fail2WP WordPress plugin <sv_SE> translation
# Copyright (C) 2021, 2022, 2023 Joaquim Homrighausen
# Copyright (C) 2021,2022,2023,2024 Joaquim Homrighausen
# This file is distributed under the same license as the Fail2WP package.
# Joaquim Homrighausen <[email protected]>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: fail2wp 1.2.0\n"
"Project-Id-Version: fail2wp 1.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-08 15:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2024-04-29 11:45+0100\n"
"Last-Translator: Joaquim Homrighausen <[email protected]>\n"
"Language-Team: SWEDISH <[email protected]>\n"
"Language: sv_SE\n"
Expand Down Expand Up @@ -439,6 +439,22 @@ msgstr ""
msgid "There is more documentation available at"
msgstr "Det finns mer dokumentation på"

#: fail2wp.php:1669
msgid "Other plugins"
msgstr "Andra tillägg"

#: fail2wp.php:1673
msgid ""
"Plugin that provides integration with Mattermost, including notifications "
"and OAuth2 authentication"
msgstr ""
"Ett tillägg som integrerar WordPress med Mattermost, inklusive aviseringar "
"och OAuth2-autentisering"

#: fail2wp.php:1678
msgid "Plugin that provides uncomplicated map functionality"
msgstr "Ett tillägg som tillhandahåller okomplicerad kartfunktionalitet"

#: fail2wp.php:1375 fail2wp.php:1705
msgid "Remove generator info"
msgstr "Inaktivera generatorinfo"
Expand Down Expand Up @@ -742,7 +758,7 @@ msgid ""
"here, the login will be denied"
msgstr ""
"Om denna lista används, och besökarens IP-adress inte matchar någon av "
"posterna här, så kommer inloggning inte tillåtas"
"posterna här, så kommer inloggning inte tillåtas"

#: fail2wp.php:2131
msgid "IPs matching these addresses will be prevented from logging in"
Expand Down
20 changes: 17 additions & 3 deletions fail2wp/languages/fail2wp.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Fail2WP WordPress plugin <LANGUAGE> translation
# Copyright (C) 2021, 2022, 2023 Joaquim Homrighausen
# Copyright (C) 2021,2022,2023,2024 Joaquim Homrighausen
# This file is distributed under the same license as the Fail2WP package.
# Joaquim Homrighausen <[email protected]>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: fail2wp 1.2.0\n"
"Project-Id-Version: fail2wp 1.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-08 15:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2024-04-29 11:45+0100\n"
"Last-Translator: Joaquim Homrighausen <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
Expand Down Expand Up @@ -248,6 +248,20 @@ msgstr ""
msgid "There is more documentation available at"
msgstr ""

#: fail2wp.php:1669
msgid "Other plugins"
msgstr ""

#: fail2wp.php:1673
msgid ""
"Plugin that provides integration with Mattermost, including notifications "
"and OAuth2 authentication"
msgstr ""

#: fail2wp.php:1678
msgid "Plugin that provides uncomplicated map functionality"
msgstr ""

#: fail2wp.php:1374 fail2wp.php:1699
msgid "Site label"
msgstr ""
Expand Down
10 changes: 5 additions & 5 deletions fail2wp/uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @author Joaquim Homrighausen <[email protected]>
*
* uninstall.php
* Copyright (C) 2021, 2022, 2023 Joaquim Homrighausen; all rights reserved.
* Copyright (C) 2021,2022,2023,2024 Joaquim Homrighausen; all rights reserved.
* Development sponsored by WebbPlatsen i Sverige AB, www.webbplatsen.se
*
* This file is part of Fail2WP. Fail2WP is free software.
Expand Down Expand Up @@ -38,28 +38,28 @@
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: init' );
}
exit;
exit;
}
// If action is not to uninstall, then exit
if ( empty( $_REQUEST['action'] ) || $_REQUEST['action'] !== 'delete-plugin' ) {
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: REQUEST["action"] is not delete-plugin' );
}
exit;
exit;
}
// If it's not us, then exit
if ( empty( $_REQUEST['slug'] ) || $_REQUEST['slug'] !== 'fail2wp' ) {
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: REQUEST["slug"] is not fail2wp' );
}
exit;
exit;
}
// If we shouldn't do this, then exit
if ( ! current_user_can( 'manage_options' ) || ! current_user_can( 'delete_plugins' ) ) {
if ( defined( 'FAIL2WP_UNINSTALL_TRACE' ) ) {
error_log( 'fail2wp-uninstall: User is not allowed to manage/uninstall plugins' );
}
exit;
exit;
}

// Figure out if an uninstall should remove plugin settings
Expand Down

0 comments on commit ce4da46

Please sign in to comment.