[ARVADOS] updated: 1.3.0-2538-gafcef9cee
Git user
git at public.arvados.org
Fri May 1 19:12:22 UTC 2020
Summary of changes:
lib/controller/federation.go | 6 +++---
services/api/app/models/container.rb | 9 +++++++--
services/api/config/initializers/time_zone.rb | 15 +++++++++++++++
services/api/lib/db_current_time.rb | 8 ++++++--
services/api/test/unit/container_test.rb | 2 ++
services/api/test/unit/time_zone_test.rb | 15 +++++++++++++++
6 files changed, 48 insertions(+), 7 deletions(-)
create mode 100644 services/api/config/initializers/time_zone.rb
create mode 100644 services/api/test/unit/time_zone_test.rb
via afcef9cee9922db71e268624ec658f535755aada (commit)
via ae4eb84a350994daee72a21f380ea04bb2ca9f63 (commit)
via f98bf44508fd976cd073ba89909f70253705a5e9 (commit)
via f4991e436219e135db96b8a9d064fdee3d39b2cd (commit)
via 20fd0e67ddcbba8c4bc1e5e9c5e2def6eccd9d85 (commit)
from e7d2fb583546395fd25e834d541fe2e1cdafd303 (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 afcef9cee9922db71e268624ec658f535755aada
Merge: e7d2fb583 ae4eb84a3
Author: Tom Clegg <tom at tomclegg.ca>
Date: Fri May 1 15:10:44 2020 -0400
Merge branch '16349-non-utc-timestamps'
fixes #16349
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --cc lib/controller/federation.go
index c0d127284,5bdc96528..ac239fb9b
--- a/lib/controller/federation.go
+++ b/lib/controller/federation.go
@@@ -166,12 -164,10 +166,12 @@@ func (h *Handler) validateAPItoken(req
}
user.Authorization.APIToken = token
var scopes string
- err = db.QueryRowContext(req.Context(), `SELECT api_client_authorizations.uuid, api_client_authorizations.scopes, users.uuid FROM api_client_authorizations JOIN users on api_client_authorizations.user_id=users.id WHERE api_token=$1 AND (expires_at IS NULL OR expires_at > current_timestamp) LIMIT 1`, token).Scan(&user.Authorization.UUID, &scopes, &user.UUID)
+ err = db.QueryRowContext(req.Context(), `SELECT api_client_authorizations.uuid, api_client_authorizations.scopes, users.uuid FROM api_client_authorizations JOIN users on api_client_authorizations.user_id=users.id WHERE api_token=$1 AND (expires_at IS NULL OR expires_at > current_timestamp AT TIME ZONE 'UTC') LIMIT 1`, token).Scan(&user.Authorization.UUID, &scopes, &user.UUID)
if err == sql.ErrNoRows {
+ ctxlog.FromContext(req.Context()).Debugf("validateAPItoken(%s): not found in database", token)
return nil, false, nil
} else if err != nil {
+ ctxlog.FromContext(req.Context()).WithError(err).Debugf("validateAPItoken(%s): database error", token)
return nil, false, err
}
if uuid != "" && user.Authorization.UUID != uuid {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list