mirror of
https://github.com/friendica/friendica
synced 2025-04-28 21:04:22 +02:00
BaseURL hardening
This commit is contained in:
parent
e69138039a
commit
40c075cf47
2 changed files with 29 additions and 11 deletions
|
@ -139,21 +139,21 @@ class BaseURL
|
|||
{
|
||||
$success = true;
|
||||
|
||||
if (!empty($hostname)) {
|
||||
if (!empty($hostname) && $hostname !== $this->hostname) {
|
||||
$this->hostname = $hostname;
|
||||
if (!$this->config->set('config', 'hostname', $this->hostname)) {
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($sslPolicy)) {
|
||||
if (isset($sslPolicy) && $sslPolicy !== $this->sslPolicy) {
|
||||
$this->sslPolicy = $sslPolicy;
|
||||
if (!$this->config->set('system', 'ssl_policy', $this->sslPolicy)) {
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($urlPath)) {
|
||||
if (isset($urlPath) && $urlPath !== $this->urlPath) {
|
||||
$this->urlPath = $urlPath;
|
||||
if (!$this->config->set('system', 'urlpath', $this->urlPath)) {
|
||||
$success = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue