-
Notifications
You must be signed in to change notification settings - Fork 571
Description
Describe the issue
If a user submits an XML draft with a missing or incomplete date, the submission tool tries to fill in a reasonable guess. The rule is roughly
- Use year if provided, otherwise assume the current year
- Use month if provided, otherwise if the year is the current year, assume the current month
- ... similar stuff to guess a day ...
There's a poorly handled corner case here: if a user provides a year but not a month / day, the date is filled in but only if the year is the current year. If it's any other year, the month and day are left as None
. This leads to an unhandled exception that is logged as a generic "A system error occurred" type message in the submission's history.
This appears to have come up for at least one and maybe a couple users following 2025-01-01. I don't have their draft source, but I'm guessing they were using "2024" as the date in their drafts.
To resolve this, we must at least raise a SubmissionError
in the date extraction code for the case that we're unable to extract a date. If we raise this with a message that indicates that the problem was in the date element, then it will be reported to the submitter who will then have a useful nudge toward fixing their problem.
We might also consider improving the heuristics to look at time intervals rather than calendar years/months for deciding whether it's reasonable to assume "today" or "this month" as the date. That's a bigger can of worms, though.
Code of Conduct
- I agree to follow the IETF's Code of Conduct