You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(nginx): validate terminal request origins on 7.4 - #2830
The web terminal and log terminal now check the origin header when a client sends one.
Requests from the WebGUI origin and clients that omit the header keep their existing behavior. A different origin receives a 403 response.
Shell syntax and generated route checks passed. The change also merges cleanly with the open route changes for this release branch. Appliance QA remains pending.
OS-1087 (7.4.1)
Summary by CodeRabbit
Bug Fixes
Updated the web terminal and log terminal to accept requests without an Origin header or with an origin matching the current site. Requests from other origins now receive an HTTP 403 response.
No actionable comments were generated in the recent review.
Walkthrough
The generated /webterminal and /logterminal proxy locations now allow requests with no Origin header or an exact match to $scheme://$http_host. They return HTTP 403 for other origins.
Terminal requests carrying a foreign Origin header now receive 403. Requests with no Origin header or with a matching WebGUI origin keep working. No concrete merge-blocking issue was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the fix (validating terminal request origins) and the component (nginx), which matches the single change in etc/rc.d/rc.nginx: /webterminal and /logterminal locations now accept reques…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the fix (validating terminal request origins) and the component (nginx), which matches the single change in etc/rc.d/rc.nginx: /webterminal and /logterminal locations now accept requests with no Origin header or with an Origin equal to the scheme and host, and return 403 for other origins. The '7.4' reference points to the release branch and OS-1087 (7.4.1) noted in the objectives, so it is a version tag rather than a description of the change. The title is specific and related to the main change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the headers at the door, No Origin? Hop right in across the floor. A matching host may pass along the way, Other origins meet a 403 today. Two terminal paths now share this check, The rabbit gives a pleased and careful peck.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 3aaf52cf-830a-4a17-8f4b-8ac1f5887a18
Commits
Reviewing files that changed from the base of the PR and between b135287 and 5323ad3.
Files selected for processing: 1
etc/rc.d/rc.nginx
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
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
7.4.2Approved for release 7.4.2 (auto-managed by notification-worker)QA PassedQA passed (auto-managed by notification-worker)
3 participants
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.
The web terminal and log terminal now check the origin header when a client sends one.
Requests from the WebGUI origin and clients that omit the header keep their existing behavior. A different origin receives a 403 response.
Shell syntax and generated route checks passed. The change also merges cleanly with the open route changes for this release branch. Appliance QA remains pending.
OS-1087 (7.4.1)
Summary by CodeRabbit
Originheader or with an origin matching the current site. Requests from other origins now receive an HTTP 403 response.