fix: validate and sanitize application domains
This commit is contained in:
@@ -331,10 +331,10 @@ class General extends Component
|
|||||||
public function submit($showToaster = true)
|
public function submit($showToaster = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Url::fromString($this->application->fqdn, ['http', 'https']);
|
|
||||||
$this->application->fqdn = str($this->application->fqdn)->replaceEnd(',', '')->trim();
|
$this->application->fqdn = str($this->application->fqdn)->replaceEnd(',', '')->trim();
|
||||||
$this->application->fqdn = str($this->application->fqdn)->replaceStart(',', '')->trim();
|
$this->application->fqdn = str($this->application->fqdn)->replaceStart(',', '')->trim();
|
||||||
$this->application->fqdn = str($this->application->fqdn)->trim()->explode(',')->map(function ($domain) {
|
$this->application->fqdn = str($this->application->fqdn)->trim()->explode(',')->map(function ($domain) {
|
||||||
|
Url::fromString($domain, ['http', 'https']);
|
||||||
return str($domain)->trim()->lower();
|
return str($domain)->trim()->lower();
|
||||||
});
|
});
|
||||||
$this->application->fqdn = $this->application->fqdn->unique()->implode(',');
|
$this->application->fqdn = $this->application->fqdn->unique()->implode(',');
|
||||||
|
Reference in New Issue
Block a user