mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:54:30 -04:00
Don't apply subdomain rules to self host
This commit is contained in:
parent
363460f513
commit
25a95e8e25
@ -915,6 +915,7 @@ class AccountController extends BaseController
|
||||
|
||||
if (Input::get('custom_link') == 'subdomain') {
|
||||
$subdomain = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', substr(strtolower(Input::get('subdomain')), 0, MAX_SUBDOMAIN_LENGTH));
|
||||
if (Utils::isNinja()) {
|
||||
$exclude = [
|
||||
'www',
|
||||
'app',
|
||||
@ -936,6 +937,7 @@ class AccountController extends BaseController
|
||||
'documents'
|
||||
];
|
||||
$rules['subdomain'] = "unique:accounts,subdomain,{$user->account_id},id|not_in:" . implode(',', $exclude);
|
||||
}
|
||||
} else {
|
||||
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', substr(strtolower(Input::get('iframe_url')), 0, MAX_IFRAME_URL_LENGTH));
|
||||
$iframeURL = rtrim($iframeURL, '/');
|
||||
|
Loading…
x
Reference in New Issue
Block a user