Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 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 | d2b9981017c4 |
comparison
equal
deleted
inserted
replaced
3500:0d248cc63ded | 3501:27b53c61aa99 |
---|---|
821 httpServer.SetRemoteAccessAllowed(lock.GetConfiguration().GetBooleanParameter("RemoteAccessAllowed", false)); | 821 httpServer.SetRemoteAccessAllowed(lock.GetConfiguration().GetBooleanParameter("RemoteAccessAllowed", false)); |
822 httpServer.SetKeepAliveEnabled(lock.GetConfiguration().GetBooleanParameter("KeepAlive", defaultKeepAlive)); | 822 httpServer.SetKeepAliveEnabled(lock.GetConfiguration().GetBooleanParameter("KeepAlive", defaultKeepAlive)); |
823 httpServer.SetHttpCompressionEnabled(lock.GetConfiguration().GetBooleanParameter("HttpCompressionEnabled", true)); | 823 httpServer.SetHttpCompressionEnabled(lock.GetConfiguration().GetBooleanParameter("HttpCompressionEnabled", true)); |
824 httpServer.SetTcpNoDelay(lock.GetConfiguration().GetBooleanParameter("TcpNoDelay", true)); | 824 httpServer.SetTcpNoDelay(lock.GetConfiguration().GetBooleanParameter("TcpNoDelay", true)); |
825 | 825 |
826 bool authenticationEnabled = lock.GetConfiguration().GetBooleanParameter("AuthenticationEnabled", false); | |
826 if (httpServer.IsRemoteAccessAllowed()) | 827 if (httpServer.IsRemoteAccessAllowed()) |
827 { | 828 { |
829 if (!authenticationEnabled) | |
830 { | |
831 LOG(WARNING) << "Remote access is allowed, automatically turning on HTTP authentication for security"; | |
832 } | |
833 | |
828 // Starting with Orthanc 1.5.8, enabling remote access forces user authentication. | 834 // Starting with Orthanc 1.5.8, enabling remote access forces user authentication. |
829 httpServer.SetAuthenticationEnabled(true); | 835 httpServer.SetAuthenticationEnabled(true); |
830 } | 836 } |
831 else | 837 else |
832 { | 838 { |
833 httpServer.SetAuthenticationEnabled(lock.GetConfiguration().GetBooleanParameter("AuthenticationEnabled", false)); | 839 httpServer.SetAuthenticationEnabled(authenticationEnabled); |
834 } | 840 } |
835 | 841 |
836 bool hasUsers = lock.GetConfiguration().SetupRegisteredUsers(httpServer); | 842 bool hasUsers = lock.GetConfiguration().SetupRegisteredUsers(httpServer); |
837 | 843 |
838 if (httpServer.IsAuthenticationEnabled() && | 844 if (httpServer.IsAuthenticationEnabled() && |