date fields can have unsupported dates
Bug #602738 reported by
Curtis Hovey
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
j.c.sackett |
Bug Description
Launchpad date/datetime field does not verify that date is supported by strftime(). All dates entered by users are assumed to be sane, but OOPS-1649ED3054 shows that a user entered 1010 instead of 2010. Pages that call fmt:datetime cannot show the date:
ValueError: year=1010 is before 1900; the datetime strftime() methods require year >= 1900
There are two options:
a) add validation to the fields to ensure we get a date we expect
b) make fmt:datetime robust to survive an insane date.
Related branches
lp://qastaging/~jcsackett/launchpad/date-validation
- Curtis Hovey (community): Approve (code)
-
Diff: 1596 lines (+225/-125)98 files modifiedlib/canonical/launchpad/configure.zcml (+1/-0)
lib/canonical/launchpad/doc/image-widget.txt (+3/-3)
lib/canonical/launchpad/doc/location-widget.txt (+1/-1)
lib/canonical/launchpad/doc/stripped-text-widget.txt (+1/-1)
lib/canonical/launchpad/interfaces/account.py (+1/-1)
lib/canonical/launchpad/interfaces/authtoken.py (+1/-1)
lib/canonical/launchpad/webapp/configure.zcml (+1/-1)
lib/canonical/launchpad/zcml/configure.zcml (+0/-1)
lib/canonical/widgets/bugtask.py (+1/-1)
lib/canonical/widgets/image.py (+1/-1)
lib/canonical/widgets/product.py (+1/-1)
lib/lp/answers/browser/questiontarget.py (+1/-1)
lib/lp/answers/interfaces/answercontact.py (+1/-1)
lib/lp/answers/interfaces/faq.py (+1/-1)
lib/lp/answers/interfaces/question.py (+1/-1)
lib/lp/answers/interfaces/questiontarget.py (+1/-1)
lib/lp/blueprints/interfaces/specification.py (+1/-1)
lib/lp/blueprints/interfaces/specificationbranch.py (+1/-1)
lib/lp/blueprints/interfaces/specificationfeedback.py (+1/-1)
lib/lp/blueprints/interfaces/specificationsubscription.py (+1/-1)
lib/lp/blueprints/interfaces/sprint.py (+1/-1)
lib/lp/blueprints/interfaces/sprintattendance.py (+1/-1)
lib/lp/blueprints/interfaces/sprintspecification.py (+1/-1)
lib/lp/bugs/browser/bug.py (+1/-1)
lib/lp/bugs/browser/bugalsoaffects.py (+1/-1)
lib/lp/bugs/browser/bugtask.py (+1/-1)
lib/lp/bugs/browser/bugwatch.py (+1/-1)
lib/lp/bugs/doc/bugwidget.txt (+1/-1)
lib/lp/bugs/interfaces/bug.py (+1/-1)
lib/lp/bugs/interfaces/bugattachment.py (+1/-1)
lib/lp/bugs/interfaces/bugbranch.py (+1/-1)
lib/lp/bugs/interfaces/buglink.py (+1/-1)
lib/lp/bugs/interfaces/bugmessage.py (+1/-1)
lib/lp/bugs/interfaces/bugnomination.py (+1/-1)
lib/lp/bugs/interfaces/bugnotification.py (+1/-1)
lib/lp/bugs/interfaces/bugsubscription.py (+1/-1)
lib/lp/bugs/interfaces/bugsupervisor.py (+1/-1)
lib/lp/bugs/interfaces/bugtarget.py (+1/-1)
lib/lp/bugs/interfaces/bugtask.py (+1/-1)
lib/lp/bugs/interfaces/bugtracker.py (+1/-1)
lib/lp/bugs/interfaces/bugwatch.py (+1/-1)
lib/lp/bugs/interfaces/securitycontact.py (+1/-1)
lib/lp/bugs/model/bug.py (+1/-1)
lib/lp/buildmaster/interfaces/builder.py (+1/-1)
lib/lp/code/browser/branchmergeproposal.py (+1/-1)
lib/lp/code/browser/codeimport.py (+1/-1)
lib/lp/code/browser/codereviewvote.py (+1/-1)
lib/lp/code/interfaces/branch.py (+1/-1)
lib/lp/code/interfaces/branchmergeproposal.py (+1/-1)
lib/lp/code/interfaces/branchmergequeue.py (+1/-1)
lib/lp/code/interfaces/branchsubscription.py (+1/-1)
lib/lp/code/interfaces/branchvisibilitypolicy.py (+1/-1)
lib/lp/code/interfaces/codeimport.py (+1/-1)
lib/lp/code/interfaces/codeimportevent.py (+1/-1)
lib/lp/code/interfaces/codereviewvote.py (+1/-1)
lib/lp/code/interfaces/revision.py (+1/-1)
lib/lp/code/interfaces/sourcepackagerecipe.py (+1/-1)
lib/lp/registry/browser/announcement.py (+1/-1)
lib/lp/registry/browser/person.py (+1/-1)
lib/lp/registry/browser/product.py (+1/-1)
lib/lp/registry/browser/productseries.py (+1/-1)
lib/lp/registry/browser/project.py (+1/-1)
lib/lp/registry/browser/team.py (+1/-1)
lib/lp/registry/browser/tests/test_milestone.py (+48/-0)
lib/lp/registry/doc/pillar-aliases-field.txt (+1/-1)
lib/lp/registry/interfaces/commercialsubscription.py (+1/-1)
lib/lp/registry/interfaces/distribution.py (+2/-2)
lib/lp/registry/interfaces/distributionmirror.py (+1/-1)
lib/lp/registry/interfaces/distroseries.py (+1/-1)
lib/lp/registry/interfaces/entitlement.py (+1/-1)
lib/lp/registry/interfaces/mailinglist.py (+1/-1)
lib/lp/registry/interfaces/mentoringoffer.py (+1/-1)
lib/lp/registry/interfaces/milestone.py (+3/-2)
lib/lp/registry/interfaces/person.py (+1/-1)
lib/lp/registry/interfaces/poll.py (+1/-1)
lib/lp/registry/interfaces/product.py (+1/-1)
lib/lp/registry/interfaces/productrelease.py (+1/-1)
lib/lp/registry/interfaces/productseries.py (+1/-1)
lib/lp/registry/interfaces/projectgroup.py (+2/-2)
lib/lp/registry/interfaces/series.py (+1/-1)
lib/lp/registry/interfaces/structuralsubscription.py (+1/-1)
lib/lp/registry/interfaces/wikiname.py (+1/-1)
lib/lp/services/fields/__init__.py (+30/-5)
lib/lp/services/fields/configure.zcml (+17/-10)
lib/lp/services/fields/doc/uri-field.txt (+1/-1)
lib/lp/services/fields/tests/__init__.py (+1/-1)
lib/lp/services/fields/tests/test_fields.py (+31/-12)
lib/lp/services/fields/tests/test_tag_fields.py (+1/-1)
lib/lp/services/worlddata/interfaces/country.py (+1/-1)
lib/lp/soyuz/browser/archivesubscription.py (+1/-1)
lib/lp/soyuz/interfaces/archive.py (+1/-1)
lib/lp/soyuz/interfaces/archivepermission.py (+1/-1)
lib/lp/soyuz/interfaces/archivesubscriber.py (+1/-1)
lib/lp/testopenid/interfaces/server.py (+1/-1)
lib/lp/translations/interfaces/potemplate.py (+1/-1)
lib/lp/translations/interfaces/translationgroup.py (+1/-1)
lib/lp/translations/interfaces/translationimportqueue.py (+1/-1)
lib/lp/translations/interfaces/translator.py (+1/-1)
summary: |
- Milestones can have unsupported dates + date fields can have unsupported dates |
description: | updated |
Changed in launchpad-registry: | |
milestone: | none → 10.09 |
Changed in launchpad-registry: | |
importance: | Low → High |
Changed in launchpad-registry: | |
assignee: | nobody → j.c.sackett (jcsackett) |
status: | Triaged → In Progress |
Changed in launchpad-foundations: | |
assignee: | nobody → j.c.sackett (jcsackett) |
status: | Triaged → Fix Committed |
Changed in launchpad-registry: | |
status: | In Progress → Fix Committed |
Changed in launchpad-foundations: | |
milestone: | none → 10.09 |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad-registry: | |
status: | Fix Committed → Fix Released |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I vote for (a) first, (b) eventually.