Closed
Bug 930300
Opened 11 years ago
Closed 9 years ago
[traceback] TypeError: argument of type 'NoneType' is not iterable
Categories
(developer.mozilla.org Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stephend, Assigned: jezdez)
References
()
Details
(Whiteboard: [specification][type:bug][fuzzer])
What did you do?
================
https://developer-dev.allizom.org/en-US/search?q=%3Cscript%3Evar+pf_68747470733a2f2f646576656c6f7065722d6465762e616c6c697a6f6d2e6f72672f656e2d55532f736561726368_71=new+Boolean%28%29;%3C/script%3E
What happened?
==============
Threw a 500 error / Internal Server Error; here's the stack:
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-1.11.0.55/newrelic/hooks/framework_django.py", line 475, in wrapper return wrapped(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/apps/search/views.py", line\ 110, in search select_url = merge_param(url, 'topic', result_facet['term'])
File "/data/www/developer-dev.allizom.org/kuma/apps/search/views.py", line\ 54, in merge_param return url.set_query_params(param_dict)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/urlobject.py", line 451, in set_query_params return self.with_query(self.query.set_params(*args,\ **kwargs))
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 84, in set_params new = new.set_param(name, value)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 78, in set_param return self.del_param(name).add_param(name, value)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 56, in add_param parameter = '&'.join([qs_encode(name) + '=' + qs_encode(val)\ for val in value])
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 117, in _qs_encode_py2 return urllib.quote_plus(s).decode('utf-8')
File "/usr/lib64/python2.6/urllib.py", line 1241, in quote_plus if ' '\ in s:
TypeError: argument of type 'NoneType' is not iterable
What should have happened?
==========================
No results found, or something
Is there anything else we should know?
======================================
There's also this exception thrown:
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-1.11.0.55/newrelic/hooks/framework_django.py", line 475, in wrapper return wrapped(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/apps/sumo/decorators.py", line\ 15, in _checkssl return view_func(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django/django/views/decorators/debug.py", line 75, in sensitive_post_parameters_wrapper return view(request, *args,\ **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/apps/users/views.py", line 131,\ in browserid_verify result = _verify_browserid(form, request)
File "/data/www/developer-dev.allizom.org/kuma/apps/users/views.py", line 59,\ in _verify_browserid result = backend.verify(assertion, get_audience(request))
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-browserid/django_browserid/auth.py", line 142, in verify 'audience': audience
File "/usr/lib64/python2.6/urllib.py", line 1281, in urlencode v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128)
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Reporter | ||
Updated•11 years ago
|
Whiteboard: [specification][type:bug] → [specification][type:bug][fuzzer]
Reporter | ||
Comment 2•11 years ago
|
||
Still happening: https://rpm.newrelic.com/accounts/263620/applications/3171745/traced_errors/1430536275
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/hooks/framework_django.py", line 492, in wrapper return wrapped(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/compat.py", line 127, in view return self.dispatch(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/apps/search/views.py", line 51, in dispatch return super(SearchView, self).dispatch(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django/django/views/decorators/csrf.py", line 77, in wrapped_view return view_func(*args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/views.py", line 399, in dispatch response = self.handle_exception(exc)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/views.py", line 396, in dispatch response = handler(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/generics.py", line 402, in get return self.list(request, *args, **kwargs)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/mixins.py", line 96, in list return Response(serializer.data)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 507, in data self._data = self.to_native(obj)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 309, in to_native value = field.field_to_native(obj, field_name)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 361, in field_to_native return [self.to_native(item) for item in value]
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 309, in to_native value = field.field_to_native(obj, field_name)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 361, in field_to_native return [self.to_native(item) for item in value]
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 309, in to_native value = field.field_to_native(obj, field_name)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/serializers.py", line 345, in field_to_native value = get_component(value, component)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/django-rest-framework/rest_framework/fields.py", line 59, in get_component return val()
File "/data/www/developer-dev.allizom.org/kuma/apps/search/queries.py", line 22, in urls self.url.merge_query_param('topic', self.slug)),
File "/data/www/developer-dev.allizom.org/kuma/apps/search/utils.py", line 34, in merge_query_param return self.set_query_params(params)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/urlobject.py", line 451, in set_query_params return self.with_query(self.query.set_params(*args, **kwargs))
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 84, in set_params new = new.set_param(name, value)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 78, in set_param return self.del_param(name).add_param(name, value)
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 56, in add_param parameter = '&'.join([qs_encode(name) + '=' + qs_encode(val) for val in value])
File "/data/www/developer-dev.allizom.org/kuma/vendor/src/urlobject/urlobject/query_string.py", line 117, in _qs_encode_py2 return urllib.quote_plus(s).decode('utf-8')
File "/usr/lib64/python2.6/urllib.py", line 1241, in quote_plus if ' ' in s:
TypeError: argument of type 'NoneType' is not iterable
Reporter | ||
Comment 3•9 years ago
|
||
URL: https://developer.allizom.org/en-US/search?q=javascript%20&&&highlight=false
New stack from staging:
TypeError: argument of type 'NoneType' is not iterable
Stacktrace (most recent call last):
File "django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "newrelic/hooks/framework_django.py", line 499, in wrapper
return wrapped(*args, **kwargs)
File "django/views/decorators/csrf.py", line 57, in wrapped_view
return view_func(*args, **kwargs)
File "django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "newrelic/hooks/component_djangorestframework.py", line 27, in _nr_wrapper_APIView_dispatch_
return wrapped(*args, **kwargs)
File "rest_framework/views.py", line 403, in dispatch
response = self.handle_exception(exc)
File "rest_framework/views.py", line 400, in dispatch
response = handler(request, *args, **kwargs)
File "rest_framework/generics.py", line 451, in get
return self.list(request, *args, **kwargs)
File "kuma/search/views.py", line 68, in list
return super(SearchView, self).list(request, *args, **kwargs)
File "rest_framework/mixins.py", line 98, in list
return Response(serializer.data)
File "rest_framework/serializers.py", line 576, in data
self._data = self.to_native(obj)
File "rest_framework/serializers.py", line 355, in to_native
value = field.field_to_native(obj, field_name)
File "rest_framework/fields.py", line 1041, in field_to_native
value = getattr(self.parent, self.method_name)(obj)
File "kuma/search/serializers.py", line 124, in get_filters
many=True
File "rest_framework/serializers.py", line 574, in data
self._data = [self.to_native(item) for item in obj]
File "rest_framework/serializers.py", line 355, in to_native
value = field.field_to_native(obj, field_name)
File "rest_framework/serializers.py", line 420, in field_to_native
return [self.to_native(item) for item in value]
File "rest_framework/serializers.py", line 355, in to_native
value = field.field_to_native(obj, field_name)
File "rest_framework/serializers.py", line 409, in field_to_native
value = get_component(value, component)
File "rest_framework/fields.py", line 61, in get_component
return val()
File "kuma/search/queries.py", line 15, in urls
self.url.merge_query_param(self.group_slug, self.slug)),
File "kuma/search/utils.py", line 48, in merge_query_param
return self.without_query().set_query_params(self.clean_params(params))
File "urlobject/urlobject.py", line 487, in set_query_params
return self.with_query(self.query.set_params(*args, **kwargs))
File "urlobject/query_string.py", line 84, in set_params
new = new.set_param(name, value)
File "urlobject/query_string.py", line 78, in set_param
return self.del_param(name).add_param(name, value)
File "urlobject/query_string.py", line 56, in add_param
parameter = '&'.join([qs_encode(name) + '=' + qs_encode(val) for val in value])
File "urlobject/query_string.py", line 121, in _qs_encode_py2
return urllib.quote_plus(s).decode('utf-8')
File "python2.7/urllib.py", line 1298, in quote_plus
if ' ' in s:
Errormill: https://errormill.mozilla.org/mdn/mdn-stage/group/398574/
Assignee | ||
Comment 4•9 years ago
|
||
Assignee: nobody → jezdez
Status: NEW → ASSIGNED
Comment 5•9 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/287659abc37d7b87835fbd453ec9b805ec9f32d5
Fix bug 930300 - Don't stumble over querystrings with empty parameter names.
https://github.com/mozilla/kuma/commit/799b1cbe8407fbe29d523e0befa2b795cc80adff
Merge pull request #3272 from mozilla/bug930300
Fix bug 930300 - Don't stumble over querystrings with empty parameter names.
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•9 years ago
|
||
Thx! Verified FIXED on stage and prod: https://developer.allizom.org/en-US/search?q=%3Cscript%3Evar+pf_68747470733a2f2f646576656c6f7065722d6465762e616c6c697a6f6d2e6f72672f656e2d55532f736561726368_71=new+Boolean%28%29;%3C/script / https://developer.mozilla.org/en-US/search?q=%3Cscript%3Evar+pf_68747470733a2f2f646576656c6f7065722d6465762e616c6c697a6f6d2e6f72672f656e2d55532f736561726368_71=new+Boolean%28%29;%3C/script
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•