Skip to content

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

Open
bellisabell wants to merge 1 commit intomainfrom
bell/add-http-timeouts
Open

Add HTTP timeouts to all Net::HTTP requests#57
bellisabell wants to merge 1 commit intomainfrom
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
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