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

越权未授权访问 #26

Open
Zhuangshao opened this issue Aug 21, 2020 · 0 comments
Open

越权未授权访问 #26

Zhuangshao opened this issue Aug 21, 2020 · 0 comments

Comments

@Zhuangshao
Copy link

版本号:

ALL

问题描述:

在类似/system/back/jwSystemUser/list.do页面可以通过将 back 编码或者访问 list.bbbb的方式绕过权限校验,造成未授权访问。

问题截图:

没有admin权限的时候,正常访问/system/back/jwSystemUser/list.do会返回401。
但是访问类似http://demo.jeewx.com/system/ba%63k/jwSystemUser/list.bbbb
由页面显示
image
同样访问 http://demo.jeewx.com/system/ba%63k/jwSystemUser/list.do
image
正常返回:
image

第一个主要问题在于
https://github.com/zhangdaiscott/jeewx-boot/blob/master/jeewx-boot-base-system/src/main/java/com/jeecg/p3/system/interceptors/LoginInterceptor.java#L113
image
list 为null的时候返回true。
第二个问题在于:
https://github.com/zhangdaiscott/jeewx-boot/blob/master/jeewx-boot-base-system/src/main/java/com/jeecg/p3/system/interceptors/LoginInterceptor.java#L51
image
url编码以后 requestPath.index("/back/")找不到,返回-1,函数返回true。

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

No branches or pull requests

1 participant