Skip to content

Commit

Permalink
Fixes #28646 - fix unauthorized user error message (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabajaj0509 authored and shiramax committed Jan 7, 2020
1 parent b457340 commit 059b82b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def authenticate(request, args)
def error(ex)
if ex.is_a?(RestClient::Unauthorized) && session.valid?
if @user_changed
return UnauthorizedError.new(_("Invalid username or password, continuing with session for '%s'.") % session.user_name)
return UnauthorizedError.new(_("Invalid credentials, continuing with session for '%s'.") % session.user_name)
else
session.destroy
return SessionExpired.new(_("Session has expired."))
Expand Down
2 changes: 1 addition & 1 deletion test/unit/api/session_authenticator_wrapper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def prepare_session_storage(options = {}, &block)
ex = RestClient::Unauthorized.new
new_ex = auth.error(ex)

assert_equal "Invalid username or password, continuing with session for 'admin'.", new_ex.message
assert_equal "Invalid credentials, continuing with session for 'admin'.", new_ex.message
end
end

Expand Down

0 comments on commit 059b82b

Please sign in to comment.