Skip to content

Commit

Permalink
fix: prevent access to pipes when dossierId is null
Browse files Browse the repository at this point in the history
  • Loading branch information
DelanoWAF committed Aug 1, 2024
1 parent a723d29 commit 45ac5cd
Showing 1 changed file with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,25 +294,28 @@
<SoapWrapperPipe name="WrapResult" removeOutputNamespaces="true"
storeResultInSessionKey="FileVersionDetails" />

<XsltPipe name="StoreDossierId" getInputFromSessionKey="originalMessage" xpathExpression="//dossiercode" storeResultInSessionKey="DossierId"/>
<XmlIfPipe name="IfDossierId" xpathExpression="//dossiercode != ''">
<Forward name="then" path="ConvertToModObjectRelationDossier" />
<Forward name="else" path="ConvertToDisconnectRequest" />
</XmlIfPipe>

<!-- Handle Dossier -->
<XsltPipe name="ConvertToModObjectRelationDossier" onlyIfSessionKey="DossierId"
<XsltPipe name="ConvertToModObjectRelationDossier"
styleSheetName="xsl/Message2ModObjectRelationDossier.xsl"
getInputFromSessionKey="originalMessage">
<Param name="systemdate" pattern="{now, date,dd/MM/yyyy}" />
<Param name="DossierID" sessionKey="DossierId" />
<Param name="Registratienummer" xpathExpression="//opslaanInkNatuurlijkPersoonResult" sessionKey="FileVersionDetails" />
</XsltPipe>

<SoapWrapperPipe name="WrapModObjectRelationDossierRequest" onlyIfSessionKey="DossierId"
<SoapWrapperPipe name="WrapModObjectRelationDossierRequest"
soapNamespace="http://www.w3.org/2003/05/soap-envelope"
storeResultInSessionKey="corsaRequest" />

<PutInSessionPipe name="storeModObjectRelationAction" sessionKey="RequestSoapAction" onlyIfSessionKey="DossierId"
<PutInSessionPipe name="storeModObjectRelationAction" sessionKey="RequestSoapAction"
value="http://bct.nl/ModObjectRelation" />

<SenderPipe name="Send_ModObjectRelationDossier_Request" onlyIfSessionKey="DossierId">
<SenderPipe name="Send_ModObjectRelationDossier_Request" >
<WebServiceSender sharedResourceRef="SharedHttpSession"
url="${corsa.url}" soapAction="http://bct.nl/ModObjectRelation" soap="false" />
<!-- Cannot check if Dossier exists and should not interrupt user, so ignore errors. -->
Expand Down Expand Up @@ -853,25 +856,28 @@
<SoapWrapperPipe name="WrapResult" removeOutputNamespaces="true"
storeResultInSessionKey="FileVersionDetails" />

<XsltPipe name="StoreDossierId" getInputFromSessionKey="originalMessage" xpathExpression="//dossiercode" storeResultInSessionKey="DossierId"/>

<XmlIfPipe name="IfDossierId" xpathExpression="//dossiercode != ''">
<Forward name="then" path="ConvertToModObjectRelationDossier" />
<Forward name="else" path="ConvertToDisconnectRequest" />
</XmlIfPipe>

<!-- Handle Dossier -->
<XsltPipe name="ConvertToModObjectRelationDossier"
styleSheetName="xsl/Message2ModObjectRelationDossier.xsl"
getInputFromSessionKey="originalMessage" onlyIfSessionKey="DossierId">
getInputFromSessionKey="originalMessage" >
<Param name="systemdate" pattern="{now, date,dd/MM/yyyy}" />
<Param name="DossierID" sessionKey="DossierId" />
<Param name="Registratienummer" xpathExpression="//opslaanInkNatuurlijkPersoonResult" sessionKey="FileVersionDetails" />
</XsltPipe>

<SoapWrapperPipe name="WrapModObjectRelationDossierRequest" onlyIfSessionKey="DossierId"
<SoapWrapperPipe name="WrapModObjectRelationDossierRequest"
soapNamespace="http://www.w3.org/2003/05/soap-envelope"
storeResultInSessionKey="corsaRequest" />

<PutInSessionPipe name="storeModObjectRelationAction" onlyIfSessionKey="DossierId" sessionKey="RequestSoapAction"
<PutInSessionPipe name="storeModObjectRelationAction" sessionKey="RequestSoapAction"
value="http://bct.nl/ModObjectRelation" />

<SenderPipe name="Send_ModObjectRelationDossier_Request" onlyIfSessionKey="DossierId">
<SenderPipe name="Send_ModObjectRelationDossier_Request" >
<WebServiceSender sharedResourceRef="SharedHttpSession"
url="${corsa.url}" soapAction="http://bct.nl/ModObjectRelation" soap="false" />
<!-- Cannot check if Dossier exists and should not interrupt user, so ignore errors. -->
Expand Down

0 comments on commit 45ac5cd

Please sign in to comment.