Skip to content

Commit fb0eb20

Browse files
author
Ermal
committed
Actually do not allow the loop to continue. Related to Ticket pfsense#1928
1 parent 1f36db1 commit fb0eb20

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

usr/local/www/xmlrpc.php

+15-5
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ function exec_shell_xmlrpc($raw_params) {
142142
function backup_config_section_xmlrpc($raw_params) {
143143
global $config, $xmlrpc_g;
144144

145-
if (xmlrpc_loop_detect())
145+
if (xmlrpc_loop_detect()) {
146146
log_error("Disallowing CARP sync loop");
147+
return;
148+
}
147149

148150
$params = xmlrpc_params_to_php($raw_params);
149151
if(!xmlrpc_auth($params)) {
@@ -170,8 +172,10 @@ function restore_config_section_xmlrpc($raw_params) {
170172

171173
$old_config = $config;
172174

173-
if (xmlrpc_loop_detect())
175+
if (xmlrpc_loop_detect()) {
174176
log_error("Disallowing CARP sync loop");
177+
return;
178+
}
175179

176180
$params = xmlrpc_params_to_php($raw_params);
177181
if(!xmlrpc_auth($params)) {
@@ -295,8 +299,10 @@ interface_proxyarp_configure();
295299
function merge_installedpackages_section_xmlrpc($raw_params) {
296300
global $config, $xmlrpc_g;
297301

298-
if (xmlrpc_loop_detect())
302+
if (xmlrpc_loop_detect()) {
299303
log_error("Disallowing CARP sync loop");
304+
return;
305+
}
300306

301307
$params = xmlrpc_params_to_php($raw_params);
302308
if(!xmlrpc_auth($params)) {
@@ -323,8 +329,10 @@ function merge_installedpackages_section_xmlrpc($raw_params) {
323329
function merge_config_section_xmlrpc($raw_params) {
324330
global $config, $xmlrpc_g;
325331

326-
if (xmlrpc_loop_detect())
332+
if (xmlrpc_loop_detect()) {
327333
log_error("Disallowing CARP sync loop");
334+
return;
335+
}
328336

329337
$params = xmlrpc_params_to_php($raw_params);
330338
if(!xmlrpc_auth($params)) {
@@ -380,8 +388,10 @@ function filter_configure_xmlrpc($raw_params) {
380388
function interfaces_carp_configure_xmlrpc($raw_params) {
381389
global $xmlrpc_g;
382390

383-
if (xmlrpc_loop_detect())
391+
if (xmlrpc_loop_detect()) {
384392
log_error("Disallowing CARP sync loop");
393+
return;
394+
}
385395

386396
$params = xmlrpc_params_to_php($raw_params);
387397
if(!xmlrpc_auth($params)) {

0 commit comments

Comments
 (0)