bioinformatics-ua / dicoogle

Dicoogle - Open Source PACS
http://www.dicoogle.com/
GNU General Public License v3.0
445 stars 132 forks source link

Make Find SCP resilient to missing query-retrievel level #665

Closed Enet4 closed 1 year ago

Enet4 commented 1 year ago

Fixes a server error situation when the FIND SCP service receives a malformed request with a missing Query/Retrieve Level.

Sumary

Enet4 commented 1 year ago

Tested this with two different SCU tools:

Incidents can be seen from the logs, no stack traces so it's not too noisy:

INFO  DicomLog.LogDICOM (LogDICOM.java:71) - [FINDSCU] cfind FINDSCU(4) --  Modality - CR
INFO  net.PDUEncoder (PDUEncoder.java:379) - FINDSCU(4) << 1:C-FIND-RSP[pcid=1, status=fe00H
        error=Query/Retrieve Level invalid or missing
        cuid=1.2.840.10008.5.1.4.1.2.2.1/Study Root Query/Retrieve Information Model - FIND]
INFO  net.Association (Association.java:991) - FINDSCU(4) >> A-RELEASE-RQ
INFO  net.PDUEncoder (PDUEncoder.java:120) - FINDSCU(4) << A-RELEASE-RP
INFO  net.Association (Association.java:916) - FINDSCU(4): close Socket[addr=/...,port=59755,localport=1045]