Passed
Pull Request — master (#610)
by Richard
14:27
created
htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR'])));
40 40
 
41 41
         foreach ($rbls as $rbl) {
42
-            $host = $rev_ip . '.' . $rbl;
42
+            $host = $rev_ip.'.'.$rbl;
43 43
             if (gethostbyname($host) != $host) {
44 44
                 $this->protector->message .= "DENY by $rbl\n";
45 45
                 $uid = $xoops->isUser() ? $xoops->user->getVar('uid') : 0;
Please login to merge, or discard this patch.
modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         // http:bl servers (don't enable too many servers)
32 32
         $rbls = array(
33
-            'http:BL' => PROTECTOR_HTTPBL_KEY . '.%s.dnsbl.httpbl.org',
33
+            'http:BL' => PROTECTOR_HTTPBL_KEY.'.%s.dnsbl.httpbl.org',
34 34
         );
35 35
 
36 36
         $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR'])));
Please login to merge, or discard this patch.
modules/protector/filters_disabled/postcommon_register_insert_js_check.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $antispam_htmls = $this->getHtml4Assign();
41 41
 
42
-        return preg_replace('/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i', '$0' . "\n" . $antispam_htmls['html_in_form'] . "\n" . $antispam_htmls['js_global'], $s, 1);
42
+        return preg_replace('/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i', '$0'."\n".$antispam_htmls['html_in_form']."\n".$antispam_htmls['js_global'], $s, 1);
43 43
     }
44 44
 
45 45
     // import from D3forumAntispamDefault.clas.php
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         if (empty($time)) {
53 53
             $time = time();
54 54
         }
55
-        return md5(gmdate('YmdH', $time) . \XoopsBaseConfig::get('db-prefix') . \XoopsBaseConfig::get('db-name'));
55
+        return md5(gmdate('YmdH', $time).\XoopsBaseConfig::get('db-prefix').\XoopsBaseConfig::get('db-name'));
56 56
     }
57 57
 
58 58
     function getHtml4Assign()
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         return array(
85 85
             'html_in_form' => '<input type="hidden" name="antispam_md5" id="antispam_md5" value="" />',
86
-            'js_global'    => '<script type="text/javascript"><!--//' . "\n" . $js_in_validate_function . "\n" . '//--></script><noscript><div class="errorMsg">' . _MD_PROTECTOR_TURNJAVASCRIPTON . '</div></noscript>',
86
+            'js_global'    => '<script type="text/javascript"><!--//'."\n".$js_in_validate_function."\n".'//--></script><noscript><div class="errorMsg">'._MD_PROTECTOR_TURNJAVASCRIPTON.'</div></noscript>',
87 87
         );
88 88
     }
89 89
 
Please login to merge, or discard this patch.
htdocs/modules/protector/preloads/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     static function eventCoreClassDatabaseDatabasefactoryConnection($args)
62 62
     {
63 63
         // Protector class
64
-        require_once dirname(__DIR__) . '/class/protector.php';
64
+        require_once dirname(__DIR__).'/class/protector.php';
65 65
 
66 66
         // Protector object
67 67
         $protector = Protector::getInstance();
Please login to merge, or discard this patch.
htdocs/modules/protector/include/postcheck_functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     // configs writable check
42
-    if (@$_SERVER['REQUEST_URI'] === '/admin.php' && !is_writable(dirname(__DIR__) . '/configs')) {
43
-        trigger_error('You should turn the directory ' . dirname(__DIR__) . '/configs writable', E_USER_WARNING);
42
+    if (@$_SERVER['REQUEST_URI'] === '/admin.php' && !is_writable(dirname(__DIR__).'/configs')) {
43
+        trigger_error('You should turn the directory '.dirname(__DIR__).'/configs writable', E_USER_WARNING);
44 44
     }
45 45
 
46 46
     // Protector object
47
-    require_once dirname(__DIR__) . '/class/protector.php';
47
+    require_once dirname(__DIR__).'/class/protector.php';
48 48
     $protector = Protector::getInstance();
49 49
 
50 50
     $protector->setConn($xoopsDB->conn);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     // http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/
59 59
     if (in_array(substr(XOOPS_VERSION, 0, 12), array('XOOPS 2.0.16', 'XOOPS 2.0.13', 'XOOPS 2.2.4'))) {
60 60
         $xoopsMailerConfig = $xoops->getConfigs();
61
-        if ($xoopsMailerConfig['mailmethod'] === 'sendmail' && md5_file(\XoopsBaseConfig::get('root-path') . '/class/mail/phpmailer/class.phpmailer.php') === 'ee1c09a8e579631f0511972f929fe36a') {
61
+        if ($xoopsMailerConfig['mailmethod'] === 'sendmail' && md5_file(\XoopsBaseConfig::get('root-path').'/class/mail/phpmailer/class.phpmailer.php') === 'ee1c09a8e579631f0511972f929fe36a') {
62 62
             echo '<strong>phpmailer security hole! Change the preferences of mail from "sendmail" to another, or upgrade the core right now! (message by protector)</strong>';
63 63
         }
64 64
     }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     $reliable_ips = @unserialize(@$conf['reliable_ips']);
84 84
     if (is_array($reliable_ips)) {
85 85
         foreach ($reliable_ips as $reliable_ip) {
86
-            if (!empty($reliable_ip) && preg_match('/' . $reliable_ip . '/', $_SERVER['REMOTE_ADDR'])) {
86
+            if (!empty($reliable_ip) && preg_match('/'.$reliable_ip.'/', $_SERVER['REMOTE_ADDR'])) {
87 87
                 return true;
88 88
             }
89 89
         }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     }
206 206
 
207 207
     // register.php Protection
208
-    if ($_SERVER['SCRIPT_FILENAME'] == \XoopsBaseConfig::get('root-path') . '/register.php') {
208
+    if ($_SERVER['SCRIPT_FILENAME'] == \XoopsBaseConfig::get('root-path').'/register.php') {
209 209
         $protector->call_filter('postcommon_register');
210 210
     }
211 211
 
Please login to merge, or discard this patch.
htdocs/modules/protector/include/precheck_functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 function protector_precheck()
26 26
 {
27 27
     // check the access is from install/index.php
28
-    if (defined('_INSTALL_CHARSET') && !is_writable(\XoopsBaseConfig::get('root-path') . '/mainfile.php')) {
28
+    if (defined('_INSTALL_CHARSET') && !is_writable(\XoopsBaseConfig::get('root-path').'/mainfile.php')) {
29 29
         die('To use installer, remove protector\'s lines from mainfile.php first.');
30 30
     }
31 31
 
32 32
     // Protector class
33
-    require_once dirname(__DIR__) . '/class/protector.php';
33
+    require_once dirname(__DIR__).'/class/protector.php';
34 34
 
35 35
     // Protector object
36 36
     $protector = Protector::getInstance();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
     $is_reliable = false;
70 70
     foreach ($reliable_ips as $reliable_ip) {
71
-        if (!empty($reliable_ip) && preg_match('/' . $reliable_ip . '/', $_SERVER['REMOTE_ADDR'])) {
71
+        if (!empty($reliable_ip) && preg_match('/'.$reliable_ip.'/', $_SERVER['REMOTE_ADDR'])) {
72 72
             $is_reliable = true;
73 73
         }
74 74
     }
Please login to merge, or discard this patch.
htdocs/modules/protector/include/install_extramodcheck.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,5 +27,5 @@
 block discarded – undo
27 27
  */
28 28
 function get_writeoks_from_protector($xoops_root_path, $mytrustdirname)
29 29
 {
30
-    return array(dirname(__DIR__) . '/configs');
30
+    return array(dirname(__DIR__).'/configs');
31 31
 }
Please login to merge, or discard this patch.
htdocs/modules/protector/include/precheck.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-require_once __DIR__ . '/precheck_functions.php';
22
+require_once __DIR__.'/precheck_functions.php';
23 23
 
24 24
 define('PROTECTOR_PRECHECK_INCLUDED', 1);
25
-define('PROTECTOR_VERSION', file_get_contents(__DIR__ . '/version.txt'));
25
+define('PROTECTOR_VERSION', file_get_contents(__DIR__.'/version.txt'));
26 26
 
27 27
 // set $_SERVER['REQUEST_URI'] for IIS
28 28
 if (empty($_SERVER['REQUEST_URI'])) { // Not defined by IIS
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
32 32
     }
33 33
     if (isset($_SERVER['QUERY_STRING'])) {
34
-        $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
34
+        $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
35 35
     }
36 36
 }
37 37
 
Please login to merge, or discard this patch.
htdocs/modules/protector/include/postcheck.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  * @version         $Id$
20 20
  */
21 21
 
22
-require_once __DIR__ . '/postcheck_functions.php';
22
+require_once __DIR__.'/postcheck_functions.php';
23 23
 
24 24
 if (!defined('PROTECTOR_PRECHECK_INCLUDED')) {
25
-    require __DIR__ . '/precheck.inc.php';
25
+    require __DIR__.'/precheck.inc.php';
26 26
     return;
27 27
 }
28 28
 
Please login to merge, or discard this patch.