Check for auth bypass via X-Fowarded-For and X-Real-IP#36
Open
libnex wants to merge 1 commit intoMatir:masterfrom
Open
Check for auth bypass via X-Fowarded-For and X-Real-IP#36libnex wants to merge 1 commit intoMatir:masterfrom
libnex wants to merge 1 commit intoMatir:masterfrom
Conversation
Matir
reviewed
Mar 12, 2018
Owner
Matir
left a comment
There was a problem hiding this comment.
Please run 'gofmt' on the file as well -- it does quite a nice job of autoformatting.
| resp_temp, err := c.Client.Do(req) | ||
| if (err == nil) && (resp_temp.StatusCode>=200) && (resp_temp.StatusCode<400){ | ||
|
|
||
| logging.Logf(logging.LogWarning,"Pontential AUTH BYPASS in " + u.String() + " via X-Forwarded-For/X-Real-IP: 127.0.0.1") |
| if err != nil { | ||
| return resp, err | ||
| } | ||
| // Check if we can bypass auth checks via X-Forwarded-For & X-Real-IP |
Owner
There was a problem hiding this comment.
Should probably add a flag to enable/disable this, as it could greatly increase number of requests.
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.
Whenever webborer encounter an access denied code (eg: 401,403 etc), attempt to set X-Forwarded-For and X-Real-IP to 127.0.0.1 in an attempt to check for auth bypass.