mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 16:17:10 +00:00
fix: validate and sanitize application domains
This commit is contained in:
1 parent
6ac70d6e1b
commit
d59d8cda2a
1 file changed
+1
-1
@@ -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