Skip to content

Commit 3c8c8d9

Browse files
committed
Do not strip off things around entitydescriptor
1 parent 8d847e7 commit 3c8c8d9

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

modules/saml/src/Controller/Metadata.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
use Symfony\Component\HttpFoundation\Request;
1717
use Symfony\Component\HttpFoundation\Response;
1818

19-
use function strpos;
20-
use function strrpos;
21-
use function substr;
22-
2319
/**
2420
* Controller class for the IdP metadata.
2521
*
@@ -104,14 +100,6 @@ public function metadata(Request $request): Response
104100
// sign the metadata if enabled
105101
$metaxml = SSPMetadata\Signer::sign($metaxml, $metaArray, 'SAML 2 IdP');
106102

107-
// make sure to export only the md:EntityDescriptor
108-
$i = strpos($metaxml, '<md:EntityDescriptor');
109-
$metaxml = substr($metaxml, $i ? $i : 0);
110-
111-
// 22 = strlen('</md:EntityDescriptor>')
112-
$i = strrpos($metaxml, '</md:EntityDescriptor>');
113-
$metaxml = substr($metaxml, 0, $i ? $i + 22 : 0);
114-
115103
$response = new Response();
116104
$response->setEtag(hash('sha256', $metaxml));
117105
$response->setPublic();

0 commit comments

Comments
 (0)