Login to OLS web admin console using port forwarding#481
Open
praximatec wants to merge 1 commit into
Open
Conversation
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.
Hardcoded comparison between HTTP_REFERER port and SERVER_PORT breaks admin access when using TCP tunneling solutions like Google Cloud IAP, SSH tunneling, or Docker port mapping where the local port differs from the container/instance port.
The Host header (HTTP_HOST) represents the authority as seen by the client. For CSRF protection, the Referer should match the host the browser is interacting with, not the physical port the server process is bound to.
This change doesn't weaken CSRF protection because it still ensures the Referer matches the actual host/port used to access the application.
https://forum.openlitespeed.org/threads/ols-web-admin-console-login-issue-using-alternative-web-admin-port.14503/
Note on Reverse Proxies:
If the web admin console is deployed behind a reverse proxy (e.g., Nginx, HAProxy, Cloudflare), the proxy must be configured to pass the original
Hostheader to the backend. If the proxy rewrites the Host header to an internal address or port, the CSRF validation will correctly fail because the externalRefererwill not match the rewritten internalHost.