Bug #7822
CAS URLs : permit call without trailing slash
Status:
Fermé
Priority:
Normal
Assignee:
Category:
authentic2-idp-cas
Target version:
Start date:
10 July 2015
Due date:
% Done:
100%
Estimated time:
Patch proposed:
Yes
Planning:
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
History
Updated by Benjamin Dauvergne over 7 years ago
Could you provide a git patch ? I'll integrate it immediately. (from git format-patch)
Updated by Benjamin Dauvergne over 7 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit authentic2|1b5a1d28d188cbf7fa67468c0e53644747fddeb6.
Updated by Benjamin Renard over 7 years ago
Benjamin Dauvergne a écrit :
Appliqué par commit authentic2|1b5a1d28d188cbf7fa67468c0e53644747fddeb6.
Merci !
Updated by Benjamin Dauvergne over 7 years ago
- Assignee changed from Gestion d'identité to Benjamin Dauvergne
Updated by Benjamin Dauvergne almost 7 years ago
- Status changed from Résolu (à déployer) to Solution déployée
authentic2_idp_cas: accept URL without the trailing slashes to conform to the specification (fixes #7822)