# HG changeset patch # User Sebastien Jodogne # Date 1566654036 -7200 # Node ID 27b53c61aa9921a582641a774c4bfe1901ff3497 # Parent 0d248cc63ded96213105d2f8868a6d1cb56b6e4f warning when authentication is automatically enabled diff -r 0d248cc63ded -r 27b53c61aa99 OrthancServer/main.cpp --- a/OrthancServer/main.cpp Fri Aug 23 21:32:16 2019 +0200 +++ b/OrthancServer/main.cpp Sat Aug 24 15:40:36 2019 +0200 @@ -823,14 +823,20 @@ httpServer.SetHttpCompressionEnabled(lock.GetConfiguration().GetBooleanParameter("HttpCompressionEnabled", true)); httpServer.SetTcpNoDelay(lock.GetConfiguration().GetBooleanParameter("TcpNoDelay", true)); + bool authenticationEnabled = lock.GetConfiguration().GetBooleanParameter("AuthenticationEnabled", false); if (httpServer.IsRemoteAccessAllowed()) { + if (!authenticationEnabled) + { + LOG(WARNING) << "Remote access is allowed, automatically turning on HTTP authentication for security"; + } + // Starting with Orthanc 1.5.8, enabling remote access forces user authentication. httpServer.SetAuthenticationEnabled(true); } else { - httpServer.SetAuthenticationEnabled(lock.GetConfiguration().GetBooleanParameter("AuthenticationEnabled", false)); + httpServer.SetAuthenticationEnabled(authenticationEnabled); } bool hasUsers = lock.GetConfiguration().SetupRegisteredUsers(httpServer);