We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug:
点击创建用户的时候会提示Cannot read properties of undefined (reading 'roles') 真实的原因是因为注册用户密码不符合要求 导致下一个接口异常 中间少了注册的接口判断
Steps to reproduce:
1.curl 'http://127.0.0.1:8000/api/v1/users' -H 'Accept: application/json, text/plain, /' -H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-TW;q=0.5' -H 'Connection: keep-alive' -H 'Content-Type: application/json' -H 'DNT: 1' -H 'Origin: http://127.0.0.1:8000' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0' -H 'milvus-client-id: 5xzqfe' -H 'sec-ch-ua: "Not(A:Brand";v="99", "Microsoft Edge";v="133", "Chromium";v="133"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "macOS"' -H 'x-attu-database: test' --data-raw '{"username":"test","password":"test","roles":["test","admin"]}' { "data": { "extra_info": {}, "error_code": "IllegalArgument", "reason": "invalid password length: invalid parameter[4 out of range 6 <= value <= 72]", "code": 1100, "retriable": false, "detail": "invalid password length: invalid parameter[4 out of range 6 <= value <= 72]" }, "statusCode": 200 } 2.curl 'http://127.0.0.1:8000/api/v1/users/test/role/update' -X 'PUT' -H 'Accept: application/json, text/plain, /' -H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-TW;q=0.5' -H 'Connection: keep-alive' -H 'Content-Type: application/json' -H 'DNT: 1' -H 'Origin: http://127.0.0.1:8000' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0' -H 'milvus-client-id: 5xzqfe' -H 'sec-ch-ua: "Not(A:Brand";v="99", "Microsoft Edge";v="133", "Chromium";v="133"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "macOS"' -H 'x-attu-database: test' --data-raw '{"username":"test","roles":["test","admin"]}' { "statusCode": 500, "message": "Cannot read properties of undefined (reading 'roles')" }
Attu version: v 2.5.4
Milvus version: pkg/v2.5.5-gpu
The text was updated successfully, but these errors were encountered:
这里的根本原因是你的password太短了,导致了milvus创建用户失败,下个版本attu会做一些提示和限制。
Sorry, something went wrong.
是的 我修复了
我已经修了:)
Successfully merging a pull request may close this issue.
Describe the bug:
点击创建用户的时候会提示Cannot read properties of undefined (reading 'roles')
真实的原因是因为注册用户密码不符合要求 导致下一个接口异常 中间少了注册的接口判断
Steps to reproduce:
1.curl 'http://127.0.0.1:8000/api/v1/users'
-H 'Accept: application/json, text/plain, /'
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-TW;q=0.5'
-H 'Connection: keep-alive'
-H 'Content-Type: application/json'
-H 'DNT: 1'
-H 'Origin: http://127.0.0.1:8000'
-H 'Sec-Fetch-Dest: empty'
-H 'Sec-Fetch-Mode: cors'
-H 'Sec-Fetch-Site: same-origin'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0'
-H 'milvus-client-id: 5xzqfe'
-H 'sec-ch-ua: "Not(A:Brand";v="99", "Microsoft Edge";v="133", "Chromium";v="133"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "macOS"'
-H 'x-attu-database: test'
--data-raw '{"username":"test","password":"test","roles":["test","admin"]}'
{
"data": {
"extra_info": {},
"error_code": "IllegalArgument",
"reason": "invalid password length: invalid parameter[4 out of range 6 <= value <= 72]",
"code": 1100,
"retriable": false,
"detail": "invalid password length: invalid parameter[4 out of range 6 <= value <= 72]"
},
"statusCode": 200
}
2.curl 'http://127.0.0.1:8000/api/v1/users/test/role/update'
-X 'PUT'
-H 'Accept: application/json, text/plain, /'
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-TW;q=0.5'
-H 'Connection: keep-alive'
-H 'Content-Type: application/json'
-H 'DNT: 1'
-H 'Origin: http://127.0.0.1:8000'
-H 'Sec-Fetch-Dest: empty'
-H 'Sec-Fetch-Mode: cors'
-H 'Sec-Fetch-Site: same-origin'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0'
-H 'milvus-client-id: 5xzqfe'
-H 'sec-ch-ua: "Not(A:Brand";v="99", "Microsoft Edge";v="133", "Chromium";v="133"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "macOS"'
-H 'x-attu-database: test'
--data-raw '{"username":"test","roles":["test","admin"]}'
{
"statusCode": 500,
"message": "Cannot read properties of undefined (reading 'roles')"
}
Attu version:
v 2.5.4
Milvus version:
pkg/v2.5.5-gpu
The text was updated successfully, but these errors were encountered: