Permalink
Browse files

Merge pull request #1523 from GXTX/sigchk

Check XBE signature on Open
  • Loading branch information...
LukeUsher committed Jan 8, 2019
2 parents 9eae01e + a08f221 commit c24f83f9b43ca1bacce3e6d1ff02950297f2426b
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/gui/WndMain.cpp
@@ -1990,7 +1990,24 @@ void WndMain::OpenXbe(const char *x_filename)

return;
}


if (!g_Settings->m_core.allowAdminPrivilege && !m_Xbe->CheckXbeSignature())
{
int ret = MessageBox(m_hwnd, "XBE signature check failed!\n"
"\nThis is dangerous, as maliciously modified Xbox titles could take control of your system.\n"
"\nAre you sure you want to continue?", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_YESNO);
if (ret != IDYES)
{
delete m_Xbe; m_Xbe = nullptr;

RedrawWindow(m_hwnd, NULL, NULL, RDW_INVALIDATE);

UpdateCaption();

return;
}
}

// save this xbe to the list of recent xbe files
if(m_XbeFilename[0] != '\0') {
bool found = false;

0 comments on commit c24f83f

Please sign in to comment.