Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2f00e12e
Commit
2f00e12e
authored
Apr 03, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: a good opportunity to sneak in a whitespace sweep
parent
bd42061f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
20 deletions
+16
-20
xmlrpc.inc
src/etc/inc/xmlrpc.inc
+0
-1
legacy.inc
src/etc/inc/xmlrpc/legacy.inc
+0
-1
rc.filter_synchronize
src/etc/rc.filter_synchronize
+11
-11
IXR_Library.php
src/opnsense/contrib/IXR_Library.php
+3
-3
index.volt
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
+0
-1
actions_filter.conf
src/opnsense/service/conf/actions_filter.conf
+0
-1
firewall_virtual_ip_edit.php
src/www/firewall_virtual_ip_edit.php
+1
-1
services_captiveportal_vouchers.php
src/www/services_captiveportal_vouchers.php
+1
-1
No files found.
src/etc/inc/xmlrpc.inc
View file @
2f00e12e
...
@@ -68,4 +68,3 @@ class XMLRPCServer
...
@@ -68,4 +68,3 @@ class XMLRPCServer
return
$server
;
return
$server
;
}
}
}
}
src/etc/inc/xmlrpc/legacy.inc
View file @
2f00e12e
...
@@ -286,4 +286,3 @@ function backup_config_section_xmlrpc($sectionKeys)
...
@@ -286,4 +286,3 @@ function backup_config_section_xmlrpc($sectionKeys)
return
array_intersect_key
(
$config
,
array_flip
(
$sectionKeys
));
return
array_intersect_key
(
$config
,
array_flip
(
$sectionKeys
));
}
}
}
}
src/etc/rc.filter_synchronize
View file @
2f00e12e
...
@@ -90,7 +90,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
...
@@ -90,7 +90,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
return
;
return
;
}
}
$client
=
new
SimpleXMLRPC_Client
(
$url
,
240
);
$client
=
new
SimpleXMLRPC_Client
(
$url
,
240
);
$client
->
setCredentials
(
$username
,
$password
);
$client
->
setCredentials
(
$username
,
$password
);
if
(
$client
->
query
(
$method
))
{
if
(
$client
->
query
(
$method
))
{
...
@@ -98,9 +98,9 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
...
@@ -98,9 +98,9 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
}
else
{
}
else
{
// propagate error to log
// propagate error to log
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
log_error
(
$error
);
log_error
(
$error
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
// print communication details on failure
// print communication details on failure
echo
$client
->
getDetails
();
echo
$client
->
getDetails
();
return
false
;
return
false
;
}
}
...
@@ -111,7 +111,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
...
@@ -111,7 +111,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
exit
;
exit
;
}
}
if
(
!
isset
(
$remote_version
[
'config_version'
])
||
if
(
!
isset
(
$remote_version
[
'config_version'
])
||
$remote_version
[
'config_version'
]
<
$config
[
'version'
])
{
$remote_version
[
'config_version'
]
<
$config
[
'version'
])
{
update_filter_reload_status
(
"The other member is on older configuration version of
{
$g
[
'product_name'
]
}
. Sync will not be done to prevent problems!"
);
update_filter_reload_status
(
"The other member is on older configuration version of
{
$g
[
'product_name'
]
}
. Sync will not be done to prevent problems!"
);
...
@@ -120,7 +120,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
...
@@ -120,7 +120,7 @@ function carp_check_version($url, $username, $password, $method = 'opnsense.firm
}
else
{
}
else
{
return
true
;
return
true
;
}
}
}
}
function
carp_sync_xml
(
$url
,
$username
,
$password
,
$sections
,
$method
=
'opnsense.restore_config_section'
)
{
function
carp_sync_xml
(
$url
,
$username
,
$password
,
$sections
,
$method
=
'opnsense.restore_config_section'
)
{
...
@@ -226,13 +226,13 @@ function carp_sync_xml($url, $username, $password, $sections, $method = 'opnsens
...
@@ -226,13 +226,13 @@ function carp_sync_xml($url, $username, $password, $sections, $method = 'opnsens
}
else
{
}
else
{
// propagate error to log
// propagate error to log
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
log_error
(
$error
);
log_error
(
$error
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
// print communication details on failure
// print communication details on failure
echo
$client
->
getDetails
();
echo
$client
->
getDetails
();
return
false
;
return
false
;
}
}
if
(
!
is_array
(
$response
)
&&
trim
(
$response
)
==
"Authentication failed"
)
{
if
(
!
is_array
(
$response
)
&&
trim
(
$response
)
==
"Authentication failed"
)
{
$error
=
"An authentication failure occurred while trying to access
{
$url
}
(
{
$method
}
)."
;
$error
=
"An authentication failure occurred while trying to access
{
$url
}
(
{
$method
}
)."
;
log_error
(
$error
);
log_error
(
$error
);
...
@@ -382,7 +382,7 @@ if (is_array($config['hasync'])) {
...
@@ -382,7 +382,7 @@ if (is_array($config['hasync'])) {
if
(
count
(
$argv
)
<=
1
||
$argv
[
1
]
!=
'restart'
)
{
if
(
count
(
$argv
)
<=
1
||
$argv
[
1
]
!=
'restart'
)
{
// only sync data, no reload
// only sync data, no reload
// TODO: config sync probably needs more thinking, but when we always force a reload
// TODO: config sync probably needs more thinking, but when we always force a reload
// TODO: the machine tends to get sloppy
// TODO: the machine tends to get sloppy
exit
;
exit
;
}
}
...
@@ -393,9 +393,9 @@ if (is_array($config['hasync'])) {
...
@@ -393,9 +393,9 @@ if (is_array($config['hasync'])) {
}
else
{
}
else
{
// propagate error to log
// propagate error to log
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
$error
=
"An error occurred while attempting XMLRPC sync with username
{
$username
}
and
{
$url
}
"
.
$client
->
error
;
log_error
(
$error
);
log_error
(
$error
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
file_notice
(
"sync_settings"
,
$error
,
"Settings Sync"
,
""
);
// print communication details on failure
// print communication details on failure
echo
$client
->
getDetails
();
echo
$client
->
getDetails
();
return
false
;
return
false
;
}
}
...
...
src/opnsense/contrib/IXR_Library.php
View file @
2f00e12e
...
@@ -362,7 +362,7 @@ class IXR_Server
...
@@ -362,7 +362,7 @@ class IXR_Server
{
{
if
(
!
$data
)
{
if
(
!
$data
)
{
if
(
isset
(
$_SERVER
[
'REQUEST_METHOD'
])
&&
$_SERVER
[
'REQUEST_METHOD'
]
!==
'POST'
)
{
if
(
isset
(
$_SERVER
[
'REQUEST_METHOD'
])
&&
$_SERVER
[
'REQUEST_METHOD'
]
!==
'POST'
)
{
header
(
'Content-Type: text/plain'
);
// merged from WP #9093
header
(
'Content-Type: text/plain'
);
// merged from WP #9093
die
(
'XML-RPC server accepts POST requests only.'
);
die
(
'XML-RPC server accepts POST requests only.'
);
}
}
...
@@ -679,11 +679,11 @@ class IXR_Client
...
@@ -679,11 +679,11 @@ class IXR_Client
$gettingHeaders
=
false
;
$gettingHeaders
=
false
;
}
}
if
(
!
$gettingHeaders
)
{
if
(
!
$gettingHeaders
)
{
// merged from WP #12559 - remove trim
// merged from WP #12559 - remove trim
$contents
.=
$line
;
$contents
.=
$line
;
}
}
if
(
$this
->
debug
)
{
if
(
$this
->
debug
)
{
$debugContents
.=
$line
;
$debugContents
.=
$line
;
}
}
}
}
if
(
$this
->
debug
)
{
if
(
$this
->
debug
)
{
...
...
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
View file @
2f00e12e
...
@@ -172,4 +172,3 @@ maxheight: define max height of select box, default=170px to hold 5 items
...
@@ -172,4 +172,3 @@ maxheight: define max height of select box, default=170px to hold 5 items
'activetab':'proxy-general'
'activetab':'proxy-general'
])
])
}}
}}
src/opnsense/service/conf/actions_filter.conf
View file @
2f00e12e
...
@@ -21,4 +21,3 @@ command:/usr/local/etc/rc.filter_synchronize
...
@@ -21,4 +21,3 @@ command:/usr/local/etc/rc.filter_synchronize
parameters
:%
s
parameters
:%
s
type
:
script
type
:
script
message
:
Syncing
firewall
%
s
message
:
Syncing
firewall
%
s
src/www/firewall_virtual_ip_edit.php
View file @
2f00e12e
...
@@ -103,7 +103,7 @@ if ($_POST) {
...
@@ -103,7 +103,7 @@ if ($_POST) {
if
(
is_ipaddr_configured
(
$_POST
[
'subnet'
],
$ignore_if
))
{
if
(
is_ipaddr_configured
(
$_POST
[
'subnet'
],
$ignore_if
))
{
$input_errors
[]
=
gettext
(
"This IP address is being used by another interface or VIP."
);
$input_errors
[]
=
gettext
(
"This IP address is being used by another interface or VIP."
);
}
}
unset
(
$ignore_if
);
unset
(
$ignore_if
);
}
}
}
}
...
...
src/www/services_captiveportal_vouchers.php
View file @
2f00e12e
...
@@ -238,7 +238,7 @@ if ($_POST) {
...
@@ -238,7 +238,7 @@ if ($_POST) {
$newvoucher
=
array
();
$newvoucher
=
array
();
}
else
{
}
else
{
$newvoucher
=
$config
[
'voucher'
][
$cpzone
];
$newvoucher
=
$config
[
'voucher'
][
$cpzone
];
}
}
if
(
$_POST
[
'enable'
]
==
"yes"
)
{
if
(
$_POST
[
'enable'
]
==
"yes"
)
{
$newvoucher
[
'enable'
]
=
true
;
$newvoucher
[
'enable'
]
=
true
;
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment