mirror of
https://github.com/iv-org/invidious.git
synced 2025-03-13 09:26:35 -04:00
fix: downcase username and limit username lenght (from routes/login.cr)
Users that changed their username to something like `User`, were unable to login because the username is downcased on routes/login.cr
This commit is contained in:
parent
eff1a101c7
commit
0c83eb2c39
@ -123,7 +123,7 @@ module Invidious::Routes::Account
|
||||
return error_template(400, ex)
|
||||
end
|
||||
|
||||
new_username = env.params.body["new_username"]?
|
||||
new_username = env.params.body["new_username"]?.try &.downcase.byte_slice(0, 254)
|
||||
if new_username.nil?
|
||||
return error_template(401, "username_required_field")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user