Mercurial > hg > orthanc
diff OrthancServer/DicomProtocol/DicomServer.cpp @ 1234:a65ad39596cb
fix issue #25
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 05 Dec 2014 11:11:58 +0100 |
parents | e95e7f9eba96 |
children | 3a3e7e3e244f |
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomServer.cpp Thu Dec 04 17:18:18 2014 +0100 +++ b/OrthancServer/DicomProtocol/DicomServer.cpp Fri Dec 05 11:11:58 2014 +0100 @@ -278,11 +278,19 @@ throw OrthancException("Too short AET"); } + if (aet.size() > 16) + { + throw OrthancException("AET must be shorter than 16 characters"); + } + for (size_t i = 0; i < aet.size(); i++) { - if (!isalnum(aet[i]) && aet[i] != '-') + if (!isalnum(aet[i]) && + aet[i] != '-' && + aet[i] != '_') { - throw OrthancException("Only alphanumeric characters are allowed in AET"); + LOG(WARNING) << "For best interoperability, only upper case, alphanumeric characters should be present in AET: \"" << aet << "\""; + break; } }