mirror of
https://github.com/unraid/webgui.git
synced 2026-04-28 05:49:35 -05:00
fix(ProvisionCert): cert subject parsing
This commit is contained in:
@@ -46,7 +46,7 @@ $isRegistered = !empty($remote) && !empty($remote['username']);
|
||||
$certPresent = file_exists($certPath);
|
||||
if ($certPresent) {
|
||||
// renew existing cert
|
||||
$subject = exec("/usr/bin/openssl x509 -subject -noout -in ".escapeshellarg($certPath));
|
||||
$certSubject = exec("/usr/bin/openssl x509 -subject -noout -in ".escapeshellarg($certPath));
|
||||
$isLegacyCert = preg_match('/.*\.unraid\.net$/', $certSubject);
|
||||
$isWildcardCert = preg_match('/.*\.myunraid\.net$/', $certSubject);
|
||||
if ($isLegacyCert || $isWildcardCert) {
|
||||
|
||||
Reference in New Issue
Block a user