Mercurial > hg > orthanc
diff OrthancServer/Search/DicomTagConstraint.cpp @ 2893:1723cbba55c7 db-changes
testing DicomTagConstraint
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 16 Oct 2018 19:47:09 +0200 |
parents | ce310baccda6 |
children | 039a9d262d64 4e43e67f8ecf |
line wrap: on
line diff
--- a/OrthancServer/Search/DicomTagConstraint.cpp Tue Oct 16 18:00:05 2018 +0200 +++ b/OrthancServer/Search/DicomTagConstraint.cpp Tue Oct 16 19:47:09 2018 +0200 @@ -116,6 +116,13 @@ { throw OrthancException(ErrorCode_ParameterOutOfRange); } + + if (type != ConstraintType_Wildcard && + (value.find('*') != std::string::npos || + value.find('?') != std::string::npos)) + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } } @@ -129,7 +136,7 @@ constraintType_(type), caseSensitive_(caseSensitive) { - if (type != ConstraintType_Wildcard) + if (type != ConstraintType_List) { throw OrthancException(ErrorCode_ParameterOutOfRange); }