Skip to content

Commit

Permalink
Merge pull request #116 from leogdion/patch-1
Browse files Browse the repository at this point in the history
ignore negative timeDifference
  • Loading branch information
Andrewangeta authored Feb 17, 2021
2 parents 3351215 + 38b36a7 commit ccb2d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/StripeKit/StripeClient+SignatureVerification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension StripeClient {

let timeDifference = Date().timeIntervalSince(Date(timeIntervalSince1970: time))

if tolerance > 0 && timeDifference > tolerance || timeDifference < 0 {
if tolerance > 0 && timeDifference > tolerance {
throw StripeSignatureError.timestampNotTolerated
}
}
Expand Down

0 comments on commit ccb2d27

Please sign in to comment.