mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 14:13:52 +09:00
Merge pull request #1 from Mik317/master
[Fix] Semi-patched XSS on "boxbilling"
This commit is contained in:
3 files changed
+12
-8
No files matched your search
@@ -94,7 +94,7 @@ class Guest extends \Api_Abstract
|
||||
);
|
||||
$this->di['validator']->checkRequiredParamsForArray($required, $data);
|
||||
|
||||
$sld = $data['sld'];
|
||||
$sld = htmlspecialchars($data['sld'], ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
$validator = $this->di['validator'];
|
||||
if (!$validator->isSldValid($sld)) {
|
||||
throw new \Box_Exception('Domain :domain is not valid', array(':domain' => $sld));
|
||||
@@ -139,4 +139,4 @@ class Guest extends \Api_Abstract
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,8 @@ class Service implements \Box\InjectionAwareInterface
|
||||
}
|
||||
|
||||
if (!$validator->isSldValid($data['owndomain_sld'])) {
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $data['owndomain_sld']));
|
||||
$safe_dom = htmlspecialchars($data['owndomain_sld'], ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $safe_dom));
|
||||
}
|
||||
|
||||
$required = array(
|
||||
@@ -85,7 +86,8 @@ class Service implements \Box\InjectionAwareInterface
|
||||
}
|
||||
|
||||
if (!$validator->isSldValid($data['transfer_sld'])) {
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $data['transfer_sld']));
|
||||
$safe_dom = htmlspecialchars($data['transfer_sld'], ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $safe_dom));
|
||||
}
|
||||
|
||||
$required = array(
|
||||
@@ -115,7 +117,8 @@ class Service implements \Box\InjectionAwareInterface
|
||||
}
|
||||
|
||||
if (!$validator->isSldValid($data['register_sld'])) {
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $data['register_sld']));
|
||||
$safe_dom = htmlspecialchars($data['register_sld'], ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $safe_dom));
|
||||
}
|
||||
|
||||
$required = array(
|
||||
@@ -559,7 +562,8 @@ class Service implements \Box\InjectionAwareInterface
|
||||
|
||||
$validator = $this->di['validator'];
|
||||
if (!$validator->isSldValid($sld)) {
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $sld));
|
||||
$safe_dom = htmlspecialchars($sld, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
throw new \Box_Exception('Domain name :domain is not valid', array(':domain' => $safe_dom));
|
||||
}
|
||||
|
||||
if (!$model->allow_register) {
|
||||
@@ -1074,4 +1078,4 @@ class Service implements \Box\InjectionAwareInterface
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1487,4 +1487,4 @@ class Service implements \Box\InjectionAwareInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user