buildtable.pl: tighten date validation (disallow 00 month/day) #1988

pull viktorking7 wants to merge 2 commits into bitcoin:master from viktorking7:patch-1 changing 1 files +2 −1
  1. viktorking7 commented at 8:44 am on September 29, 2025: none

    Description:

    • Enforces valid month (01–12) and day (01–31) in the preamble date regex.
    • Prevents invalid inputs like 2023-00-00 from passing validation.
  2. Update buildtable.pl 79be58b2f6
  3. katesalazar commented at 10:35 am on September 29, 2025: contributor
  4. murchandamus added the label Typo-to-be-collected on Sep 29, 2025
  5. in scripts/buildtable.pl:202 in 79be58b2f6
    198@@ -199,7 +199,8 @@
    199 				die "First Comments-URI must be exactly \"$first_comments_uri\" in $fn" unless $val eq $first_comments_uri;
    200 			}
    201 		} elsif (exists $DateField{$field}) {
    202-			die "Invalid date format in $fn" unless $val =~ /^20\d{2}\-(?:0\d|1[012])\-(?:[012]\d|30|31)$/;
    203+			# Enforce valid month (01-12) and day (01-31), disallow 00
    


    jonatack commented at 4:10 pm on October 3, 2025:
    0			# Enforce date format 20XX-MM-DD, where XX is 00-99, MM is 01-12 and DD is 01-31.
    
  6. jonatack commented at 4:11 pm on October 3, 2025: member
    ACK, modulo comment suggestion.
  7. Update scripts/buildtable.pl
    Co-authored-by: Jon Atack <jon@atack.com>
    4bbf0ffdec
  8. jonatack commented at 4:16 pm on October 3, 2025: member
    ACK. Will pull this into the typos and fix-ups compilation today.
  9. jonatack commented at 7:25 pm on October 3, 2025: member
    Cherry-picked into #1998 (thanks!), so closing here.
  10. jonatack closed this on Oct 3, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-12 05:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me