-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
…gin if admin forgot to set it and small visual bugs
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ class Settings{ | |
*/ | ||
|
||
public static function getVersion() : string{ | ||
return '8.1.0'; | ||
return '8.1.1'; | ||
} | ||
|
||
public static function getLocation() : string{ | ||
|
@@ -43,7 +43,7 @@ public static function getAdminUsername() : string{ | |
} | ||
|
||
public static function getAdminPassword() : string{ | ||
return getenv('ADMIN_PASSWORD', true) ?: getenv('ADMIN_PASSWORD') ?: 'fehu2UPmpragklWoJcbr4BajxoaGns'; | ||
return getenv('ADMIN_PASSWORD', true) ?: getenv('ADMIN_PASSWORD') ?: hash('sha256', 'passky' . random_int(PHP_INT_MIN, PHP_INT_MAX) . random_int(PHP_INT_MIN, PHP_INT_MAX)); | ||
} | ||
|
||
public static function getCFTSiteKey() : string{ | ||
|
@@ -165,7 +165,7 @@ public static function getRedisLocalPassword() : string{ | |
*/ | ||
|
||
public static function getMail() : bool{ | ||
return in_array(getenv('MAIL_ENABLED', true), ['true', '1'], true); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
zigazajc007
Author
Member
|
||
return getenv('MAIL_ENABLED', true) === 'true'; | ||
} | ||
|
||
public static function getMailHost() : string{ | ||
|
@@ -185,7 +185,7 @@ public static function getMailPassword() : string{ | |
} | ||
|
||
public static function getMailTLS() : bool{ | ||
return in_array(getenv('MAIL_USE_TLS', true), ['true', '1'], true); | ||
return getenv('MAIL_USE_TLS', true) === 'true'; | ||
} | ||
|
||
/* | ||
|
@@ -227,7 +227,7 @@ public static function getYubiId() : int{ | |
*/ | ||
|
||
public static function getLimiter() : bool{ | ||
return in_array(getenv('LIMITER_ENABLED', true), ['true', '1'], true); | ||
return getenv('LIMITER_ENABLED', true) === 'true'; | ||
} | ||
|
||
public static function getLimiterGetInfo() : int{ | ||
|
I think you have to revert that, because
getenv
in shared hosting returns"1"
instead of"true"
.