Skip to content

Conversation

@libnex
Copy link

@libnex libnex commented Mar 12, 2018

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.

Copy link
Owner

@Matir Matir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential.

if err != nil {
return resp, err
}
// Check if we can bypass auth checks via X-Forwarded-For & X-Real-IP
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably add a flag to enable/disable this, as it could greatly increase number of requests.

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.

2 participants