Mercurial > hg > orthanc
changeset 3501:27b53c61aa99
warning when authentication is automatically enabled
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Aug 2019 15:40:36 +0200 |
parents | 0d248cc63ded |
children | c160eafc42a9 |
files | OrthancServer/main.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);