Mercurial > hg > orthanc-authorization
comparison Plugin/ResourceHierarchyCache.cpp @ 77:94a9484d7f8f
fix security issues allowing to browse remote dicom servers + introduced UnitTests
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 15 Mar 2023 16:36:42 +0100 |
parents | 1a13c4fbc9a1 |
children | a2e5ea1869bd |
comparison
equal
deleted
inserted
replaced
76:d301047ee3c4 | 77:94a9484d7f8f |
---|---|
191 else | 191 else |
192 { | 192 { |
193 return false; | 193 return false; |
194 } | 194 } |
195 } | 195 } |
196 | |
197 void ResourceHierarchyCache::AddOrthancDicomMapping(Orthanc::ResourceType level, | |
198 const std::string& orthancId, | |
199 const std::string& dicomUid) | |
200 { | |
201 dicomToOrthanc_->Store(ComputeKey(level, dicomUid), orthancId, 0 /* no expiration */); | |
202 orthancToDicom_->Store(ComputeKey(level, orthancId), dicomUid, 0 /* no expiration */); | |
203 } | |
204 | |
205 void ResourceHierarchyCache::AddParentLink(Orthanc::ResourceType childLevel, | |
206 const std::string& childOrthancId, | |
207 const std::string& parentOrthancId) | |
208 { | |
209 cache_->Store(ComputeKey(childLevel, childOrthancId), parentOrthancId, 0 /* no expiration */); | |
210 } | |
211 | |
212 | |
196 } | 213 } |