From 06ec0e15f8d2dd16cdd33b5fa78461a0de4a2d1a Mon Sep 17 00:00:00 2001 From: Craig Bester Date: Tue, 19 Oct 2021 21:18:00 +0200 Subject: [PATCH] Update TimeCop to avoid Into Out of an abundance of caution. Not an actual vulnerability since `set_current` is unused and we don't use any SystemTime conversions affected by a known vulnerability. --- libjose/src/jwt/profile/core.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libjose/src/jwt/profile/core.rs b/libjose/src/jwt/profile/core.rs index 35a52ce6d4..1543486977 100644 --- a/libjose/src/jwt/profile/core.rs +++ b/libjose/src/jwt/profile/core.rs @@ -238,8 +238,8 @@ impl TimeCop { } } - pub fn set_current(&mut self, value: impl Into) { - self.current = Some(value.into()); + pub fn set_current(&mut self, value: SystemTime) { + self.current = Some(value); } pub fn set_max_iat(&mut self, value: impl Into) {