Repository navigation
Conversation
…ation Bearer-auth plugins such as JWT Authentication for WP REST API decode every Authorization: Bearer header and reject the request before our permission check runs, so stats and task sync would fail on those sites. A dedicated header avoids that, and Apache does not strip it, so the getallheaders() fallback is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test on Playground |
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
103 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/suggested-tasks/providers/class-content-review.php (4 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
232 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
377 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
381 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
388 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/activities/class-query.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
71 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58. |
163 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153. |
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
108 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106. |
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
111 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98. |
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
120 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
✅ Code Coverage Report
🎉 Great job maintaining/improving code coverage! 📊 File-level Coverage Changes (1 files)📉 Coverage Decreased
ℹ️ About this report
|
With the X-Progress-Planner-Token header every caller requests the same /get-stats and /tasks URL. WordPress sends no-cache headers only to logged-in users, and the server is not logged in, so a page cache could store an authenticated response and serve it to anyone, or hand the server stale data. LiteSpeed Cache caches REST responses for guests by default for seven days. Send Cache-Control: no-store, private on every response from these routes, including rejected ones, and call LiteSpeed Cache's litespeed_control_set_nocache hook because its own cache header overrides the standard one. Same change as on #805. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed ffda13a: keep Why. With header-only authentication every caller requests the same What changed. Cases covered (new
Verified
Merge order is unchanged by this commit: #805 first, then server #68 and #69, then #802 and #803. ProgressPlanner/progress-planner-server#69 now also falls back to the legacy URL for sites on older plugins, so this strict branch no longer needs every site updated before the server switches. |
Stacked on #802. Companion server change: ProgressPlanner/progress-planner-server#69.
The site token moves from
Authorization: Bearer <token>to a dedicatedX-Progress-Planner-Tokenheader.Why: bearer-auth plugins (for example JWT Authentication for WP REST API, about 50,000 installs) decode every
Authorization: Bearerheader on REST requests. When decoding fails they return their own error fromrest_pre_dispatch, before our permission check runs, so stats and task sync would silently stop on those sites. Apache also doesn't strip a custom header, so thegetallheaders()fallback from #802 is removed.Changes
classes/rest/class-base.php:permissions_check()reads onlyX-Progress-Planner-Token. A Bearer header is ignored, and URL tokens are still rejected.Verified
If this is rejected, close it together with the matching server PR; #802 stays as is.