microsoft / VerifiableCredentials-Verification-SDK-Typescript

An SDK to help Relying Parties manages their Decentralized Identities and Verifiable Credentials.
MIT License
53 stars 14 forks source link

Fix bug where an expiration of zero was treated the same as no expiration #112

Closed gproanomsft closed 3 years ago

gproanomsft commented 3 years ago

Problem: An expiration of 0 which is a valid epoch time, is treated the same as no expiration. In the case of a expiration = 0, a token is validated when in fact it should be rejected as expired

Solution: Check for undefined instead of truthy

Validation: Added a new test case

Type of change:

Risk: