From 20e1ca466a2109a79fd9059f61c9b49e4d2a738f Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sat, 11 Aug 2018 18:51:45 +0200
Subject: [PATCH] Fix wrong error being caught

\SimpleSAML\Error\NoPassive is deprecated and all modules now raise \SimpleSAML\Module\saml\Error\NoPassive.
During this period of deprecation, we need to catch both flavours.

This fixes NoPassive-errors when using consentAdmin
---
 lib/SimpleSAML/Auth/ProcessingChain.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php
index 7d8e5aa2b..2b1aa72d2 100644
--- a/lib/SimpleSAML/Auth/ProcessingChain.php
+++ b/lib/SimpleSAML/Auth/ProcessingChain.php
@@ -270,7 +270,7 @@ class ProcessingChain
     /**
      * Process the given state passivly.
      *
-     * Modules with user interaction are expected to throw an \SimpleSAML\Error\NoPassive exception
+     * Modules with user interaction are expected to throw an \SimpleSAML\Module\saml\Error\NoPassive exception
      * which are silently ignored. Exceptions of other types are passed further up the call stack.
      *
      * This function will only return if processing completes.
@@ -299,7 +299,10 @@ class ProcessingChain
             try {
                 $filter->process($state);
             } catch (\SimpleSAML\Error\NoPassive $e) {
+                // @deprecated will be removed in 2.0
                 // Ignore \SimpleSAML\Error\NoPassive exceptions
+            } catch (\SimpleSAML\Module\saml\Error\NoPassive $e) {
+                // Ignore \SimpleSAML\Module\saml\Error\NoPassive exceptions
             }
         }
     }
-- 
GitLab