diff options
-rw-r--r-- | lib/base.php | 10 | ||||
-rw-r--r-- | lib/private/Avatar.php | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index d0672785cef..080b268795c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -779,8 +779,16 @@ class OC { $isScssRequest = true; } + if(substr($request->getRequestUri(), -11) === '/status.php') { + OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST); + header('Status: 400 Bad Request'); + header('Content-Type: application/json'); + echo '{"error": "Trusted domain error.", "code": 15}'; + exit(); + } + if (!$isScssRequest) { - header('HTTP/1.1 400 Bad Request'); + OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST); header('Status: 400 Bad Request'); \OC::$server->getLogger()->warning( diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index afa9118c509..cd29017333c 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -217,6 +217,11 @@ class Avatar implements IAvatar { } + if($this->config->getUserValue($this->user->getUID(), 'avatar', 'generated', null) === null) { + $generated = $this->folder->fileExists('generated') ? 'true' : 'false'; + $this->config->setUserValue($this->user->getUID(), 'avatar', 'generated', $generated); + } + return $file; } |