Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing in timeout/retry settings to Net::HTTP #709

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

johnnyshields
Copy link
Collaborator

@johnnyshields johnnyshields commented Jul 10, 2024

Replaces #677

Allow passing in Net::HTTP :open_timeout, :read_timeout, and :max_retries settings to IdpMetadataParser#parse_remote.

When fetching remote XML files from arbitrary URLs, you might want to configure different values for timeouts/retries to avoid allowing users to DoS you via intentionally slow endpoints. The Net::HTTP defaults are 60 seconds plus 1 retry, which could easily deplete resources if intentionally exploited.

I also added some additional test coverage for IdpMetadataParser#parse_remote_to_array which was missing.

@pitbulk pitbulk merged commit f5768d2 into SAML-Toolkits:v2.x Jul 10, 2024
25 checks passed
@johnnyshields johnnyshields deleted the 2.0-net-http-settings branch July 10, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants