Skip to content

Add HTTP timeouts to all Net::HTTP requests - #57

Closed
bellisabell wants to merge 1 commit into
mainfrom
bell/add-http-timeouts
Closed

Add HTTP timeouts to all Net::HTTP requests#57
bellisabell wants to merge 1 commit into
mainfrom
bell/add-http-timeouts

Conversation

@bellisabell

Copy link
Copy Markdown
Contributor

Summary

Security fix: All Net::HTTP requests now have timeouts to prevent hanging on unresponsive external services.

Changes

  • open_timeout: 5 seconds - Max time to establish connection
  • read_timeout: 10 seconds - Max time to wait for response

Files updated:

  • app/models/domain.rb - render_service_request and liveness_check methods
  • app/jobs/post_in_admin_chat_job.rb - Admin chat webhook
  • app/jobs/subscribe_to_contraption_ghost_job.rb - Newsletter subscription API

Closes #21

Security fix: All Net::HTTP requests now have open_timeout=5 and
read_timeout=10 to prevent hanging on unresponsive external services.

Files updated:
- app/models/domain.rb (render_service_request and liveness_check)
- app/jobs/post_in_admin_chat_job.rb
- app/jobs/subscribe_to_contraption_ghost_job.rb

Closes #21
@philipithomas

Copy link
Copy Markdown
Contributor

Superseded by #77, which adds connection/read/write timeout budgets while preserving newer domain-verification behavior and tests network configuration. The replacement passes all four current-head CI checks (tests and Docker smoke on push and PR), plus the local SOLO and MULTIUSER suites (62 tests / 259 assertions each). Closing this older implementation to keep one tested review path. Any linked issue remains open until the replacement is merged.

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.

Security: No HTTP timeouts on external Net::HTTP requests

2 participants