diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-20 11:34:27 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-20 11:34:27 -0500 |
| commit | e4ba09549ab54eef674a18e6747f7b54ea0f1124 (patch) | |
| tree | 814ef01b577e2e2e80e9aace74b4e1cc61875089 | |
| parent | ac8fb9d8c8d9a102ae11460d0e04b9948d0b092d (diff) | |
| download | invidious-e4ba09549ab54eef674a18e6747f7b54ea0f1124.tar.gz invidious-e4ba09549ab54eef674a18e6747f7b54ea0f1124.tar.bz2 invidious-e4ba09549ab54eef674a18e6747f7b54ea0f1124.zip | |
Change sign in messages to protect user privacy
| -rw-r--r-- | src/invidious.cr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 73a8eee3..02210e84 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -761,12 +761,12 @@ post "/login" do |env| user = PG_DB.query_one?("SELECT * FROM users WHERE email = $1 AND password IS NOT NULL", email, as: User) if !user - error_message = "Cannot find user with ID #{email}." + error_message = "Invalid username or password" next templated "error" end if !user.password - error_message = "Account appears to be a Google account." + error_message = "Please sign in using 'Sign in with Google'" next templated "error" end @@ -782,13 +782,13 @@ post "/login" do |env| env.response.cookies["SID"] = HTTP::Cookie.new(name: "SID", value: sid, expires: Time.now + 2.years, secure: secure, http_only: true) else - error_message = "Invalid password" + error_message = "Invalid username or password" next templated "error" end elsif action == "register" user = PG_DB.query_one?("SELECT * FROM users WHERE email = $1 AND password IS NOT NULL", email, as: User) if user - error_message = "User already exists, please sign in" + error_message = "Please sign in" next templated "error" end |
