Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复了不支持302跳转浏览器下,访问需验证模块会导致panic的问题。 #52

Merged
merged 1 commit into from
Nov 21, 2016

Conversation

cst05001
Copy link

modified:   src/rbac.go

            if uinfo == nil {
                ctx.Redirect(302, rbac_auth_gateway)
                return
            }
            //admin用户不用认证权限
            adminuser := beego.AppConfig.String("rbac_admin_user")
            if uinfo.(m.User).Username == adminuser {
                return
            }

如果浏览器不支持302跳转,那么uinfo 这个 nil 就会往下执行,然后panic。

@astaxie astaxie merged commit a772961 into beego:master Nov 21, 2016
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