Skip to content
Snippets Groups Projects
Commit 5defe2e1 authored by Olav Morken's avatar Olav Morken
Browse files

ArtifactResolutionService: Return empty ArtifactResponse when receiving a...

ArtifactResolutionService: Return empty ArtifactResponse when receiving a duplicate ArtifactResolve.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2534 44740490-163a-0410-bde0-09ae8108e29a
parent e75d1ce3
No related branches found
No related tags found
No related merge requests found
......@@ -35,12 +35,19 @@ if (!($request instanceof SAML2_ArtifactResolve)) {
throw new Exception('Message received on ArtifactResolutionService wasn\'t a ArtifactResolve request.');
}
$artifact = $request->getArtifact();
$responseData = $store->get('artifact', $artifact);
$document = new DOMDocument();
$document->loadXML($responseData);
$responseXML = $document->firstChild;
$artifactResponse = new SAML2_ArtifactResponse();
$store->delete('artifact', $artifact);
if ($responseData !== NULL) {
$document = new DOMDocument();
$document->loadXML($responseData);
$responseXML = $document->firstChild;
} else {
$responseXML = NULL;
}
$artifactResponse = new SAML2_ArtifactResponse();
$artifactResponse->setIssuer($idpEntityId);
$artifactResponse->setInResponseTo($request->getId());
$artifactResponse->setAny($responseXML);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment