GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 1bb178...d86b02 )
by Marco
01:55
created
contrib/rbldns/exportdns.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@
 block discarded – undo
1 1
 #!/usr/bin/php
2 2
 <?php
3 3
 
4
-if (PHP_SAPI != "cli")
4
+if (PHP_SAPI != "cli") {
5 5
     exit;
6
+}
6 7
 
7 8
 $home = '/var/www/html/RBL';
8 9
 require_once($home.'/config.php');
Please login to merge, or discard this patch.
changeMilter.php 1 patch
Braces   +28 added lines, -20 removed lines patch added patch discarded remove patch
@@ -4,8 +4,9 @@  discard block
 block discarded – undo
4 4
 $typedesc=$_POST['type'];
5 5
 $type = $tables["$typedesc"]['field'];
6 6
 $col = milterTable($type);
7
-if ( $col === FALSE )
7
+if ( $col === FALSE ) {
8 8
 	exit ("<p>Error in you config at field <b>$type</b>.</p>");
9
+}
9 10
 ?>
10 11
 <td colspan="10" style="text-align: center">
11 12
 
@@ -14,31 +15,35 @@  discard block
 block discarded – undo
14 15
 $user = $_POST['user'];
15 16
 
16 17
 /* Compare old values with new ones */
17
-if (isset($_POST['newvalues']))
18
+if (isset($_POST['newvalues'])) {
18 19
 	$new = $_POST['newvalues'];
19
-else
20
+} else {
20 21
 	$new = array();
21
-if (! empty($_POST['oldvalues']))
22
+}
23
+if (! empty($_POST['oldvalues'])) {
22 24
 	$old = explode(',', $_POST['oldvalues']);
23
-else
25
+} else {
24 26
 	$old=array();
27
+}
25 28
 $values=array();
26 29
 $logs=array();
27 30
 
28 31
 print '<pre>';
29 32
 /* Check need to disable all milters, removing unnecessary setting */
30
-if ( in_array('DISABLE ALL', $new) )
33
+if ( in_array('DISABLE ALL', $new) ) {
31 34
 	$new = array('DISABLE ALL');
35
+}
32 36
 
33 37
 /* Compare the values determining what to do */
34 38
 if (count(array_diff(array_merge($new, $old), array_intersect($new, $old))) !== 0) {
35 39
 	/* New and old are different (we assume we don't have duplicate values) */
36 40
 	if (! empty($new) ) {
37 41
 		foreach ($new as $item) {
38
-			if ( in_array($item, $old) )
39
-				$values["$item"] = 'keep';
40
-			else
41
-				$values["$item"] = 'add';
42
+			if ( in_array($item, $old) ) {
43
+							$values["$item"] = 'keep';
44
+			} else {
45
+							$values["$item"] = 'add';
46
+			}
42 47
 			$logs[] = "<$item>: ". $values["$item"];
43 48
 		}
44 49
 	}
@@ -53,22 +58,25 @@  discard block
 block discarded – undo
53 58
 }
54 59
 
55 60
 /* Logging */
56
-if ( empty($values) ) 
61
+if ( empty($values) ) {
57 62
 	print 'No values to change.';
58
-else {
63
+} else {
59 64
 	$msg = sprintf('%s: Changing Milter setting on list <%s> for %s <%s>.',$user,$typedesc,$type, $_POST['object']);
60 65
 	syslog(LOG_INFO, $msg);
61
-	foreach ($logs as $log)
62
-		syslog(LOG_INFO, "$user: milter $log");
66
+	foreach ($logs as $log) {
67
+			syslog(LOG_INFO, "$user: milter $log");
68
+	}
63 69
 	
64 70
 	/* Store new values */
65
-	if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
66
-        	exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
71
+	if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) {
72
+	        	exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
73
+	}
67 74
 
68
-	if (changeMilter ($mysqli,$user,$values,$col,$_POST['miltId']))
69
-		print 'OK milter setting changed.';
70
-	else
71
-		print 'ERROR updating milter setting; check your syslog. No changes made.';
75
+	if (changeMilter ($mysqli,$user,$values,$col,$_POST['miltId'])) {
76
+			print 'OK milter setting changed.';
77
+	} else {
78
+			print 'ERROR updating milter setting; check your syslog. No changes made.';
79
+	}
72 80
 
73 81
 	$mysqli->close();
74 82
 }
Please login to merge, or discard this patch.
listForm.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,14 @@
 block discarded – undo
1 1
 <?php
2
-if (in_array($user,array_keys(array_filter($adm)))) $extopt = '<option value="MONTH">MONTHS</option><option value="YEAR">YEARS</option>';
3
-else $extopt = NULL;
2
+if (in_array($user,array_keys(array_filter($adm)))) {
3
+	$extopt = '<option value="MONTH">MONTHS</option><option value="YEAR">YEARS</option>';
4
+} else {
5
+	$extopt = NULL;
6
+}
4 7
 
5 8
 if ( $tables["$typedesc"]['milter'] ) {
6
-	if ( checkMilterConf($tables["$typedesc"]) ) 
7
-		print '<p>This is a milter table. Please, first add your item as usual. Then you will be able to customize the milter settings.</p>';
8
-	else {
9
+	if ( checkMilterConf($tables["$typedesc"]) ) {
10
+			print '<p>This is a milter table. Please, first add your item as usual. Then you will be able to customize the milter settings.</p>';
11
+	} else {
9 12
 		$err = "Error in config about <$typedesc>. Check at your config.php.";
10 13
 		syslog (LOG_EMERG, $err);
11 14
 		printf ('<p>%s</p>', htmlspecialchars($err) );
Please login to merge, or discard this patch.
relist.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,19 +9,26 @@
 block discarded – undo
9 9
 <td colspan="<?php echo $cl; ?>" style="text-align: center">
10 10
 <?php
11 11
 openlog($tag, LOG_PID, $fac);
12
-if (empty($_POST['reason'])) die ("Specify a reason, please!</td>");
13
-if (preg_match( '/[^\x20-\x7f]/', $_POST['reason']))
12
+if (empty($_POST['reason'])) {
13
+	die ("Specify a reason, please!</td>");
14
+}
15
+if (preg_match( '/[^\x20-\x7f]/', $_POST['reason'])) {
14 16
         exit('ERROR: &lt;'.htmlentities($_POST['reason'],ENT_COMPAT | ENT_HTML401, 'ISO-8859-1').'&gt; contains NON ASCII chars.</td>');
17
+}
15 18
 $user = username();
16 19
 
17
-if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
20
+if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) {
18 21
                 exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
22
+}
19 23
 
20
-if (isFull($mysqli,$typedesc,$tables)) die("ERROR in relist: ".htmlspecialchars("$typedesc has reached maximum value of ".$tables["$typedesc"]['limit'].' listed items.') );
21
-if (relist ($mysqli,username(),$_POST['value'],$type,$table,$_POST['unit'],$_POST['quantity'],$_POST['reason']))
24
+if (isFull($mysqli,$typedesc,$tables)) {
25
+	die("ERROR in relist: ".htmlspecialchars("$typedesc has reached maximum value of ".$tables["$typedesc"]['limit'].' listed items.') );
26
+}
27
+if (relist ($mysqli,username(),$_POST['value'],$type,$table,$_POST['unit'],$_POST['quantity'],$_POST['reason'])) {
22 28
  print 'OK '.$_POST["type"].' &lt;'.$_POST['value'].'&gt; relisted for '.$_POST['quantity'].$_POST['unit'];
23
-else
29
+} else {
24 30
  print 'ERROR in relist; check log';
31
+}
25 32
 $mysqli->close();
26 33
 closelog();
27 34
 print '</td>';
Please login to merge, or discard this patch.
list.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,20 +6,27 @@
 block discarded – undo
6 6
 $table = ($tables["$typedesc"]['milter']) ? milterTable($type) : $tables["$typedesc"]['name'];
7 7
 
8 8
 openlog($tag, LOG_PID, $fac);
9
-if (empty($_POST['reason'])) die ("<p>Please, specify a reason!</p>");
10
-if (preg_match( '/[^\x20-\x7f]/', $_POST['reason']))
9
+if (empty($_POST['reason'])) {
10
+	die ("<p>Please, specify a reason!</p>");
11
+}
12
+if (preg_match( '/[^\x20-\x7f]/', $_POST['reason'])) {
11 13
 	exit('<p>ERROR: &lt;'.htmlentities($_POST['reason'],ENT_COMPAT | ENT_HTML401, 'ISO-8859-1').'&gt; contains NON ASCII chars.</p>');
14
+}
12 15
 $user = username();
13 16
 $err = NULL;
14 17
 
15
-if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
18
+if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) {
16 19
                 exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
20
+}
17 21
 
18
-if (addtolist ($mysqli,$user,$_POST['value'],$tables["$typedesc"],$_POST['unit'],$_POST['quantity'],$_POST['reason'],$err))
22
+if (addtolist ($mysqli,$user,$_POST['value'],$tables["$typedesc"],$_POST['unit'],$_POST['quantity'],$_POST['reason'],$err)) {
19 23
  print 'OK '.$_POST["type"].' &lt;'.$_POST['value'].'&gt; first time listed for '.$_POST['quantity'].$_POST['unit'].'.';
20
-else
24
+} else {
21 25
  print 'List operation ERROR; check log.';
22
-if (!is_null($err) ) print htmlentities(' Error: ' . $err);
26
+}
27
+if (!is_null($err) ) {
28
+	print htmlentities(' Error: ' . $err);
29
+}
23 30
 $mysqli->close();
24 31
 closelog();
25 32
 ?>
Please login to merge, or discard this patch.
remove.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,12 +9,14 @@
 block discarded – undo
9 9
 openlog($tag, LOG_PID, $fac);
10 10
 $user = username();
11 11
 
12
-if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
12
+if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) {
13 13
                 exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
14
-if (remove ($mysqli,$user,$_POST['value'],$type,$table))
14
+}
15
+if (remove ($mysqli,$user,$_POST['value'],$type,$table)) {
15 16
  print 'OK '.$typedesc.' &lt;'.$_POST['value'].'&gt; permanently REMOVED!';
16
-else
17
+} else {
17 18
  print 'Delete operation ERROR on '.$typedesc.' &lt;'.$_POST['value'].'&gt;; check log.';
19
+}
18 20
 print '</td>';
19 21
 $mysqli->close();
20 22
 closelog();
Please login to merge, or discard this patch.
relistForm.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 $adm = unserialize($_POST["adm"]);
3
-if (in_array($_POST["user"],array_keys(array_filter($adm)))) $extopt = '<option value="MONTH">MONTHS</option><option value="YEAR">YEARS</option>';
4
-else $extopt = NULL;
3
+if (in_array($_POST["user"],array_keys(array_filter($adm)))) {
4
+	$extopt = '<option value="MONTH">MONTHS</option><option value="YEAR">YEARS</option>';
5
+} else {
6
+	$extopt = NULL;
7
+}
5 8
 
6 9
 require_once('config.php');
7 10
 $typedesc=$_POST['type'];
Please login to merge, or discard this patch.
delist.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,13 +11,15 @@
 block discarded – undo
11 11
 openlog($tag, LOG_PID, $fac);
12 12
 $user = username();
13 13
 
14
-if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE )
14
+if ( ($mysqli = myConnect($dbhost, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user)) === FALSE ) {
15 15
                 exit ($user.': Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
16
+}
16 17
 
17
-if (changestatus($mysqli,username(),$_POST['value'],'0',$type,$table))
18
+if (changestatus($mysqli,username(),$_POST['value'],'0',$type,$table)) {
18 19
  print 'OK '.$_POST["type"].' &lt;'.$_POST['value'].'&gt; delisted.';
19
-else
20
+} else {
20 21
  print 'ERROR in delist &lt;'.$_POST['value'].'&gt;; check log';
22
+}
21 23
 print '</td>';
22 24
 $mysqli->close();
23 25
 closelog();
Please login to merge, or discard this patch.
contrib/splunk/webhook/readPost.php 1 patch
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -141,17 +141,19 @@  discard block
 block discarded – undo
141 141
         $thisVal = $data[1];
142 142
         unset($data[1]);
143 143
         $data = array_values($data);
144
-        if ( !in_array($thisVal,array_keys($tolist))  )
145
-	        $tolist["$thisVal"] = $data;
146
-        else if ($data[3]>$tolist[$thisVal][3])
147
-	        $tolist["$thisVal"] = $data;
148
-}
144
+        if ( !in_array($thisVal,array_keys($tolist))  ) {
145
+        	        $tolist["$thisVal"] = $data;
146
+        } else if ($data[3]>$tolist[$thisVal][3]) {
147
+        	        $tolist["$thisVal"] = $data;
148
+        }
149
+        }
149 150
 
150 151
 /* Make MYSQL connection */
151 152
 
152 153
 $mysqli = myConnect($host, $userdb, $pwd, $db, $dbport, $tables, $typedesc, $user);
153
-if ( $mysqli === FALSE )
154
+if ( $mysqli === FALSE ) {
154 155
 	exit (254);
156
+}
155 157
 
156 158
 foreach ( array_keys($tolist) as $value) {
157 159
         $quantity = $conf['quantity'];
@@ -168,17 +170,18 @@  discard block
 block discarded – undo
168 170
                                                 $recip = emailToNotify($domainNotify_file,$domain);
169 171
                                                 $subject = sprintf('%s <%s> is now blocked because exceedes limits on outgoing emails',
170 172
                                                                 $tables["$typedesc"]['field'], $value);
171
-                                                if (!empty($recip))
172
-                                                        if ( sendEmailWarn($tplfile,'[email protected]',$recip,
173
+                                                if (!empty($recip)) {
174
+                                                                                                        if ( sendEmailWarn($tplfile,'[email protected]',$recip,
173 175
                                                                 $subject,$value,"$quantity $unit",$reason) )
174 176
                                                                 syslog(LOG_INFO, "$user: \"$recip\" was notified about the \"$value\" abuse.");
177
+                                                }
178
+                                        } else {
179
+                                        	syslog(LOG_ERR,"$user: <$domain> contains the '@' char. Notification cannot be sent.");
175 180
                                         }
176
-                                        else syslog(LOG_ERR,"$user: <$domain> contains the '@' char. Notification cannot be sent.");
177 181
                                 }
178 182
                         }
179 183
                 }
180
-        }
181
-        else {
184
+        } else {
182 185
                 $reason .= " But it has NOT been listed because it doesn't apply to the trigger condition.";
183 186
                 syslog (LOG_INFO, "$user: ".$reason);
184 187
         }
Please login to merge, or discard this patch.