Thanks for your work on this plugin. We are noticing the following fatal error in the PHP error logs using PHP 8 on the latest WordPress version 6.1.1:
PHP message: Warning: Attempt to read property "roles" on bool in /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php on line 405 [/wp-admin/admin-ajax.php] [wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php:301 PPM_WP_Options->user_role_policy(), wp-content/plugins/password-policy-manager/app/class-ppm-wp.php:331 PPM_WP_Options->init(), wp-includes/class-wp-hook.php:308 PPM_WP->init(), wp-includes/class-wp-hook.php:332 WP_Hook->apply_filters(), wp-includes/plugin.php:517 WP_Hook->do_action(), wp-settings.php:617 do_action('init'), wp-config.php:53 require_once('wp-settings.php'), wp-load.php:50 require_once('wp-config.php'), wp-admin/admin-ajax.php:22 require_once('wp-load.php')]
PHP message: PHP Fatal error: Uncaught TypeError: reset(): Argument #1 ($array) must be of type array, null given in /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php:406
Stack trace:
#0 /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php(406): reset(NULL)
#1 /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php(301): PPM_WP_Options->user_role_policy()
#2 /var/www/wp-content/plugins/password-policy-manager/app/class-ppm-wp.php(331): PPM_WP_Options->init()
#3 /var/www/wp-includes/class-wp-hook.php(308): PPM_WP->init('')
#4 /var/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /var/www/wp-settings.php(617): do_action('init')
#7 /var/www/wp-config.php(53): require_once('/var/www/wp-set...')
#8 /var/www/wp-load.php(50): require_once('/var/www/wp-con...')
#9 /var/www/wp-admin/admin-ajax.php(22): require_once('/var/www/wp-loa....
PHP message: Fatal error: Uncaught TypeError: reset(): Argument #1 ($array) must be of type array, null given in /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php:406
Stack trace:
#0 /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php(406): reset(NULL)
#1 /var/www/wp-content/plugins/password-policy-manager/app/policies/class-ppm-wp-options.php(301): PPM_WP_Options->user_role_policy()
#2 /var/www/wp-content/plugins/password-policy-manager/app/class-ppm-wp.php(331): PPM_WP_Options->init()
#3 /var/www/wp-includes/class-wp-hook.php(308): PPM_WP->init('')
#4 /var/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /var/www/wp-settings.php(617): do_action('init')
#7 /var/www/wp-config.php(53): require_once('/var/www/wp-set...')
#8 /var/www/wp-load.php(50): require_once('/var/www/wp-con...')
#9 /var/www/wp-admin/admin-ajax.php(22): require_once('/var/www/wp-loa...')
I’m not sure the steps to reproduce the issue, but I hope this helps. Thanks!
~James
]]>This is caused by the line
require('api'.DIRECTORY_SEPARATOR.'api.php');
in function moppm_includes
of class MOPPM
.
The CiviCRM plugin also has a file api/api.php
resulting in this file being loaded twice.
This can be fixed by using absolute paths:
require plugin_dir_path(__FILE__) . 'api' . DIRECTORY_SEPARATOR . 'api.php';
(Thanks to @haystack on https://chat.civicrm.org for diagnosing this.)
]]>How does Wordfence define a strong password?
From Wordfence documentation:
Wordfence checks that the password is a minimum length and that it doesn’t match any known obvious passwords. It then uses a point system to allocate points based on things like whether it contains a number, if it has upper and lower case letters, and special characters. If the point score does not exceed a required level, then it will reject the password the user entered.
But what does Wordfence consider to be “minimum length”, which list of “obvious passwords” is used, what is the required points level?
I could not immediately find that information in the documentation or on the forum
Thanks,
]]>nice plugin. Can we add more characters like [@, #, $, % etc] ?
Do you have any hook or functions for that?
Florian
]]>