summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/base.php10
-rw-r--r--lib/private/Avatar.php5
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;
}
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177