Skip to content

Commit

Permalink
release 5.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovct committed May 17, 2018
1 parent d36daee commit 34a0991
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CleanTalk Antispam extension for phpbb v.3.1.
============================================
## Version 5.6.4
## Version 5.6.5

## How to install.
* Follow standard instruction at https://www.phpbb.com/extensions/installing/
Expand Down
2 changes: 1 addition & 1 deletion cleantalk/antispam/acp/main_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function module()
return array(
'filename' => '\cleantalk\antispam\acp\main_module',
'title' => 'ACP_CLEANTALK_TITLE',
'version' => '5.6.4',
'version' => '5.6.5',
'modes' => array(
'settings' => array('title' => 'ACP_CLEANTALK_SETTINGS', 'auth' => 'ext_cleantalk/antispam && acl_a_board', 'cat' => array('ACP_CLEANTALK_TITLE')),
),
Expand Down
2 changes: 2 additions & 0 deletions cleantalk/antispam/acp/main_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function main($id, $mode)
$config->set('cleantalk_antispam_nusers', $request->variable('cleantalk_antispam_nusers', 0));
$config->set('cleantalk_antispam_ccf', $request->variable('cleantalk_antispam_ccf',0));
$config->set('cleantalk_antispam_sfw_enabled', $request->variable('cleantalk_antispam_sfw_enabled', 0));
$config->set('cleantalk_antispam_ssl', $request->variable('cleantalk_antispam_ssl', 0));

$key_is_valid = false;
$user_token_is_valid = false;
Expand Down Expand Up @@ -123,6 +124,7 @@ function main($id, $mode)
'CLEANTALK_ANTISPAM_NUSERS' => $config['cleantalk_antispam_nusers'] ? true : false,
'CLEANTALK_ANTISPAM_CCF' => $config['cleantalk_antispam_ccf'] ? true: false,
'CLEANTALK_ANTISPAM_SFW_ENABLED'=> $config['cleantalk_antispam_sfw_enabled'] ? true : false,
'CLEANTALK_ANTISPAM_SSL' => $config['cleantalk_antispam_ssl'] ? true: false,
'CLEANTALK_ANTISPAM_APIKEY' => $config['cleantalk_antispam_apikey'],
'CLEANTALK_ANTISPAM_KEY_IS_OK' => $config['cleantalk_antispam_key_is_ok'] ? true : false,
'CLEANTALK_ANTISPAM_USER_TOKEN' => $config['cleantalk_antispam_user_token'],
Expand Down
8 changes: 8 additions & 0 deletions cleantalk/antispam/adm/style/settings_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ <h1>{L_ACP_CLEANTALK_SETTINGS}</h1>
<input type="radio" class="radio" name="cleantalk_antispam_sfw_enabled" value="0" <!-- IF not CLEANTALK_ANTISPAM_SFW_ENABLED -->checked="checked"<!-- ENDIF --> /> {L_NO}
</dd>
</dl>
<dl>
<dt>
<label for="cleantalk_antispam_ssl">{L_ACP_CLEANTALK_SSL_LABEL}</label><br /><span>{L_ACP_CLEANTALK_SSL_DESCR}</span></dt>
<dd>
<input type="radio" class="radio" name="cleantalk_antispam_ssl" value="1" <!-- IF CLEANTALK_ANTISPAM_SSL -->checked="checked"<!-- ENDIF -->/> {L_YES} &nbsp;
<input type="radio" class="radio" name="cleantalk_antispam_ssl" value="0" <!-- IF not CLEANTALK_ANTISPAM_SSL -->checked="checked"<!-- ENDIF --> /> {L_NO}
</dd>
</dl>
<dl>
<dt>
<label for="cleantalk_antispam_apikey">{L_ACP_CLEANTALK_APIKEY_LABEL}</label>
Expand Down
2 changes: 1 addition & 1 deletion cleantalk/antispam/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "Antispam by CleanTalk",
"homepage": "https://cleantalk.org",
"version": "5.6.4",
"version": "5.6.5",
"time": "2017-06-07",
"license": "GPL-2.0",
"authors": [
Expand Down
7 changes: 5 additions & 2 deletions cleantalk/antispam/language/ar/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
'ACP_CLEANTALK_NUSERS_DESCR' => 'سيتم فحص المشاركات والمواضيع بواسطة آخر الأعضاء المُسجلين. ومنع المُزعجة منها أو إرسالها للموافقة عليها بواسطة المشرفين.',

'ACP_CLEANTALK_CCF_LABEL' => 'اختبار نموذج الاتصال',
'ACP_CLEANTALK_CCF_DESCR' => 'لتمكين مكافحة البريد المزعج اختبار نموذج الاتصال.',

'ACP_CLEANTALK_CCF_DESCR' => 'لتمكين مكافحة البريد المزعج اختبار نموذج الاتصال. الملاحظة التعارضات المحتملة!',

'ACP_CLEANTALK_SSL_LABEL' => 'لتمكين نقل عبر SSL',
'ACP_CLEANTALK_SSL_DESCR' => 'لتمكين هذا الخيار ، موقع الويب الخاص بك يجب أن يكون شهادة SSL.',

'ACP_CLEANTALK_SFW_LABEL' => 'SpamFireWall',
'ACP_CLEANTALK_SFW_DESCR' => 'تفعيل جدار الحماية. تخفيف حمل السيرفر وحماية الموقع من العمليات المُزعجة.',

Expand Down
7 changes: 5 additions & 2 deletions cleantalk/antispam/language/de/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
'ACP_CLEANTALK_NUSERS_DESCR' => 'Beiträge und Themen von neuen Benutzern werden auf SPAM geprüft. SPAM wird abgelehnt oder zur Prüfung weitergeleitet.',

'ACP_CLEANTALK_CCF_LABEL' => 'Kontaktformulare überprüfen',
'ACP_CLEANTALK_CCF_DESCR' => 'Aktivieren Antispam-Test für Kontaktformular.',

'ACP_CLEANTALK_CCF_DESCR' => 'Aktivieren Antispam-Test für Kontaktformular. Achtung, Konflikte sind möglich!',

'ACP_CLEANTALK_SSL_LABEL' => 'Aktivieren Sie die SSL-gesicherte Verbindung',
'ACP_CLEANTALK_SSL_DESCR' => 'Achtung, um diese Option zu aktivieren, muss Ihre Website bereits ein funktionierendes SSL-Zertifikat haben.',

'ACP_CLEANTALK_SFW_LABEL' => 'SpamFireWall',
'ACP_CLEANTALK_SFW_DESCR' => 'Enables SpamFireWall. Reduces webserver load and prevents bots to access the website.',

Expand Down
6 changes: 5 additions & 1 deletion cleantalk/antispam/language/en/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @copyright (C) 2014 СleanTalk team (http://cleantalk.org)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*
* Translated By : Raul [ThE KuKa]
*/

if (!defined('IN_PHPBB'))
Expand Down Expand Up @@ -34,7 +35,10 @@
'ACP_CLEANTALK_NUSERS_DESCR' => 'Posts and topics from new users will be test for spam. Spam will be rejected or sent to approvement.',

'ACP_CLEANTALK_CCF_LABEL' => 'Check contact forms',
'ACP_CLEANTALK_CCF_DESCR' => 'Enable anti-spam test for contact forms.',
'ACP_CLEANTALK_CCF_DESCR' => 'Enable anti-spam test for contact forms. May provide confclits!',

'ACP_CLEANTALK_SSL_LABEL' => 'Enable SSL secure connection',
'ACP_CLEANTALK_SSL_DESCR' => 'Note, to enable this option, your site must already have a working SSL certificate.',

'ACP_CLEANTALK_SFW_LABEL' => 'SpamFireWall',
'ACP_CLEANTALK_SFW_DESCR' => 'Enables SpamFireWall. Reduces webserver load and prevents bots to access the website.',
Expand Down
5 changes: 4 additions & 1 deletion cleantalk/antispam/language/es/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
'ACP_CLEANTALK_NUSERS_DESCR' => 'Mensajes y temas de los nuevos usuarios estarán a prueba en busca de Spam. Los correos no deseados serán rechazados, o enviados para ser aprobados.',

'ACP_CLEANTALK_CCF_LABEL' => 'Comprobar que formularios de contacto',
'ACP_CLEANTALK_CCF_DESCR' => 'Activar el filtro antispam de prueba para el formulario de contacto.',
'ACP_CLEANTALK_CCF_DESCR' => 'Activar el filtro antispam de prueba para el formulario de contacto. Atención, puede haber conflictos!',

'ACP_CLEANTALK_SSL_LABEL' => 'Activar la transmisión a través de SSL',
'ACP_CLEANTALK_SSL_DESCR' => 'Atención, para activar esta opción, su sitio web debe tener un certificado SSL.',

'ACP_CLEANTALK_SFW_LABEL' => 'SpamFireWall',
'ACP_CLEANTALK_SFW_DESCR' => 'Enables SpamFireWall. Reduces webserver load and prevents bots to access the website.',
Expand Down
57 changes: 57 additions & 0 deletions cleantalk/antispam/language/it/common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
*
* @package phpBB Extension - Antispam by CleanTalk
* @author Сleantalk team ([email protected])
* @copyright (C) 2014 СleanTalk team (http://cleantalk.org)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*
* Translated By : Lord Phobos
*/

if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

$lang = array_merge($lang, array(
'ACP_CLEANTALK_TITLE' => 'Antispam by CleanTalk',

'ACP_CLEANTALK_SETTINGS' => 'Impostazioni di protezione dallo spam',
'ACP_CLEANTALK_SETTINGS_SAVED' => 'Le impostazioni di protezione dallo spam sono state salvate con successo!',

'ACP_CLEANTALK_REGS_LABEL' => 'Controlla Registrazioni',
'ACP_CLEANTALK_REGS_DESCR' => 'Gli Spam-bots saranno rifiutati con una dichiarazione di ragioni.',

'ACP_CLEANTALK_GUESTS_LABEL' => 'Modera Ospiti',
'ACP_CLEANTALK_GUESTS_DESCR' => 'Post e topic dagli utenti verranno controllati per lo spam. Lo spam sarà rifiutato o inviato per l’approvazione.',

'ACP_CLEANTALK_NUSERS_LABEL' => 'Modera i Nuovi Utenti Registrati',
'ACP_CLEANTALK_NUSERS_DESCR' => 'Post e topic dei nuovi utenti registrati verranno controllati per lo spam. Lo spam sarà rifiutato o inviato per l’approvazione.',

'ACP_CLEANTALK_APIKEY_LABEL' => 'Chiave d’accesso',
'ACP_CLEANTALK_APIKEY_DESCR' => 'Per ottenere una chiave d’accesso si prega di registrarsi al sito ',

'MAIL_CLEANTALK_ERROR' => 'Errore nel tentativo di connessione al servizio CleanTalk',
'LOG_CLEANTALK_ERROR' => '<strong>Errore nel tentativo di connessione al servizio CleanTalk</strong><br />%s',
'ACP_CLEANTALK_CHECKUSERS_TITLE' => 'Controlla utenti per lo spam',
'ACP_CLEANTALK_CHECKUSERS_DESCRIPTION' => "L’Anti-spam by CleanTalk controllerà tutti gli utenti con database delle blacklist e ti mostretà utenti che praticano attività di spam su altri siti web. Clicca semplicemente su ’Controlla gli Utenti per Spam’ per iniziare.",
'ACP_CLEANTALK_CHECKUSERS_BUTTON' => 'Controlla gli Utenti per Spam',
'ACP_CHECKUSERS_DONE_1' => 'Fatto. Controllati tutti gli utenti sui database delle blacklist, vedere sotto i risultati.',
'ACP_CHECKUSERS_DONE_2' => 'Fatto. Controllati tutti gli utenti sui database delle blacklist, trovati 0 utenti spam.',
'ACP_CHECKUSERS_SELECT' => 'Seleziona',
'ACP_CHECKUSERS_USERNAME' => 'Username',
'ACP_CHECKUSERS_MESSAGES' => 'Messaggi',
'ACP_CHECKUSERS_JOINED' => 'Iscritto',
'ACP_CHECKUSERS_EMAIL' => 'Email',
'ACP_CHECKUSERS_IP' => 'IP',
'ACP_CHECKUSERS_LASTVISIT' => 'Ultima visita',
'ACP_CHECKUSERS_DELETEALL' => 'Cancella tutto',
'ACP_CHECKUSERS_DELETEALL_DESCR' => 'Anche tutti i post degli utenti cancellati verranno rimossi.',
'ACP_CHECKUSERS_DELETESEL' => 'Cancella selezionati',
));
5 changes: 4 additions & 1 deletion cleantalk/antispam/language/ru/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
'ACP_CLEANTALK_NUSERS_DESCR' => 'Посты и темы от вновь зарегистрированных будут проверяться на спам. Спам будет отвергнут или направлен на одобрение.',

'ACP_CLEANTALK_CCF_LABEL' => 'Проверять контактные формы',
'ACP_CLEANTALK_CCF_DESCR' => 'Включить антиспам тест для контактной формы.',
'ACP_CLEANTALK_CCF_DESCR' => 'Включить антиспам тест для контактной формы. Внимание, возможны конфликты!',

'ACP_CLEANTALK_SSL_LABEL' => 'Включить передачу через SSL',
'ACP_CLEANTALK_SSL_DESCR' => 'Внимание, для включения этой опции, ваш сайт уже должен иметь рабочий SSL сертификат.',

'ACP_CLEANTALK_SFW_LABEL' => 'SpamFireWall',
'ACP_CLEANTALK_SFW_DESCR' => 'Включает SpamFireWall. Это не даст ботам зайти на сайт и позволит снизить нагрузку на веб-сервер.',
Expand Down
2 changes: 1 addition & 1 deletion cleantalk/antispam/migrations/release_1_0_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function update_data()
array('config.add', array('cleantalk_antispam_nusers', 1)),
array('config.add', array('cleantalk_antispam_apikey', '')),
//System settings
array('config.add', array('cleantalk_antispam_work_url', 'http://moderate.cleantalk.ru')),
array('config.add', array('cleantalk_antispam_work_url', '')),
array('config.add', array('cleantalk_antispam_server_url', 'http://moderate.cleantalk.ru')),
array('config.add', array('cleantalk_antispam_server_ttl', 0)),
array('config.add', array('cleantalk_antispam_server_changed', 0)),
Expand Down
33 changes: 33 additions & 0 deletions cleantalk/antispam/migrations/release_5_6_5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
*
* @package phpBB Extension - Antispam by CleanTalk
* @author Сleantalk team ([email protected])
* @copyright (C) 2014 СleanTalk team (http://cleantalk.org)
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*
*/

namespace cleantalk\antispam\migrations;

class release_5_6_5 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return isset($this->config['cleanalk_antispam_apikey']);
}

static public function depends_on()
{
return array('\cleantalk\antispam\migrations\release_5_6_0');
}

public function update_data()
{
return array(
//SSL secure option
array('config.add', array('cleantalk_antispam_ssl', 0)),

);
}
}
5 changes: 2 additions & 3 deletions cleantalk/antispam/model/Cleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,9 @@ private function sendRequest($data = null, $url, $server_timeout = 3) {

// Disabling CA cert verivication
// Disabling common name verification
if ($this->ssl_on && $this->ssl_path != '') {
if ($this->ssl_on) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, $this->ssl_path);
}else{ // Disabling CA cert verivication and common name verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
Expand Down Expand Up @@ -439,7 +438,7 @@ private function httpRequest($msg) {
$server_host = $server['ip'];
$work_url = $server_host;
}
$work_url = $url_prefix . $work_url;
$work_url = $url_prefix . filter_var($work_url,FILTER_VALIDATE_IP) !== false ? gethostbyaddr($work_url):$work_url;
if (isset($url_suffix))
$work_url = $work_url . $url_suffix;

Expand Down
5 changes: 2 additions & 3 deletions cleantalk/antispam/model/main_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static public function check_spam( $spam_check )
$ct->server_url = $config['cleantalk_antispam_server_url'];
$ct->server_ttl = $config['cleantalk_antispam_server_ttl'];
$ct->server_changed = $config['cleantalk_antispam_server_changed'];

$ct->ssl_on = $config['cleantalk_antispam_ssl'];
//Pointer data, Timezone from JS, First key press timestamp, Page set timestamp
$pointer_data = $request->variable(self::JS_POINTER_DATA_FIELD_NAME, "none", false, \phpbb\request\request_interface::COOKIE);
$page_set_timestamp = $request->variable(self::JS_PS_TIMESTAMP, "none", false, \phpbb\request\request_interface::COOKIE);
Expand Down Expand Up @@ -110,8 +110,7 @@ static public function check_spam( $spam_check )

if ($ct->server_change)
{
$config->set('cleantalk_antispam_work_url', $ct->work_url);
$config->set('cleantalk_antispam_server_url', $ct->server_url);
$config->set('cleantalk_antispam_work_url', $ct->work_url);
$config->set('cleantalk_antispam_server_ttl', $ct->server_ttl);
$config->set('cleantalk_antispam_server_changed', time());
}
Expand Down

0 comments on commit 34a0991

Please sign in to comment.