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

ruoyi登陆的用户名为什么设置为不校验大小写? #277

Open
Z-rongyin opened this issue Jan 16, 2025 · 1 comment
Open

ruoyi登陆的用户名为什么设置为不校验大小写? #277

Z-rongyin opened this issue Jan 16, 2025 · 1 comment

Comments

@Z-rongyin
Copy link

我发现sys_user表的collate = utf8mb4_general_ci,这会导致查询的时候不校验大小写,也就是说admin用户登录的时候,只要是admin这几个字母就行,不论大小写。当时是怎么考虑这个问题的?
另外,这里其实是有一个bug的,admin登录多次输错密码后,使用admiN去登录就可以了,因为错误次数是记在redis中的(而且是直接记录用户输入的字符串,没有做大小写转换)

@Z-rongyin
Copy link
Author

感觉还是校验大小写好一点,修改一下sys_user

alter table sys_user
    modify username varchar(180) collate utf8mb4_bin null comment '用户名';

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