# HG changeset patch # User Sebastien Jodogne # Date 1417774318 -3600 # Node ID a65ad39596cbd33cb1de4e5ee0c5d5dae2ff7612 # Parent eac00401cb9613e81c3658b468a885d2521eb2cc fix issue 25 diff -r eac00401cb96 -r a65ad39596cb NEWS --- a/NEWS Thu Dec 04 17:18:18 2014 +0100 +++ b/NEWS Fri Dec 05 11:11:58 2014 +0100 @@ -5,6 +5,7 @@ * Plugins can extend Orthanc Explorer with custom JavaScript * Instances without PatientID are now allowed * Support of Tudor DICOM in Query/Retrieve +* Fix issue 25 (AET with underscore not allowed) Version 0.8.5 (2014/11/04) diff -r eac00401cb96 -r a65ad39596cb OrthancServer/DicomProtocol/DicomServer.cpp --- 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; } }