Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
56b58530
Commit
56b58530
authored
Dec 07, 2016
by
Bertrand Gauthier
Browse files
Correction du bug de redirection vers la page demandée en cas d'authentification CAS.
parent
29ca171f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Authentication/RedirectCallback.php
View file @
56b58530
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenAuth\Authentication
;
use
Zend\Http\PhpEnvironment\Request
;
use
Zend\Http\PhpEnvironment\Response
;
use
Zend\Mvc\Application
;
use
Zend\Mvc\Router\Exception
;
...
...
@@ -55,17 +56,21 @@ class RedirectCallback
*/
private
function
getRedirectRouteFromRequest
()
{
/** @var Request $request */
$request
=
$this
->
application
->
getRequest
();
$redirect
=
$request
->
getQuery
(
'redirect'
);
if
(
$redirect
&&
$this
->
routeExists
(
$redirect
))
{
return
$redirect
;
$redirectFromQuery
=
$request
->
getQuery
(
'redirect'
);
if
(
$redirectFromQuery
&&
$this
->
routeExists
(
$redirectFromQuery
))
{
return
$redirectFromQuery
;
}
$redirect
=
$request
->
getPost
(
'redirect'
);
if
(
$redirect
&&
$this
->
routeExists
(
$redirect
))
{
return
$redirect
;
$redirect
FromPost
=
$request
->
getPost
(
'redirect'
);
if
(
$redirect
FromPost
&&
$this
->
routeExists
(
$redirect
FromPost
))
{
return
$redirect
FromPost
;
}
$redirect
=
$redirectFromQuery
?:
$redirectFromPost
;
if
(
$redirect
)
{
return
$redirect
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment