poll: dates are not properly validated

Bug #33203 reported by StefanPotyra
8
Affects Status Importance Assigned to Milestone
Launchpad itself
Won't Fix
Low
Unassigned

Bug Description

Hi,

how to replicate: updating the starting/ending date of a poll to an invalid date, will result in the date being changed. Example 2006-14-02 will not result an error but result in a changed date (s.th. like 2006-02-15)

References:
https://launchpad.net/people/motu/+poll/meeting0603-1-date

Cheers,
  Stefan.

Revision history for this message
Diogo Matsubara (matsubara) wrote :

I tried to reproduce it but didn't get any error and when I use a invalid date, the validator gives me a nice Invalid date format. When I tried with the dates supplied on the bug report, the form changes the format to YYYY-DD-MM to the ISO format YYYY-MM-DD, but didn't change the date to another day, as reported.

Could you described another way to reproduce the bug?

Thanks for helping.

Changed in launchpad:
status: Unconfirmed → Needs Info
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 33203] poll: dates are not properly validated

On Thu, Mar 02, 2006 at 09:05:57PM -0000, Diogo Matsubara wrote:
> Public bug report changed:
> https://launchpad.net/malone/bugs/33203
>
> Comment:
> I tried to reproduce it but didn't get any error and when I use a
> invalid date, the validator gives me a nice Invalid date format. When I
> tried with the dates supplied on the bug report, the form changes the
> format to YYYY-DD-MM to the ISO format YYYY-MM-DD, but didn't change the
> date to another day, as reported.

The bug report never mentions anything about getting an error, does it?
It says that 2006-14-02 *didn't* produce an error. I agree with the
reporter, it should produce an invalid date error. We shouldn't try to
guess which format the user entered the date in. If someone enters
2006-14-02 and we accept it as 2006-02-14, the user might think that
YYYY-DD-MM is the correct format. And the next time he will enter
2006-10-03, when he meant the 10th of March.

(the initial report says "something like 2006-02-15", in reality it
probably was changed to 2006-02-14.)

Revision history for this message
StefanPotyra (sistpoty) wrote :

Hi Diogo,

Björn described it quite well, the problem is that there is no error ;).
I actually found this bug, when I tried to find out in what format I would need to enter the date. My idea was, that the format was in YYYY-MM-DD, so I tried to enter s.th. invalid for that, which unfortunately resulted in a date in the past.

I also second Björn, that guessing the format is not a good option: If I had entered the date in YYYY-DD-MM and the guess would have produced the right date, I think that I would continue to enter dates in YYYY-DD-MM (which would then probably result in wrong dates, if the guess is ambigous).

HTH,
   Stefan.

Changed in launchpad:
status: Needs Info → Confirmed
Changed in launchpad-foundations:
status: Confirmed → Triaged
Curtis Hovey (sinzui)
Changed in launchpad-registry:
importance: Medium → Low
Brad Crittenden (bac)
tags: added: bugjam2010
Changed in launchpad:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.