Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 620:4aa6f0d79947 find-move-scp
security filter for dicom requests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Oct 2013 12:36:00 +0200 |
parents | 70d0f27e5bd3 |
children | 5425bb6f1ea5 |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Fri Oct 25 11:57:30 2013 +0200 +++ b/OrthancServer/main.cpp Fri Oct 25 12:36:00 2013 +0200 @@ -113,9 +113,22 @@ class OrthancApplicationEntityFilter : public IApplicationEntityFilter { public: - virtual bool IsAllowed(const std::string& /*callingIp*/, - const std::string& callingAet) + virtual bool IsAllowedConnection(const std::string& /*callingIp*/, + const std::string& /*callingAet*/) { + return true; + } + + virtual bool IsAllowedRequest(const std::string& /*callingIp*/, + const std::string& callingAet, + DicomRequestType type) + { + if (type == DicomRequestType_Store) + { + // Incoming store requests are always accepted, even from unknown AET + return true; + } + if (!IsKnownAETitle(callingAet)) { LOG(ERROR) << "Unkwnown remote DICOM modality AET: \"" << callingAet << "\"";