aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Federation/CloudIdManager.php8
-rw-r--r--lib/private/Repair/RepairMimeTypes.php13
-rw-r--r--lib/private/legacy/OC_Template.php2
-rw-r--r--lib/public/AppFramework/Http/Response.php14
4 files changed, 35 insertions, 2 deletions
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php
index d99fc350520..02e3c7cd513 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -86,7 +86,13 @@ class CloudIdManager implements ICloudIdManager {
if (isset($entry['CLOUD'])) {
foreach ($entry['CLOUD'] as $cloudID) {
if ($cloudID === $cloudId) {
- return $entry['FN'];
+ // Warning, if user decides to make his full name local only,
+ // no FN is found on federated servers
+ if (isset($entry['FN'])) {
+ return $entry['FN'];
+ } else {
+ return $cloudID;
+ }
}
}
}
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index c5157f81612..ecf46236483 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -192,6 +192,15 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}
+ private function introduceOrgModeType() {
+ $updatedMimetypes = [
+ 'org' => 'text/org'
+ ];
+
+ return $this->updateMimetypes($updatedMimetypes);
+ }
+
+
/**
* Fix mime types
*/
@@ -232,5 +241,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '20.0.0.5', '<') && $this->introduceOpenDocumentTemplates()) {
$out->info('Fixed OpenDocument template mime types');
}
+
+ if (version_compare($ocVersionFromBeforeUpdate, '21.0.0.7', '<') && $this->introduceOrgModeType()) {
+ $out->info('Fixed orgmode mime types');
+ }
}
}
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index 2ddb55096ad..c3a7af4b202 100644
--- a/lib/private/legacy/OC_Template.php
+++ b/lib/private/legacy/OC_Template.php
@@ -114,7 +114,7 @@ class OC_Template extends \OC\Template\Base {
OC_Util::addStyle('server', null, true);
OC_Util::addTranslations('core', null, true);
- if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
+ if (\OC::$server->getSystemConfig()->getValue('installed', false) && !\OCP\Util::needUpgrade()) {
OC_Util::addScript('merged-template-prepend', null, true);
OC_Util::addScript('dist/files_client', null, true);
OC_Util::addScript('dist/files_fileinfo', null, true);
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index ff6b97f87b1..fc3ee739773 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -38,6 +38,8 @@ namespace OCP\AppFramework\Http;
use OCP\AppFramework\Http;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\IConfig;
+use Psr\Log\LoggerInterface;
/**
* Base class for responses. Also used to just send headers.
@@ -203,6 +205,18 @@ class Response {
// to be able to reliably check for security
// headers
+ if ($this->status === Http::STATUS_NOT_MODIFIED
+ && stripos($name, 'x-') === 0) {
+ /** @var IConfig $config */
+ $config = \OC::$server->get(IConfig::class);
+
+ if ($config->getSystemValueBool('debug', false)) {
+ \OC::$server->get(LoggerInterface::class)->error(
+ 'Setting a custom header on a 204 or 304 is not supported'
+ );
+ }
+ }
+
if (is_null($value)) {
unset($this->headers[$name]);
} else {