Add SSO proxy request timeout - #231
Open
dknauss wants to merge 2 commits into
Open
Conversation
dknauss
force-pushed
the
pr/sso-proxy-request-timeout
branch
from
July 5, 2026 02:44
011154f to
7a58ec9
Compare
dknauss
force-pushed
the
pr/sso-proxy-request-timeout
branch
from
July 5, 2026 02:59
7a58ec9 to
2de9252
Compare
dknauss
marked this pull request as ready for review
July 5, 2026 03:15
There was a problem hiding this comment.
Pull request overview
Adds an explicit, filterable HTTP timeout to the SSO proxy verification request during the SSO login flow, so the login request doesn’t implicitly rely on the WordPress HTTP API default.
Changes:
- Passes a
timeoutargument towp_remote_get()for the proxy verification call. - Introduces a new filter hook
tenup_experience_sso_proxy_request_timeout(defaulting to 5 seconds).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wp_remote_get accepts a float timeout, but casting the filtered value to int truncated a fractional timeout, and an invalid or empty filter return became 0 — which wp_remote_get treats as "no timeout" and can hang the request. Cast to float, preserve fractional values, and fall back to the 5s default when the filtered value is not positive. Addresses the Copilot review note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Adds an explicit timeout to the SSO proxy verification request.
The SSO login flow performs an outbound request to the configured proxy. This change sets a default five-second timeout and makes it filterable with
tenup_experience_sso_proxy_request_timeout.Benefits
Possible Drawbacks
If an SSO proxy regularly takes more than five seconds to respond, projects may need to increase the timeout with the provided filter.
Verification Process
php -l includes/classes/SSO/SSO.phpcomposer run lintgit diff --checkChangelog Entry
Checklist:
AI assistance was used in drafting and reviewing this change; final authorship and verification are mine.