# HG changeset patch # User Sebastien Jodogne # Date 1783417101 -7200 # Node ID c9b7dcda2d08048392a4c9b5f88a15f3b76599b9 # Parent 3d5977fbc1de3bf9dd709843505de7b10dcecb0d# Parent b4fb63a966504ce3664f4da5652f7cf31a35550d merge diff -r 3d5977fbc1de -r c9b7dcda2d08 NEWS --- a/NEWS Tue Jul 07 11:37:06 2026 +0200 +++ b/NEWS Tue Jul 07 11:38:21 2026 +0200 @@ -4,6 +4,8 @@ General ------- +* Orthanc will now refuse to start if you have "AuthenticationEnabled" and "RemoteAccessAllowed" + set to true and have not defined any users in "RegisteredUsers". * New values for "OverwriteInstances" configuration. In previous versions, this configuration was a Boolean and it is now a string whose allowed values are "Never", "Always", and "IfChanged". For backward compatibility, you may still provide a Boolean value @@ -30,7 +32,6 @@ - "HttpTimeout" was documented as 60 while its default value is 0 (no timeout). - "Name" was documented as "MyOrthanc" while its default value is "ORTHANC". - REST API -------- diff -r 3d5977fbc1de -r c9b7dcda2d08 OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Jul 07 11:37:06 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Jul 07 11:38:21 2026 +0200 @@ -184,6 +184,10 @@ { result[ORTHANC_CONFIG_INGEST_TRANSCODING] = GetTransferSyntaxUid(ingestTransferSyntax); // New in Orthanc 1.11.0 } + else + { + result[ORTHANC_CONFIG_INGEST_TRANSCODING] = ""; + } result[ORTHANC_CONFIG_OVERWRITE_INSTANCES] = context.IsOverwriteInstances(); // New in Orthanc 1.11.0 result[OVERWRITE_INSTANCES_MODE] = EnumerationToString(context.GetOverwriteInstances()); // New in Orthanc 1.12.12 diff -r 3d5977fbc1de -r c9b7dcda2d08 OrthancServer/Sources/main.cpp --- a/OrthancServer/Sources/main.cpp Tue Jul 07 11:37:06 2026 +0200 +++ b/OrthancServer/Sources/main.cpp Tue Jul 07 11:38:21 2026 +0200 @@ -1200,21 +1200,15 @@ status == OrthancConfiguration::RegisteredUsersStatus_NoConfiguration) { /** - * Starting with Orthanc 1.5.8, if no user is explicitly - * defined while remote access is allowed, we create a - * default user, and Orthanc Explorer shows a warning - * message about an "Insecure setup". This convention is - * used in Docker images "jodogne/orthanc", - * "jodogne/orthanc-plugins" and "osimis/orthanc". + * Starting with Orthanc 1.13.0, if no user is explicitly + * defined while remote access is allowed, Orthanc refuses to start + * and asks the user to create at least one user. **/ - LOG(WARNING) << "====> HTTP authentication is enabled, but no user is declared. " - << "Creating a default user: Review your configuration option \"RegisteredUsers\". " - << "Your setup is INSECURE <===="; + std::string errorMessage = "HTTP authentication is enabled and Remote Access is allowed, but no user is declared. " + "Starting with Orthanc 1.13.0, you must at least explicitly declare one user in the configuration option \"RegisteredUsers\"."; + LOG(ERROR) << "====> " << errorMessage << " Orthanc will refuse to start. <===="; - context.SetHttpServerSecure(false); - - // This is the username/password of the default user in Orthanc. - httpServer.RegisterUser("orthanc", "orthanc"); + throw OrthancException(ErrorCode_IncompatibleConfigurations, errorMessage); } else { @@ -1464,6 +1458,7 @@ bool restart = false; ErrorCode error = ErrorCode_Success; + std::string errorDetails; try { @@ -1472,6 +1467,7 @@ catch (OrthancException& e) { error = e.GetErrorCode(); + errorDetails = e.GetDetails(); } dicomServer.Stop(); @@ -1481,7 +1477,7 @@ if (error != ErrorCode_Success) { - throw OrthancException(error); + throw OrthancException(error, errorDetails); } return restart; @@ -2350,7 +2346,7 @@ } catch (const OrthancException& e) { - LOG(ERROR) << "Uncaught exception, stopping now: [" << e.What() << "] (code " << e.GetErrorCode() << ")"; + LOG(ERROR) << "Uncaught exception, stopping now: [" << e.What() << "] (code " << e.GetErrorCode() << ") " << e.GetDetails(); #if defined(_WIN32) if (e.GetErrorCode() >= ErrorCode_START_PLUGINS) {