Project

General

Profile

Bug #7822

CAS URLs : permit call without trailing slash

Added by Benjamin Renard about 4 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Category:
authentic2-idp-cas
Target version:
Start date:
10 Jul 2015
Due date:
% Done:

100%

Patch proposed:
Yes
Planning:
No

Description

When Authentic2 acting as CAS server, well-known URLs (/login, /serviceValidate, ...) required a trailing slash. Majority of CAS client libraries I known, does not add this trailing slash and simply call, for instance :

https://cas.domain.tld/cas/login?service=~~~
https://cas.domain.tld/cas/serviceValidate?service=~~~&ticket=~~

To handle this request, I mean you could simply made the trailing slash optional. I propose to do this in authentic2_idp_cas/urls.py :

urlpatterns = patterns('',
        url('^login/?$', views.login, name='a2-idp-cas-login'),
        url('^continue/?$', views._continue, name='a2-idp-cas-continue'),
        url('^validate/?$', views.validate, name='a2-idp-cas-validate'),
        url('^serviceValidate/?$', views.service_validate,
            name='a2-idp-cas-service-validate'),
        url('^logout/?$', views.logout, name='a2-idp-cas-logout'),
        url('^proxy/?$', views.proxy, name='a2-idp-cas-proxy'),
        url('^proxyValidate/?$', views.proxy_validate,
            name='a2-idp-cas-proxy-validate'),
)

I only add this character ? after the trailing slashes in URLs pattern. This work well with phpCAS library.

Associated revisions

Revision 1b5a1d28 (diff)
Added by Benjamin Dauvergne about 4 years ago

authentic2_idp_cas: accept URL without the trailing slashes to conform to the specification (fixes #7822)

History

#1 Updated by Benjamin Dauvergne about 4 years ago

Could you provide a git patch ? I'll integrate it immediately. (from git format-patch)

#2 Updated by Benjamin Dauvergne about 4 years ago

  • % Done changed from 0 to 100
  • Status changed from Nouveau to Résolu (à déployer)

#3 Updated by Benjamin Renard about 4 years ago

Benjamin Dauvergne a écrit :

Appliqué par commit authentic2|1b5a1d28d188cbf7fa67468c0e53644747fddeb6.

Merci !

#4 Updated by Benjamin Dauvergne about 4 years ago

  • Assignee changed from Gestion d'identité to Benjamin Dauvergne

#5 Updated by Benjamin Dauvergne about 4 years ago

  • Target version set to 2.2.0

#6 Updated by Benjamin Dauvergne over 3 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

#7 Updated by Benjamin Dauvergne over 1 year ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF