missing key in saml request

Bug #1255060 reported by Ricardo Kirkner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical SSO provider
New
Undecided
Unassigned

Bug Description

There have been some oopses related to SAML requests. It looks like the saml2idp code could be more robust against missing keys in the request.

A sample OOPS traceback is included

  MultiValueDictKeyError: "Key 'SAMLRequest' not found in <QueryDict: {u'ec': [u'302'], u'startURL': [u'/a0TD0000006T0g8']}>"

      File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/lib/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/lib/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/src/ubuntu_sso_saml/views.py", line 14, in saml_begin
    return login_begin(request)
  File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/lib/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/lib/saml2idp/views.py", line 49, in login_begin
    request.session['SAMLRequest'] = source['SAMLRequest']
  File "/srv/login.ubuntu.com/production/canonical-identity-provider-rev-1069/lib/django/utils/datastructures.py", line 295, in __getitem__
    raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))

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.