[WordPress] 外掛分享: Pinny’s REST Lock – Block REST User Enumeration

WordPress 外掛 Pinny’s REST Lock – Block REST User Enumeration 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Pinny’s REST Lock – Block REST User Enumeration」是 2026-01-24 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2026-01-28,距離現在已有 29 天。
  • 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

realpinny |

內容簡介

總結:Pinny’s REST User Guard 是一個輕量級的 WordPress 外掛,用於防止公眾訪問 WordPress REST API 使用者端點,同時保持授權用戶的正常站點功能。

問題與答案:
1. 什麼是 Pinny’s REST User Guard 外掛?
Pinny’s REST User Guard 是一個用於 WordPress 的外掛,用於防止公眾訪問 WordPress REST API 使用者端點,同時保持授權用戶的正常站點功能。

2. WordPress 預設會暴露哪些端點?
WordPress 預設會暴露 /wp-json/wp/v2/users 和相關端點,這些可以用於在公開站點上進行使用者列舉。

3. 此外掛如何限制端點的訪問?
這個外掛會限制端點只允許授權用戶訪問,對未經授權的請求返回適當的 403 Forbidden 響應。

4. 這個外掛是否對 WordPress 的核心文件做出修改?
這個外掛是輕量級的,不會修改核心文件,並依賴於 WordPress 的本地 REST 認證流程,以確保與區塊編輯器、管理工具和第三方外掛的兼容性。

原文外掛簡介

Blocks public REST API user enumeration while preserving full WordPress functionality.
Pinny’s REST Lock is an ultra-lightweight security plugin that locks down WordPress REST API user endpoints without breaking your site.
It is designed to fix one of the most common and overlooked WordPress security issues — public user enumeration via the REST API — using the correct, core-aligned approach.
🚨 Why This Plugin Is Necessary
By default, WordPress publicly exposes REST API endpoints such as:
/wp-json/wp/v2/users

On public sites, these endpoints can be accessed without authentication and are routinely used as the first step in real-world attacks.
This is where attackers start.
Public access to REST user endpoints allows attackers to:

Enumerate valid usernames
Identify administrator and privileged accounts
Eliminate guesswork before brute-force attacks
Chain enumeration with login abuse and password reset attacks

This is not theoretical. User enumeration is a baseline reconnaissance technique used by bots and human attackers alike.
Blocking public access to REST user endpoints should be considered required security hygiene for every WordPress site.
⚠️ Common REST Protection Pitfalls
Securing REST user endpoints requires precision. Broad or poorly timed restrictions often introduce serious side effects.
Common issues include:

Blocking all users, including administrators, which breaks authenticated workflows
Disabling the REST API entirely, causing the block editor, WooCommerce, and modern plugins to fail
Applying restrictions before authentication, preventing WordPress from distinguishing public and authorized requests
Allowing low-privilege roles, such as subscribers, to retain access — leaving user enumeration possible

Effective protection must be narrowly scoped, permission-aware, and aligned with WordPress core behavior.
✅ How Pinny’s REST Lock Works
Pinny’s REST Lock takes a surgical, WordPress-native approach:

Targets only REST API user endpoints
Runs after WordPress authentication
Allows access only to users with appropriate permissions
Returns a proper 403 Forbidden response to unauthorized requests

What this means:

Administrators continue to work normally
The REST API remains fully functional
Gutenberg, WooCommerce, and REST-based plugins are unaffected
Only public user enumeration is blocked

This follows WordPress core’s intended permission model.
🚀 Ultra-Lightweight by Design
Pinny’s REST Lock is intentionally minimal:

~1.3 KB uncompressed
Single-file plugin
No settings page
No database tables
No logs
No tracking
No ads
No performance impact

It activates, applies the protection, and gets out of the way.
🛡️ A Required Fix for Modern WordPress Sites
If your site is public, your REST user endpoints should not be.
Pinny’s REST Lock closes one of the most common entry points attackers look for — without breaking WordPress, without blocking admins, and without adding bloat.
Install it. Activate it. And remove an entire class of attacks from your site.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Pinny’s REST Lock – Block REST User Enumeration」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | trunk |

延伸相關外掛(你可能也想知道)

  • Yoast SEO – Advanced SEO with real-time guidance and built-in AI 》Yoast SEO:#1 WordPress SEO 外掛, 自 2008 年以來,Yoast SEO 幫助全球數百萬個網站在搜尋引擎中排名更高。, Yoast 的使命是為所有人提供 SEO 服務。我們的...。
  • Elementor Website Builder – More Than Just a Page Builder 》, 全球超過 1000 萬個網站的領先網站建立平台, Elementor 是專為 WordPress 設計的領先網站建立平台,使網站製作者能夠使用直覺式的視覺建立工具建立專業、像...。
  • Contact Form 7 》Contact Form 7 可以管理多個聯絡表單,並且您可以使用簡單的標記靈活地自訂表單和郵件內容。此表單支援 Ajax 提交、CAPTCHA、Akismet 垃圾郵件過濾等功能。,...。
  • Classic Editor 》Classic Editor 是由 WordPress 團隊維護的官方外掛程式,可還原之前(也就是「經典」)的 WordPress 編輯器和「編輯文章」畫面,使使用者可以使用延伸這個畫...。
  • WooCommerce 》p>WooCommerce是全球最受歡迎的開源電子商務解決方案之一,擁有世界上最多的市場份額。, 我們的核心平臺是免費的、靈活的,並擁有全球社區的支持。開源的自由...。
  • LiteSpeed Cache 》LiteSpeed Cache for WordPress(LSCWP)是一種全方位的網站加速外掛,包括獨家的伺服器層快取和一系列的優化功能。, LSCWP 支援 WordPress Multisite 及大多...。
  • WPForms – Easy Form Builder for WordPress – Contact Forms, Payment Forms, Surveys, & More 》f="https://wpforms.com/features/pre-built-form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin" rel="friend nofollow u...。
  • Akismet Anti-spam: Spam Protection 》Akismet會檢查您的評論和聯繫表單提交,將它們與全球垃圾郵件數據庫進行比對,以防止站點發佈惡意內容。您可以在部落格的“評論”管理畫面中檢查評論垃圾郵件的...。
  • Wordfence Security – Firewall, Malware Scan, and Login Security 》fective way to manage multiple WordPress sites with Wordfence installed from a single location., Monitor security status across all your sites from...。
  • Site Kit by Google – Analytics, Search Console, AdSense, Speed 》Site Kit是Google官方的WordPress外掛程式,提供有關人們如何尋找和使用您的網站的洞察。Site Kit是一站式解決方案,可部署、管理並獲取關鍵Google工具的見解...。
  • All-in-One WP Migration and Backup 》orage providers such as Dropbox, Google Drive, Amazon S3, and more, making it easy for you to securely store and access your website backups at any...。
  • WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin 》WordPress Mail SMTP外掛, 如果您的WordPress網站無法正確發送電子郵件,您並不孤單。超過三百萬個網站使用WP Mail SMTP可靠地發送電子郵件。, 我們的目標是...。
  • Yoast Duplicate Post 》這個 WordPress 外掛可以讓使用者複製任何類型 (type) 的文章,或將其複製到新的草稿 (draft) 以供進一步編輯。, 使用方法:, , , 在「編輯文章」或「編輯頁...。
  • Hostinger Tools 》- Hostinger Onboarding WordPress Plugin 简化和加快了WordPress网站的设置过程。, - 提供了简便和快速的方式来建立WordPress网站。。
  • UpdraftPlus: WP Backup & Migration Plugin 》UpdraftPlus 簡化了備份和還原。它是世界上排名最高、最受歡迎的定期備份外掛程式,目前已有超過三百萬個正在使用。您可以在雲端備份文件和資料庫備份,並且...。

文章
Filter
Apply Filters
Mastodon