Jelajahi Sumber

Fix provider ID and removed /test/1 in redirect_uri

invisiblemarcel 1 tahun lalu
induk
melakukan
32e3a39e0d
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 1
      inc/provider.class.php
  2. 1 1
      inc/toolbox.class.php

+ 2 - 1
inc/provider.class.php

@@ -290,7 +290,8 @@ class PluginSinglesignonProvider extends CommonDBTM {
          $("[name=test_singlesignon]").on("click", function (e) {
             e.preventDefault();
 
-            var url   = $("#singlesignon_callbackurl").attr("data-url") + "/test/1";
+            // Im not sure why /test/1 is added here, I got a problem with the redirect_uri because its added after /provider/id
+            var url   = $("#singlesignon_callbackurl").attr("data-url"); // + "/test/1";
             var left  = ($(window).width()/2)-(600/2);
             var top   = ($(window).height()/2)-(800/2);
             var newWindow = window.open(url, "singlesignon", "width=600,height=800,left=" + left + ",top=" + top);

+ 1 - 1
inc/toolbox.class.php

@@ -39,7 +39,7 @@ class PluginSinglesignonToolbox {
 
       $url = $CFG_GLPI['root_doc'] . '/plugins/singlesignon/front/callback.php';
 
-      $url .= "/provider/".$row['id'];
+      $url .= "/provider/".$row;
 
       if (!empty($query)) {
          $_SESSION['redirect'] = $query['redirect'];