這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Disallow Pwned Password

外掛說明

Disallow WordPress and WooCommerce users using pwned passwords.

Goal

Spoiler Alert: User passwords never leave your server, not even in hashed form.

Although reusing passwords is solely users’ fault but when evil attackers brute forced users’ passwords, and stole all their personal information or spent users’ hard earn money through your site. Those lazy users blame you, the site owner/developer.

When processing requests to establish and change memorized secrets, verifiers SHALL compare the prospective secrets against a list that contains values known to be commonly-used, expected, or compromised. For example,…

  • Passwords obtained from previous breach corpuses

NIST Digital Identity Guidelines

This plugin’s solely purpose is to disallow WordPress and WooCommerce users reusing passwords listed in Have I Been Pwned database.

Usage

Activate and forget.

This plugin intercepts when:

  • creating new users on /wp-admin/user-new.php
  • changing other users’ passwords on /wp-admin/user-edit.php
  • changing your password on /wp-admin/profile.php
  • new user registration on /wp-login.php?action=rp

Additional interceptions if WooCommerce is installed:

Explain It Like I’m Five

  • Troy Hunt, a well-kown security expert, collected 6,493,641,194 (and counting) pwned passwords from previous security breaches
  • Pwned passwords stored as SHA-1 hashes on haveibeenpwned.com
  • Whenever WordPress / WooCommerce users attempt to change their passwords, this plugin hashes the user password
  • Take the first 5 characters from the hash
  • Ask haveibeenpwned.com for all pwned passwords with the same first 5 hash characters
  • Check how many times the user password appears on the have I been pwned database
  • Disallow the password change if it has been pwned

Users aged older than five could learn more from:

For Developers

Fork the plugin on GitHub.

螢幕擷圖

  • WordPress
  • WooCommerce

常見問題集

What are the minimum requirements?
  • PHP v7.0
  • WordPress v4.9.8
  • (Optional) WooCommerce v3.4.4
Did you just send all the passwords to someone else?

No. User passwords never leave your server, not even in hashed form.

How do you compare user passwords with the 6,493,641,194 pwned ones?

Curious users can learn more from:

Paranoia users should check the plugin implementation.

What to do if I don’t trust haveibeenpwned.com?

Troy Hunt is a well-kown security expert. You should trust him more than me (the plugin author).
Anyways, you can replace the default API client with yours:

<?php

use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\ClientInterface;
use League\Container\Container;

class YourCustomClient implements ClientInterface
{
    // Your implementation.
}

add_action('i_dpp_register', function (Container $container): void {
    $container->add(ClientInterface::class, YourCustomClient::class);
});

This plugin uses league/container. Learn more from its documents.

What to do if I don’t trust the plugin author?

Good question! You shouldn’t blindly trust any random security guide/plugin from the scary internet – including this one!

Review the plugin implementation.

I have installed this plugin. Does it mean my WordPress site is *unhackable*?

No website is unhackable.

To have a secure WordPress site, you have to keep all these up-to-date:

  • WordPress core
  • PHP
  • this plugin
  • all other WordPress themes and plugins
  • everything on the server
  • other security practices
  • your mindset

Strongly recommended:

  • WP Password Argon Two – Securely store WordPress user passwords in database with Argon2i hashing and SHA-512 HMAC using PHP’s native functions
  • WP Cloudflare Guard – Connecting WordPress with Cloudflare firewall, protect your WordPress site at DNS level. Automatically create firewall rules to block dangerous IPs
  • Two-Factor
  • wp-password-bcrypt
Can strong passwords been pwned?

Yes. Example:

How to disable WooCommerce password strength meter?

For testing only, use at your own risk!

add_action('wp_print_scripts', function () {
    wp_dequeue_script('wc-password-strength-meter');
}, 10000);
Will you add support for older PHP versions?

Never! This plugin will only works on actively supported PHP versions.

Don’t use it on end of life or security fixes only PHP versions.

Note: Current version supports PHP 7.0 because wordpress.org svn pre-commit hook rejects PHP 7.1+ syntax. However, you should not use PHP 7.0 because it has reached end of life since 10 January 2019.

It looks awesome. Where can I find some more goodies like this?
Besides wp.org, where can I give a ★★★★★ review?

Thanks! Glad you like it. It’s important to let my boss knows somebody is using this project. Please consider:

Where to report security related issues?

If you discover any security related issues, please email hello@itineris.co.uk instead of using the issue tracker.

使用者評論

閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Disallow Pwned Password〉的開發相關工作。

參與者

〈Disallow Pwned Password〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Disallow Pwned Password〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

Please see CHANGELOG for more information on what has changed recently.