Linux 软件免费装
Banner图

OpenPorte Spam Protection

开发者 huygens-25
更新时间 2026年11月13日 21:08
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

privacy captcha anti-spam self-hosted proof-of-work

下载

1.30.3 1.30.2 1.27.1 1.27.2 1.27.3 1.28.0 1.28.1 1.29.0 1.29.1 1.30.0 1.30.1

详情介绍:

OpenPorte is a free and open-source WordPress plugin that protects forms, comments, logins, registrations, and WooCommerce from spam and bots using lightweight Proof-of-Work challenges instead of CAPTCHAs. The goal is simple: make spam attempts computationally costly for bots while keeping the experience unobtrusive for legitimate visitors and respecting their privacy. Key benefits OpenPorte is built around the open-source ALTCHA widget. It is a community-driven project committed to openness, transparency, privacy, and long-term stewardship. For the list of contributors, see the GitHub contributors page. AI-assisted development OpenPorte is an AI-assisted project. I remain responsible for its architecture, security decisions, and final review. AI tools (Claude, Mistral, local LLMs and others) assist with drafting code, tests, translations, and documentation. Without these tools, maintaining and developing a project of this scope as a single contributor would be difficult. AI assistance helps me keep the project moving forward, while responsibility for its quality and security remains mine.

安装:

Download, install and activate OpenPorte Spam Protection. Alternatively, install the plugin manually:
  1. Download the .zip from the Releases.
  2. Upload openporte folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Review the settings and enable your integrations

屏幕截图:

  • Configuration
  • Protection on the login page
  • Protection with WooCommerce
  • Floating UI Captcha

升级注意事项:

1.30.3 Security release, update now (GHSA-hvr5-q69x-jp62): visitors could run any shortcode through Contact Form 7 and HTML Forms. Other plugins' shortcodes no longer render inside those forms. If you relied on that, read the FAQ. 1.30.2 WooCommerce: fixes accounts created at checkout being refused. These accounts are not challenged yet; only the My Account registration form is. Protection at checkout is planned for 1.31.0. 1.30.1 Security release; please update. Gravity Forms: move the OpenPorte field of a multi-page form to its last page, or the form refuses submissions. LiteSpeed Cache: purge your page cache once after updating (LiteSpeed Cache → Purge All). 1.30.0 Security release: fixes to challenge expiry, login protection and several integrations; please update. Also adds a Self-hosted transport setting (REST API or admin-ajax.php) for sites whose security plugin blocks the REST API. Existing sites keep the REST API. 1.29.0 Solved challenges can no longer be replayed without limit. The new "Replay limit" setting (default 5) bounds how often one is accepted; no action needed, and resubmitting after a form error still works. Developers: call verify(), not verify_solution() or verify_server_signature(). 1.28.1 This update is only about the new GitHub location and descriptions. Please view the preceding 1.28.0 upgrade notice if you upgraded from an earlier release. 1.28.0 "Custom HTML" is deprecated and switched off by this upgrade. Sites using the <altcha-widget> tags (in theme templates or custom HTML) are concerned. If affected, re-enable the setting, or replace those tags with the [openporte] shortcode. The paid spam-filter classifier is removed.

常见问题:

Is placing the [openporte] shortcode enough to protect a form?

Not on its own. The shortcode displays the widget; the verification that rejects unsolved submissions is performed by the integration for that form plugin. For a supported plugin, enable its toggle under Settings → OpenPorte → Integrations as well. Two integrations go further: with Contact Form 7 and HTML Forms, a widget you placed in the form yourself (the shortcode or a hand-written tag) is verified even while the toggle is off. In a form plugin OpenPorte has no integration for, the shortcode still shows the widget and visitors still have to tick it, but nothing checks the result on the server — a bot posting directly to the form's endpoint is not stopped. See Supported Integrations for the list.

Shortcodes in my Contact Form 7 or HTML Forms form stopped working. Why?

Since 1.30.3, OpenPorte renders only its own [openporte] and [altcha] tags inside Contact Form 7 and HTML Forms forms. Until then it ran every shortcode in the displayed form, including text that visitors typed into its fields or put in the page's URL, so any visitor could run any shortcode on your site (security advisory GHSA-hvr5-q69x-jp62). Other plugins' shortcodes in these forms only ever worked because of that; neither form plugin renders them itself. The fix is to take those shortcodes out of the form: put the content they produce directly in the form, or next to it on the page. There is deliberately no setting or code snippet to bring the old behaviour back: it would let any visitor run any shortcode again. If a form depended on another plugin's shortcode and you can't see how to replace it, ask in the OpenPorte support forum on WordPress.org and we'll help you find a safe way.

Does login protection also cover XML-RPC and the REST API?

No. The WordPress and WooCommerce login protection covers the login forms: wp-login.php, WooCommerce's My Account login and any form that signs in through WordPress's own login function. Logins through XML-RPC (xmlrpc.php) and REST API authentication with application passwords are deliberately left alone, because the apps and services that use them cannot solve a challenge. An attacker can try passwords there without meeting the widget. If your site does not need them:

  1. Disable XML-RPC authentication, with a security plugin or with add_filter( 'xmlrpc_enabled', '__return_false' );.
  2. Disable application passwords, with add_filter( 'wp_is_application_passwords_available', '__return_false' );.
OpenPorte does not limit login attempts or add two-factor authentication. Use a dedicated plugin for those; it also protects XML-RPC and the REST API where you keep them.

The widget cannot load a challenge for visitors. What should I check?

Usually a security or optimization plugin blocks the REST API for logged-out visitors; the browser console then shows an error such as Server responded with 401 or Unexpected token '<'. Check by hand:

  1. Open a private browser window, so you are logged out.
  2. Open /wp-json/openporte/v1/challenge on your site (with plain permalinks: /?rest_route=/openporte/v1/challenge). A working endpoint shows a short JSON text with algorithm, challenge, maxnumber, salt and signature. An error, a login page, a redirect or an HTML page means it is blocked for visitors.
  3. If it is blocked, open /wp-admin/admin-ajax.php?action=openporte_challenge the same way. If that one works, set Self-hosted transport to Ajax under Settings → OpenPorte and save. You can also allow /openporte/v1/challenge in the blocking plugin and keep REST API.
  4. Still logged out, open a page with a protected form, solve the widget and submit it. If your forms are also used by logged-in visitors, test once more as a subscriber or customer.
Ajax is not a universal fix either. Plugins that keep visitors out of wp-admin ("hide" or "lock down" wp-admin, membership plugins) can also block admin-ajax.php, sometimes only for logged-in subscribers and customers. If Ajax fails too, stay on REST API and allow /openporte/v1/challenge in the plugin that blocks it. After switching, purge any page or CDN cache: cached pages still contain the old challenge URL. Switching does not help a form plugin that submits through the REST API itself (Contact Form 7, for example): it still needs the REST API for its own submissions.

Logins or forms fail on a site using LiteSpeed Cache. What can I do?

LiteSpeed Cache caches REST API responses by default and ignores the "do not cache" headers OpenPorte sends, so with OpenPorte 1.30.0 or older every visitor gets the same challenge: logins and protected forms fail after five uses (the Replay limit) and for everyone once that challenge expires. Since 1.30.1, OpenPorte tells LiteSpeed Cache not to cache its challenges. Update, then run LiteSpeed Cache → Purge All once: a challenge cached before the update stays cached until it is purged. If you cannot update yet, use either workaround, then purge:

  1. Set Self-hosted transport to Ajax under Settings → OpenPorte, or
  2. in LiteSpeed Cache → Cache → Excludes → Do Not Cache URIs, add /wp-json/openporte/.
If you are already locked out, purge the cache from your hosting panel or with WP-CLI (wp litespeed-purge all) and log in.

Will deleting the plugin remove my settings?

By default, yes: deleting OpenPorte from the Plugins page permanently removes all of its settings, including the shared secret. Deactivating it removes nothing. To keep your configuration for a later reinstall, switch on Keep settings when the plugin is deleted under Settings → OpenPorte → Data and save before deleting the plugin. Temporary data such as replay counters is removed either way, and the settings of the original ALTCHA Spam Protection plugin are never touched. On multisite, this cleanup covers only the current site's options table, not every site in the network. See Downgrading OpenPorte for the reset limitations, including re-import of legacy ALTCHA settings.

更新日志:

1.30.3 1.30.2 1.30.1 1.30.0 1.29.1 1.29.0 1.28.1 1.28.0 1.27.3 This is a small bug-fix release. 1.27.2 This is a security-hardening release. None of these are exploitable vulnerabilities; they are defence-in-depth improvements with no change to normal behaviour. 1.27.1 1.27.0 1.26.3 1.26.2 1.26.1 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.1 1.14.0 1.13.1 1.13.0 1.12.0 1.11.1 1.11.0 1.10.0 1.9.3 1.9.2 1.9.1 1.9.0 1.8.0 1.7.0 1.6.1 1.6.0 1.5.0 1.4.0 1.3.1 1.3.0 1.2.0 1.1.0 1.0.0 0.3.0 0.2.1 0.2.0 0.1.7 0.1.6 0.1.5 0.1.4 0.1.3 0.1.2 0.1.1 0.1.0