File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,17 @@ public function receive(): Message
8787
8888 $ msg = Message::fromXML ($ document ->firstChild );
8989
90+ /**
91+ * 3.5.5.2 - SAML Bindings
92+ *
93+ * If the message is signed, the Destination XML attribute in the root SAML element of the protocol
94+ * message MUST contain the URL to which the sender has instructed the user agent to deliver the
95+ * message.
96+ */
97+ if ($ msg ->isMessageConstructedWithSignature ()) {
98+ Assert::notNull ($ msg ->getDestination ()); // Validation of the value must be done upstream
99+ }
100+
90101 if (array_key_exists ('RelayState ' , $ _POST )) {
91102 $ msg ->setRelayState ($ _POST ['RelayState ' ]);
92103 }
Original file line number Diff line number Diff line change @@ -141,6 +141,15 @@ public function receive(): Message
141141 return $ message ;
142142 }
143143
144+ /**
145+ * 3.4.5.2 - SAML Bindings
146+ *
147+ * If the message is signed, the Destination XML attribute in the root SAML element of the protocol
148+ * message MUST contain the URL to which the sender has instructed the user agent to deliver the
149+ * message.
150+ */
151+ Assert::notNull ($ message ->getDestination ()); // Validation of the value must be done upstream
152+
144153 if (!array_key_exists ('SigAlg ' , $ data )) {
145154 throw new \Exception ('Missing signature algorithm. ' );
146155 }
You can’t perform that action at this time.
0 commit comments