From 2ec315b5c7f92e69bb30bea39e833ce2b4318d2b Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tim.dijen@minbzk.nl>
Date: Mon, 18 Nov 2019 11:46:11 +0100
Subject: [PATCH] Standardize the way we collect PATH_INFO (#1228)

Closes #1227
---
 lib/SimpleSAML/Module.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php
index 01de00c53..33470a77d 100644
--- a/lib/SimpleSAML/Module.php
+++ b/lib/SimpleSAML/Module.php
@@ -129,7 +129,7 @@ class Module
             $request = Request::createFromGlobals();
         }
 
-        if ($request->getPathInfo() === '/') {
+        if ($request->server->get('PATH_INFO') === '/') {
             throw new Error\NotFound('No PATH_INFO to module.php');
         }
 
@@ -566,7 +566,7 @@ class Module
      */
     public static function removeTrailingSlash(Request $request)
     {
-        $pathInfo = $request->getPathInfo();
+        $pathInfo = $request->server->get('PATH_INFO');
         $url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $request->getRequestUri());
         return new RedirectResponse($url, 308);
     }
-- 
GitLab