#33368: Durationfield.clean fails to handle broken data
-----------------------------------+------------------------------------
     Reporter:  Florian Apolloner  |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Core (Other)       |                  Version:  dev
     Severity:  Normal             |               Resolution:
     Keywords:                     |             Triage Stage:  Accepted
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  1                  |                    UI/UX:  0
-----------------------------------+------------------------------------
Description changed by Florian Apolloner:

Old description:

> {{{
>  === Uncaught Python exception: ===
>         ValueError: could not convert string to float: '3(3'
>         Traceback (most recent call last):
>           File "basic_fuzzer.py", line 22, in TestOneInput
>           File "fuzzers.py", line 294, in test_forms_DurationField
>           File "django/forms/fields.py", line 149, in clean
>           File "django/forms/fields.py", line 502, in to_python
>           File "django/utils/dateparse.py", line 154, in parse_duration
>           File "django/utils/dateparse.py", line 154, in <dictcomp>
>
> }}}

New description:

 The actual input string was 'P3(3D' {{{
  === Uncaught Python exception: ===
         ValueError: could not convert string to float: '3(3'
         Traceback (most recent call last):
           File "basic_fuzzer.py", line 22, in TestOneInput
           File "fuzzers.py", line 294, in test_forms_DurationField
           File "django/forms/fields.py", line 149, in clean
           File "django/forms/fields.py", line 502, in to_python
           File "django/utils/dateparse.py", line 154, in parse_duration
           File "django/utils/dateparse.py", line 154, in <dictcomp>

 }}}

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33368#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d8f6b2d2630f49d506d44fa99717cbff%40djangoproject.com.

Reply via email to