Use make_address instead of from_string to fix build

This commit is contained in:
emeric
2025-02-10 17:38:12 +01:00
parent 32b366dda7
commit b6f787dadb
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -448,7 +448,7 @@ namespace lms::api::subsonic
if (!apiKey && !password) if (!apiKey && !password)
throw RequiredParameterMissingError{ "apiKey" }; throw RequiredParameterMissingError{ "apiKey" };
const auto clientAddress{ boost::asio::ip::address::from_string(request.clientAddress()) }; const auto clientAddress{ boost::asio::ip::make_address(request.clientAddress()) };
const std::string authToken{ apiKey ? *apiKey : decodePasswordIfNeeded(*password) }; const std::string authToken{ apiKey ? *apiKey : decodePasswordIfNeeded(*password) };
const auto authResult{ core::Service<auth::IAuthTokenService>::get()->processAuthToken("subsonic", clientAddress, authToken) }; const auto authResult{ core::Service<auth::IAuthTokenService>::get()->processAuthToken("subsonic", clientAddress, authToken) };
+2 -2
View File
@@ -107,7 +107,7 @@ namespace lms::ui
if (field == PasswordField) if (field == PasswordField)
{ {
const auto checkResult{ _passwordService.checkUserPassword( const auto checkResult{ _passwordService.checkUserPassword(
boost::asio::ip::address::from_string(LmsApp->environment().clientAddress()), boost::asio::ip::make_address(LmsApp->environment().clientAddress()),
valueText(LoginNameField).toUTF8(), valueText(LoginNameField).toUTF8(),
valueText(PasswordField).toUTF8()) }; valueText(PasswordField).toUTF8()) };
switch (checkResult.state) switch (checkResult.state)
@@ -153,7 +153,7 @@ namespace lms::ui
const std::string hashedCookie{ Wt::Auth::SHA1HashFunction{}.compute(*authCookie, authCookieSalt) }; const std::string hashedCookie{ Wt::Auth::SHA1HashFunction{}.compute(*authCookie, authCookieSalt) };
const auto res{ core::Service<auth::IAuthTokenService>::get()->processAuthToken(authTokenDomain, boost::asio::ip::address::from_string(env.clientAddress()), hashedCookie) }; const auto res{ core::Service<auth::IAuthTokenService>::get()->processAuthToken(authTokenDomain, boost::asio::ip::make_address(env.clientAddress()), hashedCookie) };
switch (res.state) switch (res.state)
{ {
case auth::IAuthTokenService::AuthTokenProcessResult::State::Denied: case auth::IAuthTokenService::AuthTokenProcessResult::State::Denied:
+1 -1
View File
@@ -100,7 +100,7 @@ namespace lms::ui
return Wt::WValidator::validate(input); return Wt::WValidator::validate(input);
const auto checkResult{ _passwordService.checkUserPassword( const auto checkResult{ _passwordService.checkUserPassword(
boost::asio::ip::address::from_string(LmsApp->environment().clientAddress()), boost::asio::ip::make_address(LmsApp->environment().clientAddress()),
LmsApp->getUserLoginName(), LmsApp->getUserLoginName(),
input.toUTF8()) }; input.toUTF8()) };
switch (checkResult.state) switch (checkResult.state)