"maximum recursion depth exceeded" in make_URL_secure()

Bug #1313919 reported by Hasenkopf, Andreas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ain't No Wiki
Status tracked in Trunk
Stable
Fix Released
Low
Unassigned
Trunk
Fix Released
Low
Hasenkopf, Andreas

Bug Description

Even if never encountered during testing, Google bot can cause a RuntimeError on the page /users/login:

Traceback (most recent call last):

  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py", line 99, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/home/andi/aintnowiki/wiki/decorators.py", line 12, in _wrapped_view_func
    return view_func(request, *args, **kwargs)

  File "/home/andi/aintnowiki/users/views.py", line 244, in userlogin
    },request,make_URL_secure(nextpage))

  File "/home/andi/aintnowiki/users/views.py", line 133, in make_URL_secure
    return make_URL_secure(settings.HOST_ADDR+reg.groups()[1])
[...]
  File "/home/andi/aintnowiki/users/views.py", line 116, in make_URL_secure
    if not getattr(settings,'HTTPS_SUPPORT',True):

RuntimeError: maximum recursion depth exceeded

<WSGIRequest
path:/users/login/,
GET:<QueryDict: {u'/users/login/': [u'/wiki/revision/127/exercise-problems-iii/']}>,
POST:<QueryDict: {}>,
[...]
'QUERY_STRING': '/users/login/=/wiki/revision/127/exercise-problems-iii/',
[...]
'SCRIPT_URI': 'https://www.example.com/users/login/',
'SERVER_NAME': 'www.example.com',
'REQUEST_METHOD': 'GET',
'REQUEST_URI': '/users/login/?/users/login/=/wiki/revision/127/exercise-problems-iii/',

Related branches

Changed in aintnowiki:
milestone: 1.0 → none
Revision history for this message
Hasenkopf, Andreas (andi-hasenkopf) wrote :

Fixed regular expression in function make_URL_secure() to also identify URLS starting with "//".

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.