Mercurial > hg > orthanc
changeset 4776:79d4e155592b
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Aug 2021 10:25:50 +0200 |
parents | add0337b928a (current diff) ec6843501db7 (diff) |
children | 3b78ba359db3 |
files | |
diffstat | 3 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Aug 30 10:24:36 2021 +0200 +++ b/NEWS Mon Aug 30 10:25:50 2021 +0200 @@ -1,6 +1,12 @@ Pending changes in the mainline =============================== +General +------- + +* New configuration option "DicomAlwaysAllowMove" to disable verification of the remote modality in C-MOVE SCP + + REST API --------
--- a/OrthancServer/Resources/Configuration.json Mon Aug 30 10:24:36 2021 +0200 +++ b/OrthancServer/Resources/Configuration.json Mon Aug 30 10:25:50 2021 +0200 @@ -291,6 +291,12 @@ // option to "true" implies security risks. (new in Orthanc 1.9.0) "DicomAlwaysAllowGet" : false, + // Whether the Orthanc SCP allows incoming C-MOVE requests, even + // from SCU modalities it does not know about (i.e. that are not + // listed in the "DicomModalities" option above). Setting this + // option to "true" implies security risks. (new in Orthanc 1.9.7) + "DicomAlwaysAllowMove" : false, + // Whether Orthanc checks the IP/hostname address of the remote // modality initiating a DICOM connection (as listed in the // "DicomModalities" option above). If this option is set to
--- a/OrthancServer/Sources/main.cpp Mon Aug 30 10:24:36 2021 +0200 +++ b/OrthancServer/Sources/main.cpp Mon Aug 30 10:25:50 2021 +0200 @@ -279,6 +279,7 @@ bool alwaysAllowEcho_; bool alwaysAllowFind_; // New in Orthanc 1.9.0 bool alwaysAllowGet_; // New in Orthanc 1.9.0 + bool alwaysAllowMove_; // New in Orthanc 1.9.7 bool alwaysAllowStore_; public: @@ -290,6 +291,7 @@ alwaysAllowEcho_ = lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowEcho", true); alwaysAllowFind_ = lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowFind", false); alwaysAllowGet_ = lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowGet", false); + alwaysAllowMove_ = lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowMove", false); alwaysAllowStore_ = lock.GetConfiguration().GetBooleanParameter("DicomAlwaysAllowStore", true); } @@ -302,6 +304,11 @@ { LOG(WARNING) << "Security risk in DICOM SCP: C-GET requests are always allowed, even from unknown modalities"; } + + if (alwaysAllowMove_) + { + LOG(WARNING) << "Security risk in DICOM SCP: C-MOOVE requests are always allowed, even from unknown modalities"; + } } virtual bool IsAllowedConnection(const std::string& remoteIp, @@ -314,6 +321,7 @@ if (alwaysAllowEcho_ || alwaysAllowFind_ || alwaysAllowGet_ || + alwaysAllowMove_ || alwaysAllowStore_) { return true; @@ -368,6 +376,12 @@ // Incoming C-Get requests are always accepted, even from unknown AET return true; } + else if (type == DicomRequestType_Move && + alwaysAllowMove_) + { + // Incoming C-Move requests are always accepted, even from unknown AET + return true; + } else { bool checkIp;