Core/Warden: Workaround for an OpenSSL bug in the ARC4 stream cipher initialization that causes crashes on some OS
- Skip loading warden_action overrides when warden is disabled fixes #6486
This commit is contained in:
@@ -151,6 +151,14 @@ void WardenCheckMgr::LoadWardenChecks()
|
|||||||
|
|
||||||
void WardenCheckMgr::LoadWardenOverrides()
|
void WardenCheckMgr::LoadWardenOverrides()
|
||||||
{
|
{
|
||||||
|
// Check if Warden is enabled by config before loading anything
|
||||||
|
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
|
||||||
|
{
|
||||||
|
sLog->outString(">> Warden disabled, loading check overrides skipped.");
|
||||||
|
sLog->outString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 0 1
|
// 0 1
|
||||||
QueryResult result = CharacterDatabase.Query("SELECT wardenId, action FROM warden_action");
|
QueryResult result = CharacterDatabase.Query("SELECT wardenId, action FROM warden_action");
|
||||||
|
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
#include "ARC4.h"
|
#include "ARC4.h"
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
|
||||||
ARC4::ARC4(uint8 len)
|
ARC4::ARC4(uint8 len) : m_ctx()
|
||||||
{
|
{
|
||||||
EVP_CIPHER_CTX_init(&m_ctx);
|
EVP_CIPHER_CTX_init(&m_ctx);
|
||||||
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
||||||
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
|
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
ARC4::ARC4(uint8 *seed, uint8 len)
|
ARC4::ARC4(uint8 *seed, uint8 len) : m_ctx()
|
||||||
{
|
{
|
||||||
EVP_CIPHER_CTX_init(&m_ctx);
|
EVP_CIPHER_CTX_init(&m_ctx);
|
||||||
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user