summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/auth.inc4
-rw-r--r--etc/inc/filter.inc2
-rw-r--r--etc/inc/filter_log.inc8
-rw-r--r--etc/inc/pfsense-utils.inc2
-rw-r--r--etc/inc/upgrade_config.inc2
5 files changed, 9 insertions, 9 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 48052a9..bdaced5 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -852,7 +852,7 @@ function ldap_get_groups($username, $authcfg) {
return false;
if(stristr($username, "@")) {
- $username_split = explode("\@", $username);
+ $username_split = explode("@", $username);
$username = $username_split[0];
}
@@ -969,7 +969,7 @@ function ldap_backed($username, $passwd, $authcfg) {
return;
if(stristr($username, "@")) {
- $username_split = explode("\@", $username);
+ $username_split = explode("@", $username);
$username = $username_split[0];
}
if(stristr($username, "\\")) {
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 23383c0..6e81abe 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -331,7 +331,7 @@ function filter_configure_sync($delete_states_if_needed = true) {
*/
if($rules_loading <> 0) {
$rules_error = exec_command("/sbin/pfctl -f {$g['tmp_path']}/rules.debug");
- $line_error = explode("\:", $rules_error);
+ $line_error = explode(":", $rules_error);
$line_number = $line_error[1];
$line_split = file("{$g['tmp_path']}/rules.debug");
if(is_array($line_split))
diff --git a/etc/inc/filter_log.inc b/etc/inc/filter_log.inc
index 3429ca7..3a75f30 100644
--- a/etc/inc/filter_log.inc
+++ b/etc/inc/filter_log.inc
@@ -150,7 +150,7 @@ function parse_filter_line($line) {
/* If we're dealing with TCP, try to determine the flags/control bits */
$flent['tcpflags'] = "";
if ($flent['proto'] == "TCP") {
- $flags = explode('[\, ]', $leftovers);
+ $flags = preg_split('/[, ]/', $leftovers);
$flent['tcpflags'] = str_replace(".", "A", substr($flags[1], 1, -1));
} elseif ($flent['proto'] == "Options") {
$flent['proto'] = "none";
@@ -174,21 +174,21 @@ function parse_ipport($addr) {
$port = '';
if (substr_count($addr, '.') > 1) {
/* IPv4 */
- $addr_split = explode("\.", $addr);
+ $addr_split = explode(".", $addr);
$ip = "{$addr_split[0]}.{$addr_split[1]}.{$addr_split[2]}.{$addr_split[3]}";
if ($ip == "...")
return array($addr, '');
if($addr_split[4] != "") {
- $port_split = explode("\:", $addr_split[4]);
+ $port_split = explode(":", $addr_split[4]);
$port = $port_split[0];
}
} else {
/* IPv6 */
$addr = explode(" ", $addr);
$addr = rtrim($addr[0], ":");
- $addr_split = explode("\.", $addr);
+ $addr_split = explode(".", $addr);
if (count($addr_split) > 1) {
$ip = $addr_split[0];
$port = $addr_split[1];
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index a1a2c73..b0a93a2 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -329,7 +329,7 @@ function get_carp_status() {
*/
function convert_ip_to_network_format($ip, $subnet) {
- $ipsplit = explode('[.]', $ip);
+ $ipsplit = explode('.', $ip);
$string = $ipsplit[0] . "." . $ipsplit[1] . "." . $ipsplit[2] . ".0/" . $subnet;
return $string;
}
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 1126473..3c27727 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -1876,7 +1876,7 @@ function upgrade_053_to_054() {
$gateway_group['item'] = array();
$i = 0;
foreach($lbpool['servers'] as $member) {
- $split = explode("\|", $member);
+ $split = explode("|", $member);
$interface = $split[0];
$monitor = $split[1];
/* on static upgraded configuration we automatically prepend GW_ */
OpenPOWER on IntegriCloud