If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

500 error for invalid from/to revisions (e.g. not ints)

VERIFIED FIXED in 2.4.1

Status

support.mozilla.org
Knowledge Base Software
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: paulc, Assigned: paulc)

Tracking

unspecified
2.4.1

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Assignee)

Description

7 years ago
Traceback (most recent call last):

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/views/decorators/http.py", line 37, in inner
    return func(request, *args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/wiki/views.py", line 345, in compare_revisions
    id=request.GET.get('to'))

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/shortcuts/__init__.py", line 88, in get_object_or_404
    return queryset.get(*args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/query.py", line 333, in get
    clone = self.filter(*args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/query.py", line 550, in filter
    return self._filter_or_exclude(False, *args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/query.py", line 568, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/query.py", line 1128, in add_q
    can_reuse=used_aliases)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/query.py", line 1071, in add_filter
    connector)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/where.py", line 66, in add
    value = obj.prepare(lookup_type, value)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/where.py", line 299, in prepare
    return self.field.get_prep_lookup(lookup_type, value)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/fields/__init__.py", line 292, in get_prep_lookup
    return self.get_prep_value(value)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/fields/__init__.py", line 479, in get_prep_value
    return int(value)

ValueError: invalid literal for int() with base 10: 'OTU0MjIz'
(Assignee)

Comment 1

7 years ago
master:
https://github.com/jsocol/kitsune/commit/ba6d1f34a87a3efa70909dbe89d7ca7ea4297b17
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Assignee: nobody → paulc
Verified 'page not found' displays correctly and no tracebacks are sent for both invalid to/from revisions and also from single bad revision page numbers.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.