Mercurial > hg > orthanc
changeset 7132:c5fa14f3bd7a
added a warning about legacy versions of dcmtk
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Mon, 17 Aug 2026 09:31:18 +0200 |
| parents | 765febef9540 |
| children | 72c735f56b68 |
| files | OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake OrthancFramework/Sources/OrthancFramework.cpp |
| diffstat | 3 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake Sun Aug 16 00:50:32 2026 +0200 +++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake Mon Aug 17 09:31:18 2026 +0200 @@ -612,6 +612,9 @@ else() add_definitions(-DORTHANC_ENABLE_DCMTK_TRANSCODING=0) endif() + + # New in Orthanc 1.13.1 + add_definitions(-DORTHANC_DCMTK_VERSION_RECOMMENDED=${ORTHANC_DCMTK_VERSION_RECOMMENDED}) endif()
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Sun Aug 16 00:50:32 2026 +0200 +++ b/OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake Mon Aug 17 09:31:18 2026 +0200 @@ -41,6 +41,11 @@ # the mainline version of Orthanc set(ORTHANC_API_VERSION "31") +# The version of DCMTK considered optimal for this version of +# Orthanc. A warning is logged if the actual version contained in +# DCMTK_VERSION_NUMBER is lower than this version. +set(ORTHANC_DCMTK_VERSION_RECOMMENDED 370) + ##################################################################### ## CMake parameters tunable by the user
--- a/OrthancFramework/Sources/OrthancFramework.cpp Sun Aug 16 00:50:32 2026 +0200 +++ b/OrthancFramework/Sources/OrthancFramework.cpp Mon Aug 17 09:31:18 2026 +0200 @@ -85,6 +85,21 @@ FromDcmtkBridge::InitializeCodecs(); #endif +#if ORTHANC_ENABLE_DCMTK == 1 + // New in Orthanc 1.13.1 + if (DCMTK_VERSION_NUMBER < ORTHANC_DCMTK_VERSION_RECOMMENDED) + { + CLOG(WARNING, DICOM) << "====> You are using a legacy version of DCMTK (" << DCMTK_VERSION_NUMBER + << " vs. recommended " << ORTHANC_DCMTK_VERSION_RECOMMENDED << "), this binary " + << "version of Orthanc should not be used in production, your setup is POSSIBLY INSECURE <===="; + } + else + { + CLOG(INFO, DICOM) << "Your version of DCMTK (" << DCMTK_VERSION_NUMBER << ") matches or exceeds " + << "the recommended version for this version of Orthanc (" << ORTHANC_DCMTK_VERSION_RECOMMENDED << ")"; + } +#endif + #if (ORTHANC_ENABLE_DCMTK == 1 && \ ORTHANC_ENABLE_DCMTK_NETWORKING == 1) /* Disable "gethostbyaddr" (which results in memory leaks) and use raw IP addresses */
