diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-06-07 11:28:58 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-06-07 21:13:50 -0500 |
| commit | ab3980cd38575f310730c5871f25589d060ba0b3 (patch) | |
| tree | 18d919afec7f155aef76c018ca54e18ac01087d7 | |
| parent | 1db648a52515e9050fd74c737260459fcb755c4f (diff) | |
| download | invidious-ab3980cd38575f310730c5871f25589d060ba0b3.tar.gz invidious-ab3980cd38575f310730c5871f25589d060ba0b3.tar.bz2 invidious-ab3980cd38575f310730c5871f25589d060ba0b3.zip | |
Enforce maximum email length
| -rw-r--r-- | src/invidious.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index c60e5537..1882c4ff 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -897,7 +897,8 @@ post "/login" do |env| next templated "error" end - email = env.params.body["email"]?.try &.downcase + # https://stackoverflow.com/a/574698 + email = env.params.body["email"]?.try &.downcase.byte_slice(0, 254) password = env.params.body["password"]? account_type = env.params.query["type"]? |
