network: check Console ID conflicts

As Console ID can be sensitive data sometimes, this implementation sent a SHA256 hash of it instead.
This commit is contained in:
zhupengfei 2018-10-31 23:07:03 +08:00
parent 3c589f473f
commit c396e3c6e5
14 changed files with 109 additions and 23 deletions

View file

@ -19,6 +19,7 @@
#include "citra_qt/ui_settings.h"
#include "common/logging/log.h"
#include "core/announce_multiplayer_session.h"
#include "core/hle/service/cfg/cfg.h"
#include "core/settings.h"
#include "ui_host_room.h"
@ -116,8 +117,9 @@ void HostRoomWindow::Host() {
return;
}
}
member->Join(ui->username->text().toStdString(), "127.0.0.1", port, 0,
Network::NoPreferredMac, password);
member->Join(ui->username->text().toStdString(),
Service::CFG::GetConsoleIdHash(Core::System::GetInstance()), "127.0.0.1", port,
0, Network::NoPreferredMac, password);
// Store settings
UISettings::values.room_nickname = ui->username->text();