Skip to content

fix: stop sending the RSL license Link header on allowed requests - #27

Merged
tomasstark merged 2 commits into
mainfrom
fix/no-license-link-on-allow
Oct 13, 2026
Merged

tomasstark merged 2 commits into
mainfrom
fix/no-license-link-on-allow

Conversation

@tomasstark

Copy link
Copy Markdown
Contributor

This PR bumps the Supertab Connect PHP SDK to v2.1.0, so the plugin no longer sends the RSL license Link header on allowed requests. It now appears only on requests that are blocked for presenting an invalid license token.

Context

SDK 2.0.1 added Link: <…/license.xml>; rel="license" to every allowed response, so every page view by a person carried it too. SDK 2.1.0 (getsupertab/connect-sdk-php#30) sends it only when it treats a request as a bot's: on the OBSERVE missing-token signal and on blocked responses, matching the TypeScript SDK.

The plugin passes no bot detector to the SDK, so the OBSERVE signal never fires here. On a WordPress site the header therefore appears only on 401/403/503 responses to requests with an invalid License token. Crawlers without a token discover the license through the robots.txt License: directive added in 1.4.0 and through /license.xml.

Key Changes

  • Bump getsupertab/connect-sdk-php from ^2.0.1 to ^2.1.0. The lock file changes only the SDK entry.
  • No plugin source changes: Bot_Protection already forwards whatever headers the SDK returns.
  • New BotProtectionTest test that runs a real SDK instance through maybe_handle_request() and checks that an allowed request adds no headers and leaves WordPress's own headers untouched. It fails against SDK 2.0.1.

Verification

  • composer test: 159 tests pass.
  • composer check (lint, phpcs, phpstan): clean.
  • Local wp-env: a plain request returns 200 without the license Link header, and a request with Authorization: License not-a-real-jwt returns 401 with WWW-Authenticate and the license Link header.

@tomasstark
tomasstark merged commit f8d22b4 into main Oct 13, 2026
5 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 13, 2026
## [1.4.1](v1.4.0...v1.4.1) (2026-10-13)

### Bug Fixes

* stop sending the RSL license Link header on allowed requests ([#27](#27)) ([f8d22b4](f8d22b4))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.4.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant