From c0087e790c91a5c2844d8218da92bdacf0836927 Mon Sep 17 00:00:00 2001 From: Aditya Pahuja Date: Mon, 15 Apr 2019 16:40:11 +0100 Subject: [PATCH] BAU: Fix timezone issue Verify frontend is comparing notOnOrAfter field (assertion_expiry) against the current system clock. The clock can be in different timezone e.g. British Summer Time (GMT+0100). According to SAML specification, notOnOrAfter specifies the time instant at which the assertion has expired. The time value is encoded in UTC. This commit updates verify frontend to compare notOnOrAfter field against the system clock in UTC. This will prevent users from getting session timeout errors. Author: @adityapahuja --- app/controllers/further_information_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/further_information_controller.rb b/app/controllers/further_information_controller.rb index 748e4f27f..a24b54b16 100644 --- a/app/controllers/further_information_controller.rb +++ b/app/controllers/further_information_controller.rb @@ -52,6 +52,6 @@ def submit_null_attribute private def expired? - !session[:assertion_expiry].nil? && Time.parse(session[:assertion_expiry]) <= Time.now + !session[:assertion_expiry].nil? && Time.parse(session[:assertion_expiry]) <= Time.now.utc end end