mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-01 21:02:54 +09:00
Prevent potential issues for various order variables (#2179)
This commit is contained in:
1 parent
71cf6f7be4
commit
4e21b3ed0c
1 file changed
+10
-8
@@ -537,15 +537,17 @@ class Service implements InjectionAwareInterface
|
||||
* It will, however, avoid instances like this when a domain name is entered with a capital letter:
|
||||
* https://github.com/boxbilling/boxbilling/discussions/1022#discussioncomment-1311819
|
||||
*/
|
||||
$item['register_sld'] = (isset($item['register_sld'])) ? strtolower($item['register_sld']) : null;
|
||||
$item['transfer_sld'] = (isset($item['transfer_sld'])) ? strtolower($item['transfer_sld']) : null;
|
||||
$item['sld'] = (isset($item['sld'])) ? strtolower($item['sld']) : null;
|
||||
$item['domain']['owndomain_sld'] = (isset($item['domain']['owndomain_sld'])) ? strtolower($item['domain']['owndomain_sld']) : null;
|
||||
$item['domain']['register_sld'] = (isset($item['domain']['register_sld'])) ? strtolower($item['domain']['register_sld']) : null;
|
||||
$item['domain']['transfer_sld'] = (isset($item['domain']['transfer_sld'])) ? strtolower($item['domain']['transfer_sld']) : null;
|
||||
if ($item['type'] === 'domain' || $item['type'] === 'hosting') {
|
||||
$item['register_sld'] = (isset($item['register_sld'])) ? strtolower($item['register_sld']) : null;
|
||||
$item['transfer_sld'] = (isset($item['transfer_sld'])) ? strtolower($item['transfer_sld']) : null;
|
||||
$item['sld'] = (isset($item['sld'])) ? strtolower($item['sld']) : null;
|
||||
$item['domain']['owndomain_sld'] = (isset($item['domain']['owndomain_sld'])) ? strtolower($item['domain']['owndomain_sld']) : null;
|
||||
$item['domain']['register_sld'] = (isset($item['domain']['register_sld'])) ? strtolower($item['domain']['register_sld']) : null;
|
||||
$item['domain']['transfer_sld'] = (isset($item['domain']['transfer_sld'])) ? strtolower($item['domain']['transfer_sld']) : null;
|
||||
|
||||
// Domain TLD must begin with a period - add if not present for owndomain.
|
||||
$item['domain']['owndomain_tld'] = (isset($item['domain']['owndomain_tld'])) ? (str_contains($item['domain']['owndomain_tld'], '.') ? $item['domain']['owndomain_tld'] : '.' . $item['domain']['owndomain_tld']) : null;
|
||||
// Domain TLD must begin with a period - add if not present for owndomain.
|
||||
$item['domain']['owndomain_tld'] = (isset($item['domain']['owndomain_tld'])) ? (str_contains($item['domain']['owndomain_tld'], '.') ? $item['domain']['owndomain_tld'] : '.' . $item['domain']['owndomain_tld']) : null;
|
||||
}
|
||||
|
||||
$order = $this->di['db']->dispense('ClientOrder');
|
||||
$order->client_id = $client->id;
|
||||
|
||||
Reference in new issue
Block a user