node: lowercase fqdn in letsencrypt path (#3890)

This commit is contained in:
Matthew Penner 2022-01-17 19:56:57 -07:00 committed by GitHub
parent 28f7a809a5
commit 1eaf411cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
namespace Pterodactyl\Models; namespace Pterodactyl\Models;
use Illuminate\Support\Str;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Illuminate\Container\Container; use Illuminate\Container\Container;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
@ -155,8 +156,8 @@ class Node extends Model
'port' => $this->daemonListen, 'port' => $this->daemonListen,
'ssl' => [ 'ssl' => [
'enabled' => (!$this->behind_proxy && $this->scheme === 'https'), 'enabled' => (!$this->behind_proxy && $this->scheme === 'https'),
'cert' => '/etc/letsencrypt/live/' . $this->fqdn . '/fullchain.pem', 'cert' => '/etc/letsencrypt/live/' . Str::lower($this->fqdn) . '/fullchain.pem',
'key' => '/etc/letsencrypt/live/' . $this->fqdn . '/privkey.pem', 'key' => '/etc/letsencrypt/live/' . Str::lower($this->fqdn) . '/privkey.pem',
], ],
'upload_limit' => $this->upload_size, 'upload_limit' => $this->upload_size,
], ],