From: Tim Düsterhus Date: Thu, 4 Dec 2014 20:42:35 +0000 (+0100) Subject: Nuke reCAPTCHA OEM key during update and for new installations X-Git-Tag: 2.1.0_Beta_1~96^2~1^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bdceef25ddb63a881de4610382a921a4b3918e6;p=GitHub%2FWoltLab%2FWCF.git Nuke reCAPTCHA OEM key during update and for new installations --- diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 0f8f9b0a9f..88023954fc 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -654,8 +654,7 @@ imagick:wcf.acp.option.image_adapter_type.imagick]]> security.antispam.recaptcha text ^[^/]*$ - - 6LfOlMYSAAAAADvo3s4puBAYDqI-6YK2ybe7BJE5 + 1 diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php index 49e869debd..f6f4a90d61 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.1.php @@ -9,13 +9,21 @@ use wcf\data\option\OptionEditor; * @category Community Framework */ -OptionEditor::updateAll(array( +$options = array( 'cache_source_type' => (CACHE_SOURCE_TYPE == 'no' ? 'disk' : CACHE_SOURCE_TYPE), 'last_update_time' => TIME_NOW, 'url_legacy_mode' => 1, 'url_to_lowercase' => 0, // the line below equals \wcf\util\StringUtil::getUUID(), but since we have to do it in one step, the "old" class exists in memory 'wcf_uuid' => sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)) -)); +); + +// clear recaptcha keys if public key and private key match WoltLab's OEM key +if (RECAPTCHA_PUBLICKEY === '6LfOlMYSAAAAADvo3s4puBAYDqI-6YK2ybe7BJE5' && RECAPTCHA_PRIVATEKEY === '6LfOlMYSAAAAAKR3m_EFxmDv1xS8PCfeaSZ2LdG9') { + $options['recaptcha_publickey'] = ''; + $options['recaptcha_privatekey'] = ''; +} + +OptionEditor::updateAll(); OptionEditor::resetCache();