Skip to content

Commit

Permalink
Update TimeCop to avoid Into<SystemTime> (#444)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cycraig authored Oct 21, 2021
1 parent 973e0eb commit e6d1d0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libjose/src/jwt/profile/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ impl TimeCop {
}
}

pub fn set_current(&mut self, value: impl Into<SystemTime>) {
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<Duration>) {
Expand Down

0 comments on commit e6d1d0d

Please sign in to comment.