Skip to content

Clean up permanently removed endpoints#127

Open
iMattPro wants to merge 1 commit intophpbb-extensions:mainfrom
iMattPro:invalid-endpoint
Open

Clean up permanently removed endpoints#127
iMattPro wants to merge 1 commit intophpbb-extensions:mainfrom
iMattPro:invalid-endpoint

Conversation

@iMattPro
Copy link
Copy Markdown
Contributor

@iMattPro iMattPro commented Mar 27, 2026

Solution to https://www.phpbb.com/customise/db/extension/webpushnotifications/support/topic/253969?p=908491

The endpoint permanently-removed.invalid is a known placeholder that the web-push-php library (Minishlink) substitutes when a PushSubscription object is unsubscribed in the browser before the stored endpoint in the database is cleaned up server-side. When phpBB tries to deliver to it, cURL fails with error 6 (DNS resolution failure) because .invalid is an RFC 6761-reserved TLD that never resolves. The Minishlink library wraps this as a MessageSentReport with a null response. Our existing checks for expired or unauthorized subscriptions return false when the response is null — so the else branch fires, logging this as noise and crucially never cleaning up the dead subscription.

This PR will now check for permanently-removed.invalid and clean those up without logging them as an error, so only true errors get logged.

@iMattPro iMattPro requested a review from rxu March 27, 2026 21:39
@iMattPro iMattPro added the bug Something isn't working label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant