diff options
Diffstat (limited to '')
-rw-r--r-- | src/dedicated_room/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/dedicated_room/yuzu_room.cpp | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt index b674b915b..1efdbc1f7 100644 --- a/src/dedicated_room/CMakeLists.txt +++ b/src/dedicated_room/CMakeLists.txt @@ -10,13 +10,13 @@ add_executable(yuzu-room create_target_directory_groups(yuzu-room) -target_link_libraries(yuzu-room PRIVATE common core network) +target_link_libraries(yuzu-room PRIVATE common network) if (ENABLE_WEB_SERVICE) target_compile_definitions(yuzu-room PRIVATE -DENABLE_WEB_SERVICE) target_link_libraries(yuzu-room PRIVATE web_service) endif() -target_link_libraries(yuzu-room PRIVATE mbedtls) +target_link_libraries(yuzu-room PRIVATE mbedtls mbedcrypto) if (MSVC) target_link_libraries(yuzu-room PRIVATE getopt) endif() diff --git a/src/dedicated_room/yuzu_room.cpp b/src/dedicated_room/yuzu_room.cpp index 482e772fb..7b6deba41 100644 --- a/src/dedicated_room/yuzu_room.cpp +++ b/src/dedicated_room/yuzu_room.cpp @@ -27,8 +27,8 @@ #include "common/scm_rev.h" #include "common/settings.h" #include "common/string_util.h" -#include "core/announce_multiplayer_session.h" #include "core/core.h" +#include "network/announce_multiplayer_session.h" #include "network/network.h" #include "network/room.h" #include "network/verify_user.h" @@ -75,6 +75,12 @@ static constexpr char BanListMagic[] = "YuzuRoom-BanList-1"; static constexpr char token_delimiter{':'}; +static void PadToken(std::string& token) { + while (token.size() % 4 != 0) { + token.push_back('='); + } +} + static std::string UsernameFromDisplayToken(const std::string& display_token) { std::size_t outlen; @@ -300,6 +306,7 @@ int main(int argc, char** argv) { if (username.empty()) { LOG_INFO(Network, "Hosting a public room"); Settings::values.web_api_url = web_api_url; + PadToken(token); Settings::values.yuzu_username = UsernameFromDisplayToken(token); username = Settings::values.yuzu_username.GetValue(); Settings::values.yuzu_token = TokenFromDisplayToken(token); |