comparison 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
comparison
equal deleted inserted replaced
619:70d0f27e5bd3 620:4aa6f0d79947
111 111
112 112
113 class OrthancApplicationEntityFilter : public IApplicationEntityFilter 113 class OrthancApplicationEntityFilter : public IApplicationEntityFilter
114 { 114 {
115 public: 115 public:
116 virtual bool IsAllowed(const std::string& /*callingIp*/, 116 virtual bool IsAllowedConnection(const std::string& /*callingIp*/,
117 const std::string& callingAet) 117 const std::string& /*callingAet*/)
118 { 118 {
119 return true;
120 }
121
122 virtual bool IsAllowedRequest(const std::string& /*callingIp*/,
123 const std::string& callingAet,
124 DicomRequestType type)
125 {
126 if (type == DicomRequestType_Store)
127 {
128 // Incoming store requests are always accepted, even from unknown AET
129 return true;
130 }
131
119 if (!IsKnownAETitle(callingAet)) 132 if (!IsKnownAETitle(callingAet))
120 { 133 {
121 LOG(ERROR) << "Unkwnown remote DICOM modality AET: \"" << callingAet << "\""; 134 LOG(ERROR) << "Unkwnown remote DICOM modality AET: \"" << callingAet << "\"";
122 return false; 135 return false;
123 } 136 }