Proper fix to - Pr 86#89
Open
AjayPAnand wants to merge 7 commits intothoth-tech:10.0.xfrom
Open
Conversation
- Bump Puma to >= 6.4.3 in Gemfile for hardened HTTP parsing - Add raise_exception_on_sigterm! to config/puma.rb to prevent request queue poisoning on SIGTERM Severity: SIGNIFICANT Ref: FIX 2 — HTTP Request Smuggling
update proxy-nginx configuration to support HTTP request smuggling testing scenarios. enable relaxed header handling, adjust client timeouts, and configure proxy connection and buffering behaviour to allow controlled testing conditions. no production behaviour intended; changes are for security testing
224599437
approved these changes
Apr 29, 2026
sabdosh
approved these changes
Apr 29, 2026
SteveDala
suggested changes
Apr 30, 2026
Collaborator
There was a problem hiding this comment.
Is this a dependency for the changes?
Collaborator
There was a problem hiding this comment.
This is not the correct way to adjust the database schema. Please revert this file and make a Rails migration file (run, for example rails generate migration AddEnforceFeedbackBeforeDiscussionToUnits)
Revert schema.rb to match 10.0.x
…ss column Removed the 'enforce_feedback_before_discussed_in_class' column from the schema as per the fix that is required this change is not necessary for my PR.
Reverting schema.rb
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
Fixes HTTP Request Smuggling vulnerability identified on the
/api/activity_types/endpoint (and related endpoints). The backend was responding inconsistently to malformed HTTP requests (returning HTTP 419, 501, and other errors), indicating misaligned request parsing between the Nginx reverse proxy and the backend API server.This change hardens the Nginx proxy configuration to enforce consistent HTTP/1.1 request handling, reject ambiguous headers, and buffer requests before forwarding — eliminating the desynchronisation window that enables smuggling attacks.
Fixes # (issue)
Type of change
Changes made
production/shared-files/proxy-nginx.confignore_invalid_headers on— instructs Nginx to silently drop unrecognised or malformed headers rather than forwarding them to the backend, preventing header injection via ambiguous fields.client_header_timeout 10s/client_body_timeout 10s— limits how long Nginx waits for a slow or incomplete request, closing the connection before a partial/smuggled request can be processed.proxy_set_header Connection ""— clears theConnectionheader before forwarding, preventing hop-by-hop header smuggling between the proxy and backend.proxy_http_version 1.1— forces HTTP/1.1 between Nginx and the backend, enabling keep-alive and ensuring consistent chunked-encoding handling.proxy_request_buffering on/proxy_buffering on— Nginx fully buffers the client request before forwarding, ensuring the backend only ever receives complete, validated requests — eliminating the desync window.doubtfire-api— submodule updated to commita1ea9b2(dirty)doubtfire-web— submodule updated to commit14f0746(dirty)How has this been tested?
/api/activity_types/.HTTP/1.1 200 OKresponse.Content-Length/Transfer-Encoding, partial headers, duplicate headers) — confirm Nginx now returns a consistent400 Bad Requestrather than419 CUSTOM,501 Not Implemented, or partial responses./api/activity_types/returns expected responseChecklist
Security context
Vulnerability: HTTP Request Smuggling (HRS)
Affected endpoint:
http://localhost:3000/api/activity_types/Risk: Significant impact / Moderate likelihood
Discovery method: Burp Suite Repeater - malformed requests produced inconsistent responses (HTTP 419, 501, partial errors), indicating frontend/backend request parsing desynchronisation.
References: