[xml2rfc] Low priority bug - bad date input

"David R. Oran" <daveoran@orandom.net> Thu, 05 May 2022 13:18 UTC

Return-Path: <daveoran@orandom.net>
X-Original-To: xml2rfc@ietfa.amsl.com
Delivered-To: xml2rfc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4CAE5C14F74D for <xml2rfc@ietfa.amsl.com>; Thu, 5 May 2022 06:18:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mLKriCP1JL6J for <xml2rfc@ietfa.amsl.com>; Thu, 5 May 2022 06:18:11 -0700 (PDT)
Received: from spark.crystalorb.net (spark.crystalorb.net [IPv6:2607:fca8:1530::c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 54371C14F73E for <xml2rfc@ietf.org>; Thu, 5 May 2022 06:18:11 -0700 (PDT)
Received: from [192.168.15.242] ([IPv6:2601:184:407f:80cf:dbc:d42c:a59d:815a]) (authenticated bits=0) by spark.crystalorb.net (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 245DI73b005814 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=NO) for <xml2rfc@ietf.org>; Thu, 5 May 2022 06:18:09 -0700
From: "David R. Oran" <daveoran@orandom.net>
To: xml2rfc Mailing List <xml2rfc@ietf.org>
Date: Thu, 05 May 2022 09:18:01 -0400
X-Mailer: MailMate (1.14r5895)
Message-ID: <1340D948-3003-48B2-B62B-6B09FE1C479E@orandom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; markup="markdown"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/0rccvuLkPzzCaGf_LZvUS37lUuk>
Subject: [xml2rfc] Low priority bug - bad date input
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: XML2RFC discussion list <xml2rfc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc/>
List-Post: <mailto:xml2rfc@ietf.org>
List-Help: <mailto:xml2rfc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 May 2022 13:18:16 -0000

I mistakenly typed the year “2016” into the date field for a draft update and it crashed xml2rfc rather than reporting an input error:

oran@ORAN-M-51B7 icn-pathsteering % xml2rfc --text --pdf --html draft-oran-icnrg-pathsteering-06.xml
Traceback (most recent call last):
  File "/usr/local/bin/xml2rfc", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/xml2rfc/run.py", line 739, in main
    xmlrfc.tree = prep.prep()
  File "/usr/local/lib/python3.9/site-packages/xml2rfc/writers/preptool.py", line 216, in prep
    tree = self.dispatch(self.selectors)
  File "/usr/local/lib/python3.9/site-packages/xml2rfc/writers/base.py", line 1925, in dispatch
    func(e, e.getparent())
  File "/usr/local/lib/python3.9/site-packages/xml2rfc/writers/preptool.py", line 419, in check_attribute_values
    if i and not i.isdigit() and not i==self.get_attribute_defaults(c.tag)[a]:
KeyError: 'year'
oran@ORAN-M-51B7 icn-pathsteering %

DaveO