From 958310d9bd6eaea931e4e104f8afc377ed92a845 Mon Sep 17 00:00:00 2001 From: badaix Date: Thu, 5 Jun 2025 21:34:24 +0200 Subject: [PATCH] Disable auth --- server/authinfo.cpp | 2 +- server/control_requests.hpp | 2 +- server/control_session_http.cpp | 3 ++- server/snapserver.cpp | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/authinfo.cpp b/server/authinfo.cpp index cb62d277..24f9cb6f 100644 --- a/server/authinfo.cpp +++ b/server/authinfo.cpp @@ -164,7 +164,7 @@ ErrorCode AuthInfo::authenticatePlain(const std::string& user_password) auto ec = validateUser(username_, password); // TODO: don't log passwords - LOG(INFO, LOG_TAG) << "Authorization basic: " << user_password << ", user: " << username_ << ", password: " << password << "\n"; + LOG(INFO, LOG_TAG) << "Authorization basic: " << user_password << ", user: " << username_ << "\n"; // , password: " << password << "\n"; is_authenticated_ = (ec.value() == 0); return ec; } diff --git a/server/control_requests.hpp b/server/control_requests.hpp index 43adacb8..3748d998 100644 --- a/server/control_requests.hpp +++ b/server/control_requests.hpp @@ -53,7 +53,7 @@ public: null, ///< null }; - /// @return the string representation of @p type + /// @return the string representation of @p type std::string toString(Type type) { switch (type) diff --git a/server/control_session_http.cpp b/server/control_session_http.cpp index ebe39f8d..be90ca72 100644 --- a/server/control_session_http.cpp +++ b/server/control_session_http.cpp @@ -448,7 +448,8 @@ void ControlSessionHttp::on_read(beast::error_code ec, std::size_t bytes_transfe auto authheader = req_[beast::http::field::authorization]; if (!authheader.empty()) { - LOG(INFO, LOG_TAG) << "Auth header: " << authheader << "\n"; + // TODO: don't log passwords + // LOG(INFO, LOG_TAG) << "Auth header: " << authheader << "\n"; auto ec = authinfo.authenticate(std::string{authheader}); if (ec) { diff --git a/server/snapserver.cpp b/server/snapserver.cpp index 1e5a8f80..3e51fb2d 100644 --- a/server/snapserver.cpp +++ b/server/snapserver.cpp @@ -322,6 +322,8 @@ int main(int argc, char* argv[]) settings.stream.sources.push_back(sourceValue->value(n)); } + // TODO: auth + settings.auth.enabled = false; if (settings.auth.enabled) { std::vector roles;