Use make_address instead of from_string to fix build
This commit is contained in:
@@ -448,7 +448,7 @@ namespace lms::api::subsonic
|
||||
if (!apiKey && !password)
|
||||
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 auto authResult{ core::Service<auth::IAuthTokenService>::get()->processAuthToken("subsonic", clientAddress, authToken) };
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ namespace lms::ui
|
||||
if (field == PasswordField)
|
||||
{
|
||||
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(PasswordField).toUTF8()) };
|
||||
switch (checkResult.state)
|
||||
@@ -153,7 +153,7 @@ namespace lms::ui
|
||||
|
||||
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)
|
||||
{
|
||||
case auth::IAuthTokenService::AuthTokenProcessResult::State::Denied:
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace lms::ui
|
||||
return Wt::WValidator::validate(input);
|
||||
|
||||
const auto checkResult{ _passwordService.checkUserPassword(
|
||||
boost::asio::ip::address::from_string(LmsApp->environment().clientAddress()),
|
||||
boost::asio::ip::make_address(LmsApp->environment().clientAddress()),
|
||||
LmsApp->getUserLoginName(),
|
||||
input.toUTF8()) };
|
||||
switch (checkResult.state)
|
||||
|
||||
Reference in New Issue
Block a user