Skip to content

Clean up permanently removed endpoints - #127

Merged
iMattPro merged 1 commit into
phpbb-extensions:mainfrom
iMattPro:invalid-endpoint
Apr 4, 2026
Merged

iMattPro merged 1 commit into
phpbb-extensions:mainfrom
iMattPro:invalid-endpoint

Conversation

@iMattPro

@iMattPro iMattPro commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor

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
@iMattPro
iMattPro merged commit b12de4b into phpbb-extensions:main Apr 4, 2026
33 checks passed
@iMattPro
iMattPro deleted the invalid-endpoint branch April 4, 2026 14:38
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