Fixed: Encode password in hexadecimal on command-line when patching to avoid invalid characters
--HG-- branch : develop
This commit is contained in:
parent
d799dde5ad
commit
7b2b0c9310
2 changed files with 15 additions and 1 deletions
|
@ -205,6 +205,19 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
LoginPassword = Args.getAdditionalArg("password").front();
|
LoginPassword = Args.getAdditionalArg("password").front();
|
||||||
|
|
||||||
|
// password in hexadecimal
|
||||||
|
if (LoginPassword.compare(0, 2, "0x") == 0)
|
||||||
|
{
|
||||||
|
std::string decodedPassword;
|
||||||
|
|
||||||
|
// decode password
|
||||||
|
if (fromHexa(LoginPassword.substr(2), decodedPassword))
|
||||||
|
{
|
||||||
|
// only use it if real hexadecimal
|
||||||
|
LoginPassword = decodedPassword;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Args.haveAdditionalArg("shard_id"))
|
if (Args.haveAdditionalArg("shard_id"))
|
||||||
sLoginShardId = Args.getAdditionalArg("shard_id").front();
|
sLoginShardId = Args.getAdditionalArg("shard_id").front();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1036,7 +1036,8 @@ void CPatchManager::executeBatchFile()
|
||||||
|
|
||||||
if (!LoginPassword.empty())
|
if (!LoginPassword.empty())
|
||||||
{
|
{
|
||||||
arguments.push_back(LoginPassword);
|
// encode password in hexadecimal to avoid invalid characters on command-line
|
||||||
|
arguments.push_back("0x" + toHexa(LoginPassword));
|
||||||
|
|
||||||
if (!r2Mode)
|
if (!r2Mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue