Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds extra checks for dates #127

Merged
merged 5 commits into from
Oct 13, 2022
Merged

Adds extra checks for dates #127

merged 5 commits into from
Oct 13, 2022

Conversation

w4ll3
Copy link
Member

@w4ll3 w4ll3 commented Oct 12, 2022

This adds additional safeguards against an Invalid Range date (Feb 30).

@w4ll3 w4ll3 requested a review from sbihel October 12, 2022 19:01
packages/siwe/lib/client.ts Outdated Show resolved Hide resolved
packages/siwe/lib/utils.ts Show resolved Hide resolved
@w4ll3 w4ll3 requested a review from sbihel October 13, 2022 12:29
@w4ll3 w4ll3 merged commit e43c6f0 into main Oct 13, 2022
@w4ll3 w4ll3 deleted the feat/iso8601-validation branch October 13, 2022 14:14
const ISO8601 =
/^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
/** `issuedAt` conforms to ISO-8601 */
if (this.issuedAt) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this without a major version bump breaks things downstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants