mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #13782 from noahpistilli/wii_no_pad
IOS/KD: Pad Wii Numbers to 16 digits
This commit is contained in:
@ -391,7 +391,7 @@ NWC24::ErrorCode NetKDRequestDevice::KDCheckMail(u32* mail_flag, u32* interval)
|
|||||||
|
|
||||||
// On a real Wii, a response to a challenge is expected and would be verified by KD.
|
// On a real Wii, a response to a challenge is expected and would be verified by KD.
|
||||||
const std::string hmac_message =
|
const std::string hmac_message =
|
||||||
fmt::format("{}\nw{}\n{}\n{}", random_number, m_config.Id(), str_mail_flag, str_interval);
|
fmt::format("{}\nw{:016}\n{}\n{}", random_number, m_config.Id(), str_mail_flag, str_interval);
|
||||||
std::array<u8, 20> hashed{};
|
std::array<u8, 20> hashed{};
|
||||||
Common::HMAC::HMACWithSHA1(
|
Common::HMAC::HMACWithSHA1(
|
||||||
MAIL_CHECK_KEY,
|
MAIL_CHECK_KEY,
|
||||||
@ -533,7 +533,7 @@ NWC24::ErrorCode NetKDRequestDevice::KDSendMail()
|
|||||||
|
|
||||||
m_send_list.ReadSendList();
|
m_send_list.ReadSendList();
|
||||||
const std::string auth =
|
const std::string auth =
|
||||||
fmt::format("mlid=w{}\r\npasswd={}", m_config.Id(), m_config.GetPassword());
|
fmt::format("mlid=w{:016}\r\npasswd={}", m_config.Id(), m_config.GetPassword());
|
||||||
std::vector<Common::HttpRequest::Multiform> multiform = {{"mlid", auth}};
|
std::vector<Common::HttpRequest::Multiform> multiform = {{"mlid", auth}};
|
||||||
|
|
||||||
std::vector<u32> mails = m_send_list.GetMailToSend();
|
std::vector<u32> mails = m_send_list.GetMailToSend();
|
||||||
@ -932,8 +932,8 @@ IPCReply NetKDRequestDevice::HandleRequestRegisterUserId(const IOS::HLE::IOCtlRe
|
|||||||
|
|
||||||
const Common::SettingsReader settings_reader{data};
|
const Common::SettingsReader settings_reader{data};
|
||||||
const std::string serno = settings_reader.GetValue("SERNO");
|
const std::string serno = settings_reader.GetValue("SERNO");
|
||||||
const std::string form_data =
|
const std::string form_data = fmt::format("mlid=w{:016}&hdid={}&rgncd={}", m_config.Id(),
|
||||||
fmt::format("mlid=w{}&hdid={}&rgncd={}", m_config.Id(), m_ios.GetIOSC().GetDeviceId(), serno);
|
m_ios.GetIOSC().GetDeviceId(), serno);
|
||||||
const Common::HttpRequest::Response response = m_http.Post(m_config.GetAccountURL(), form_data);
|
const Common::HttpRequest::Response response = m_http.Post(m_config.GetAccountURL(), form_data);
|
||||||
|
|
||||||
if (!response)
|
if (!response)
|
||||||
|
Reference in New Issue
Block a user