From 2406fc4efeade10fa9836cf43dbc720d128a3ca1 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 3 Mar 2023 15:05:43 +0100 Subject: token: do not expose full checkin timestamp --- lib/Travelynx/Controller/Traveling.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Controller/Traveling.pm') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index fcc95ed..8cf1722 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -471,7 +471,7 @@ sub status_token_ok { $ts2 //= $ts2_ext; if ( $eva == $status->{dep_eva} - and $ts == $status->{timestamp}->epoch + and $ts == $status->{timestamp}->epoch % 337 and $ts2 == $status->{sched_departure}->epoch ) { return 1; @@ -491,7 +491,7 @@ sub journey_token_ok { $ts2 //= $ts2_ext; if ( $eva == $journey->{from_eva} - and $ts == $journey->{checkin_ts} + and $ts == $journey->{checkin_ts} % 337 and $ts2 == $journey->{sched_dep_ts} ) { return 1; -- cgit v1.2.3