-
Notifications
You must be signed in to change notification settings - Fork 261
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
Unable to delete user #3057
Comments
We support utf-8 names all characters so we should continue to allow these type of user names. We'll fix this in Console for right path decoding. |
It looks like the / characters inside is breaking the path building, but I can be wrong |
The actual problem is that base64 encoding is used to encode the username, but standard base64 encoding is not URL-safe (standard base64 encoding uses the However, it's not needed to encode the parameters, because Javascript already provides the It's a bit strange that the Swagger code generator doesn't perform this encoding, because it's the only sane thing to do. I'm not the only one who's wondering why that's not the default. Fortunately, it can be fixed with a hook that will automatically add this: module.exports = {
hooks: {
onInsertPathParam: (paramName) => `encodeURIComponent(${paramName})`,
}
}; That way, we don't need to bother which parameters need to be encoded and who don't need it. If they are passed on the URL (via this API module), then encoding is done automatically. If values are passed in the HTTP body (encoded as JSON), then no encoding is required. I have tested this method and it works fine. It does require to refactor all code and to remove the calls to To fix the issue for now I fixed the I guess we need to go for the proper option in the long-term to reduce the chances of coding issues. This simplifies code and improves code quality and reliability (in the long-term). |
I have created a user with the named "4,^AFzQ&w_6H"D?;_D</,Wd($mkgef^[VRm%o$g-fYUXBV^`98v+#({sQRw?jhg.Ue*H#vs9nwB&"~nHrkJ7q`N#&7!?8Eu4:4!x~joSGmoL%y=oQ}U@/"yz3{g4" which is a kinda dump name I realized after creating it
Expected Behavior
I should be able to delete it from the frontend
Current Behavior
The frontend responds with "not found"
Steps to Reproduce (for bugs)
Regression
No
Your Environment
minio version RELEASE.2023-09-16T01-01-47Z (commit-id=b733e6e83cee28820e815787b0562d17b14f9759)
Runtime: go1.21.1 linux/amd64
uname -a
): Linux <> 5.10.0-21-cloud-amd64 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: