[ARVADOS] updated: 1.3.0-2246-gd11eb815d
Git user
git at public.arvados.org
Wed Mar 4 20:18:53 UTC 2020
Summary of changes:
services/api/app/controllers/user_sessions_controller.rb | 3 ++-
services/api/app/models/user.rb | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
via d11eb815d1722e50cf5308dc6e9d99e93d3228b7 (commit)
from 5e55bbfce418bbdbd5069a4b6ba14539815e764c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d11eb815d1722e50cf5308dc6e9d99e93d3228b7
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Wed Mar 4 15:17:49 2020 -0500
Fix error reporting bug in User.redirect_to
Also improve error logging when User.register fails.
no issue #
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/services/api/app/controllers/user_sessions_controller.rb b/services/api/app/controllers/user_sessions_controller.rb
index 0a03399d1..85f32772b 100644
--- a/services/api/app/controllers/user_sessions_controller.rb
+++ b/services/api/app/controllers/user_sessions_controller.rb
@@ -33,7 +33,8 @@ class UserSessionsController < ApplicationController
begin
user = User.register(authinfo)
rescue => e
- Rails.logger.warn e
+ Rails.logger.warn "User.register error #{e}"
+ Rails.logger.warn "authinfo was #{authinfo.inspect}"
return redirect_to login_failure_url
end
diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index 310c2ca69..dd447ca51 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -410,10 +410,12 @@ class User < ArvadosModel
user = self
redirects = 0
while (uuid = user.redirect_to_user_uuid)
- user = User.unscoped.find_by_uuid(uuid)
- if !user
- raise Exception.new("user uuid #{user.uuid} redirects to nonexistent uuid #{uuid}")
+ break if uuid.empty?
+ nextuser = User.unscoped.find_by_uuid(uuid)
+ if !nextuser
+ raise Exception.new("user uuid #{user.uuid} redirects to nonexistent uuid '#{uuid}'")
end
+ user = nextuser
redirects += 1
if redirects > 15
raise "Starting from #{self.uuid} redirect_to_user_uuid exceeded maximum number of redirects"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list