Bläddra i källkod

Merge pull request #95 from tomamplius/fix-82

Fix redirect (#82)
Eduardo Mozart de Oliveira 11 månader sedan
förälder
incheckning
9133eabe72
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      front/callback.php
  2. 2 2
      inc/provider.class.php

+ 2 - 2
front/callback.php

@@ -92,8 +92,8 @@ if ($user_id || $signon_provider->login()) {
 
    if (isset($params['redirect'])) {
       $REDIRECT = '?redirect=' . $params['redirect'];
-   } else if (isset($_GET['state']) && is_integer(strpos($_GET['state'], "&redirect="))) {
-      $REDIRECT = '?' . substr($_GET['state'], strpos($_GET['state'], "&redirect=") + 1);
+   } else if (isset($_GET['state']) && is_integer(strpos($_GET['state'], ";redirect="))) {
+      $REDIRECT = '?' . substr($_GET['state'], strpos($_GET['state'], ";redirect=") + 1);
    }
 
    if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") {

+ 2 - 2
inc/provider.class.php

@@ -914,8 +914,8 @@ class PluginSinglesignonProvider extends CommonDBTM {
          exit;
       }
 
-      if (isset($_GET['state']) && is_integer(strpos($_GET['state'], "&redirect="))) {
-         $pos_redirect  = strpos($_GET['state'], "&redirect=");
+      if (isset($_GET['state']) && is_integer(strpos($_GET['state'], ";redirect="))) {
+         $pos_redirect  = strpos($_GET['state'], ";redirect=");
          $state         = substr($_GET['state'], 0, $pos_redirect);
          $_GET['state'] = substr($_GET['state'], $pos_redirect);
       } else {