Skip to content

Commit

Permalink
fix(RFC3339): fix regex to differentiate closing group Z or timezone …
Browse files Browse the repository at this point in the history
…offset
  • Loading branch information
lemoustachiste committed Jun 21, 2022
1 parent ce82385 commit 41f1797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cert_issuer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# TODO: move the v3 checks to cert-schema
def validate_RFC3339_date (date):
return re.match('^[1-9]\d{3}-\d{2}-\d{2}[Tt\s]\d{2}:\d{2}:\d{2}(?:\.\d{3})?(?:[+-]\d{2}:\d{2})?[Zz]$', date)
return re.match('^[1-9]\d{3}-\d{2}-\d{2}[Tt\s]\d{2}:\d{2}:\d{2}(?:\.\d{3})?((?:[+-]\d{2}:\d{2})|[Zz])$', date)

def is_valid_url (url):
try:
Expand Down

0 comments on commit 41f1797

Please sign in to comment.