aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/l10n/eu.js35
-rw-r--r--lib/l10n/eu.json35
-rw-r--r--lib/private/Files/Storage/Common.php6
-rw-r--r--lib/private/OCM/OCMDiscoveryService.php3
-rw-r--r--lib/private/Security/Signature/SignatureManager.php3
-rw-r--r--lib/unstable/Federation/ISignedCloudFederationProvider.php33
-rw-r--r--lib/unstable/Security/Signature/Model/Signatory.php4
9 files changed, 116 insertions, 5 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index a30eccfd838..94e6e1f1e41 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -12,6 +12,7 @@ return array(
'NCU\\Config\\Exceptions\\UnknownKeyException' => $baseDir . '/lib/unstable/Config/Exceptions/UnknownKeyException.php',
'NCU\\Config\\IUserConfig' => $baseDir . '/lib/unstable/Config/IUserConfig.php',
'NCU\\Config\\ValueType' => $baseDir . '/lib/unstable/Config/ValueType.php',
+ 'NCU\\Federation\\ISignedCloudFederationProvider' => $baseDir . '/lib/unstable/Federation/ISignedCloudFederationProvider.php',
'NCU\\Security\\Signature\\Enum\\DigestAlgorithm' => $baseDir . '/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php',
'NCU\\Security\\Signature\\Enum\\SignatoryStatus' => $baseDir . '/lib/unstable/Security/Signature/Enum/SignatoryStatus.php',
'NCU\\Security\\Signature\\Enum\\SignatoryType' => $baseDir . '/lib/unstable/Security/Signature/Enum/SignatoryType.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 9ca1852a071..246934b4848 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -53,6 +53,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'NCU\\Config\\Exceptions\\UnknownKeyException' => __DIR__ . '/../../..' . '/lib/unstable/Config/Exceptions/UnknownKeyException.php',
'NCU\\Config\\IUserConfig' => __DIR__ . '/../../..' . '/lib/unstable/Config/IUserConfig.php',
'NCU\\Config\\ValueType' => __DIR__ . '/../../..' . '/lib/unstable/Config/ValueType.php',
+ 'NCU\\Federation\\ISignedCloudFederationProvider' => __DIR__ . '/../../..' . '/lib/unstable/Federation/ISignedCloudFederationProvider.php',
'NCU\\Security\\Signature\\Enum\\DigestAlgorithm' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php',
'NCU\\Security\\Signature\\Enum\\SignatoryStatus' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Enum/SignatoryStatus.php',
'NCU\\Security\\Signature\\Enum\\SignatoryType' => __DIR__ . '/../../..' . '/lib/unstable/Security/Signature/Enum/SignatoryType.php',
diff --git a/lib/l10n/eu.js b/lib/l10n/eu.js
index d883a8efc92..d939002273b 100644
--- a/lib/l10n/eu.js
+++ b/lib/l10n/eu.js
@@ -87,12 +87,15 @@ OC.L10N.register(
"\"%1$s\" is not allowed inside a file or folder name." : "\"%1$s\" ez da onartzen fitxategi edo karpeta-izen baten barruan.",
"\"%1$s\" is a forbidden file type." : "\"%1$s\" debekatutako fitxategi mota bat da.",
"Filenames must not end with \"%1$s\"." : "Fitxategi-izenak ez dira \"%1$s\"rekin amaitu behar.",
+ "Invalid parent path" : "Guraso bide-izen baliogabea",
"File already exists" : "Badago izen bereko fitxategi bat",
"Invalid path" : "Bide-izen baliogabea",
"Failed to create file from template" : "Fitxategi berria txantiloitik sortzeak huts egin du",
"Templates" : "Txantiloiak",
"Path contains invalid segments" : "Bideak segmentu baliogabeak ditu",
+ "Filename is a reserved word" : "Fitxategi izena hitz erreserbatua da",
"Filename contains at least one invalid character" : "Fitxategi-izenak karaktere baliogabe bat du gutxienez",
+ "Filename is too long" : "Fitxategi-izena luzeegia da",
"Empty filename is not allowed" : "Fitxategiaren izena ezin da hutsa izan",
"App \"%s\" cannot be installed because appinfo file cannot be read." : "«%s» aplikazioa ezin da instalatu appinfo fitxategia ezin delako irakurri.",
"App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" aplikazioa ezin da instalatu ez delako zerbitzariaren bertsio honekin bateragarria.",
@@ -153,16 +156,48 @@ OC.L10N.register(
"%1$s shared »%2$s« with you and wants to add:" : "%1$serabiltzaileak »%2$s« partekatu du zurekin eta hau gehitu nahi du:",
"%1$s shared »%2$s« with you and wants to add" : "%1$serabiltzaileak »%2$s« partekatu du zurekin eta hau gehitu nahi du",
"»%s« added a note to a file shared with you" : "»%s« erabiltzaileak ohar bat gehitu du partekatu dizun fitxategi batean",
+ "Passwords are enforced for link and mail shares" : "Esteka eta posta partekatzeentzako pasahitzak behartzen dira",
+ "Share recipient is not a valid user" : "Partekatzearen hartzailea ez da baliozko erabiltzailea",
+ "Share recipient is not a valid group" : "Partekatzearen hartzailea ez da baliozko taldea",
+ "Share recipient should be empty" : "Partekatzearen hartzailea huts egon beharko luke",
+ "Share recipient should not be empty" : "Partekatzearen hartzailea ez luke huts egon beharko",
+ "Share recipient is not a valid circle" : "Partekatzearen hartzailea ez da baliozko zirkulua",
"Unknown share type" : "Partekatze mota ezezaguna",
+ "Share initiator must be set" : "Partekatzearen hasieratzailea ezarri behar da",
+ "Cannot share with yourself" : "Ezin duzu zurekin partekatu",
+ "Shared path must be set" : "Partekatzearen bide-izena ezarri behar da",
+ "Shared path must be either a file or a folder" : "Partekatzearen bide-izena fitxategi edo karpeta bat izan behar da",
+ "You cannot share your root folder" : "Ezin duzu zure erro-karpeta partekatu",
"You are not allowed to share %s" : "Ez duzu %s partekatzeko baimenik",
+ "Valid permissions are required for sharing" : "Baliozko baimenak behar dira partekatzeko",
"Cannot increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu",
+ "Shares need at least read permissions" : "Partekatzeak gutxienez irakurtzeko baimenak izan behar ditu",
"Files cannot be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu",
"Files cannot be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu",
"Expiration date is in the past" : "Iraungitze-data iraganean dago",
+ "Expiration date is enforced" : "Iraungitze-data betearazten da",
"_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri","Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri"],
"Sharing is only allowed with group members" : "Taldeko kideekin bakarrik parteka daiteke",
"Sharing %s failed, because this item is already shared with the account %s" : "%s partekatzeak huts egin du, dagoeneko %s kontuarekin partekatuta dagoelako",
+ "Group sharing is now allowed" : "Talde-partekatzea baimentzen da orain",
+ "Sharing is only allowed within your own groups" : "Soilik zure taldeekin partekatu dezakezu",
+ "Path is already shared with this group" : "Bide-izen hau dagoeneko partekatuta dago talde honekin",
+ "Link sharing is not allowed" : "Esteken partekatzea ez da onartzen",
+ "Public upload is not allowed" : "Igotze publikoa ez da onartzen",
+ "Path contains files shared with you" : "Bide-izenak zurekin partekatutako fitxategiak dauzka",
"Sharing is disabled" : "Partekatzea desgaituta dago",
+ "Sharing is disabled for you" : "Partekatzea zuretzat desgaituta dago",
+ "Cannot share with the share owner" : "Ezin da partekatzearen jabearekin partekatu",
+ "Share does not have a full ID" : "Partekatzeak ez dauka ID oso bat",
+ "Cannot change share type" : "Ezin da partekatze mota aldatu",
+ "Can only update recipient on user shares" : "Hartzailea erabiltzaile-partekatzeetan soilik eguneratu daiteke",
+ "Cannot enable sending the password by Talk with an empty password" : "Ezin da gaitu Talk-en bidez pasahitza bidaltzea pasahitza hutsik badago",
+ "Cannot enable sending the password by Talk without setting a new password" : "Ezin da gaitu Talk-en bidez pasahitza bidaltzea pasahitz berria ezarri gabe",
+ "Cannot disable sending the password by Talk without setting a new password" : "Ezin da desgaitu Talk-en bidez pasahitza bidaltzea pasahitz berria ezarri gabe",
+ "Share provider does not support accepting" : "Partekatzearen hornitzaileak ez du onarpena onartzen",
+ "Cannot change target of link share" : "Ezin da esteka partekatze baten helburua aldatu",
+ "Invalid share recipient" : "Partekatze-hartzaile baliogabea",
+ "Group \"%s\" does not exist" : "«%s» ez da existitzen",
"The requested share does not exist anymore" : "Eskatutako partekatzea ez da existitzen dagoeneko",
"The requested share comes from a disabled user" : "Eskatutako partekatzea desgaitutako erabiltzaile batengatik dator",
"The user was not created because the user limit has been reached. Check your notifications to learn more." : "Ezin izan da erabiltzailea sortu, erabiltzaile muga gainditu delako. Egiaztatu zure jakinarazpenak gehiago jakiteko.",
diff --git a/lib/l10n/eu.json b/lib/l10n/eu.json
index 59fc51924c0..864e4bdd548 100644
--- a/lib/l10n/eu.json
+++ b/lib/l10n/eu.json
@@ -85,12 +85,15 @@
"\"%1$s\" is not allowed inside a file or folder name." : "\"%1$s\" ez da onartzen fitxategi edo karpeta-izen baten barruan.",
"\"%1$s\" is a forbidden file type." : "\"%1$s\" debekatutako fitxategi mota bat da.",
"Filenames must not end with \"%1$s\"." : "Fitxategi-izenak ez dira \"%1$s\"rekin amaitu behar.",
+ "Invalid parent path" : "Guraso bide-izen baliogabea",
"File already exists" : "Badago izen bereko fitxategi bat",
"Invalid path" : "Bide-izen baliogabea",
"Failed to create file from template" : "Fitxategi berria txantiloitik sortzeak huts egin du",
"Templates" : "Txantiloiak",
"Path contains invalid segments" : "Bideak segmentu baliogabeak ditu",
+ "Filename is a reserved word" : "Fitxategi izena hitz erreserbatua da",
"Filename contains at least one invalid character" : "Fitxategi-izenak karaktere baliogabe bat du gutxienez",
+ "Filename is too long" : "Fitxategi-izena luzeegia da",
"Empty filename is not allowed" : "Fitxategiaren izena ezin da hutsa izan",
"App \"%s\" cannot be installed because appinfo file cannot be read." : "«%s» aplikazioa ezin da instalatu appinfo fitxategia ezin delako irakurri.",
"App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" aplikazioa ezin da instalatu ez delako zerbitzariaren bertsio honekin bateragarria.",
@@ -151,16 +154,48 @@
"%1$s shared »%2$s« with you and wants to add:" : "%1$serabiltzaileak »%2$s« partekatu du zurekin eta hau gehitu nahi du:",
"%1$s shared »%2$s« with you and wants to add" : "%1$serabiltzaileak »%2$s« partekatu du zurekin eta hau gehitu nahi du",
"»%s« added a note to a file shared with you" : "»%s« erabiltzaileak ohar bat gehitu du partekatu dizun fitxategi batean",
+ "Passwords are enforced for link and mail shares" : "Esteka eta posta partekatzeentzako pasahitzak behartzen dira",
+ "Share recipient is not a valid user" : "Partekatzearen hartzailea ez da baliozko erabiltzailea",
+ "Share recipient is not a valid group" : "Partekatzearen hartzailea ez da baliozko taldea",
+ "Share recipient should be empty" : "Partekatzearen hartzailea huts egon beharko luke",
+ "Share recipient should not be empty" : "Partekatzearen hartzailea ez luke huts egon beharko",
+ "Share recipient is not a valid circle" : "Partekatzearen hartzailea ez da baliozko zirkulua",
"Unknown share type" : "Partekatze mota ezezaguna",
+ "Share initiator must be set" : "Partekatzearen hasieratzailea ezarri behar da",
+ "Cannot share with yourself" : "Ezin duzu zurekin partekatu",
+ "Shared path must be set" : "Partekatzearen bide-izena ezarri behar da",
+ "Shared path must be either a file or a folder" : "Partekatzearen bide-izena fitxategi edo karpeta bat izan behar da",
+ "You cannot share your root folder" : "Ezin duzu zure erro-karpeta partekatu",
"You are not allowed to share %s" : "Ez duzu %s partekatzeko baimenik",
+ "Valid permissions are required for sharing" : "Baliozko baimenak behar dira partekatzeko",
"Cannot increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu",
+ "Shares need at least read permissions" : "Partekatzeak gutxienez irakurtzeko baimenak izan behar ditu",
"Files cannot be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu",
"Files cannot be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu",
"Expiration date is in the past" : "Iraungitze-data iraganean dago",
+ "Expiration date is enforced" : "Iraungitze-data betearazten da",
"_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri","Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri"],
"Sharing is only allowed with group members" : "Taldeko kideekin bakarrik parteka daiteke",
"Sharing %s failed, because this item is already shared with the account %s" : "%s partekatzeak huts egin du, dagoeneko %s kontuarekin partekatuta dagoelako",
+ "Group sharing is now allowed" : "Talde-partekatzea baimentzen da orain",
+ "Sharing is only allowed within your own groups" : "Soilik zure taldeekin partekatu dezakezu",
+ "Path is already shared with this group" : "Bide-izen hau dagoeneko partekatuta dago talde honekin",
+ "Link sharing is not allowed" : "Esteken partekatzea ez da onartzen",
+ "Public upload is not allowed" : "Igotze publikoa ez da onartzen",
+ "Path contains files shared with you" : "Bide-izenak zurekin partekatutako fitxategiak dauzka",
"Sharing is disabled" : "Partekatzea desgaituta dago",
+ "Sharing is disabled for you" : "Partekatzea zuretzat desgaituta dago",
+ "Cannot share with the share owner" : "Ezin da partekatzearen jabearekin partekatu",
+ "Share does not have a full ID" : "Partekatzeak ez dauka ID oso bat",
+ "Cannot change share type" : "Ezin da partekatze mota aldatu",
+ "Can only update recipient on user shares" : "Hartzailea erabiltzaile-partekatzeetan soilik eguneratu daiteke",
+ "Cannot enable sending the password by Talk with an empty password" : "Ezin da gaitu Talk-en bidez pasahitza bidaltzea pasahitza hutsik badago",
+ "Cannot enable sending the password by Talk without setting a new password" : "Ezin da gaitu Talk-en bidez pasahitza bidaltzea pasahitz berria ezarri gabe",
+ "Cannot disable sending the password by Talk without setting a new password" : "Ezin da desgaitu Talk-en bidez pasahitza bidaltzea pasahitz berria ezarri gabe",
+ "Share provider does not support accepting" : "Partekatzearen hornitzaileak ez du onarpena onartzen",
+ "Cannot change target of link share" : "Ezin da esteka partekatze baten helburua aldatu",
+ "Invalid share recipient" : "Partekatze-hartzaile baliogabea",
+ "Group \"%s\" does not exist" : "«%s» ez da existitzen",
"The requested share does not exist anymore" : "Eskatutako partekatzea ez da existitzen dagoeneko",
"The requested share comes from a disabled user" : "Eskatutako partekatzea desgaitutako erabiltzaile batengatik dator",
"The user was not created because the user limit has been reached. Check your notifications to learn more." : "Ezin izan da erabiltzailea sortu, erabiltzaile muga gainditu delako. Egiaztatu zure jakinarazpenak gehiago jakiteko.",
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 036ccad23a5..ca0e38774c8 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -16,6 +16,7 @@ use OC\Files\Cache\Watcher;
use OC\Files\FilenameValidator;
use OC\Files\Filesystem;
use OC\Files\ObjectStore\ObjectStoreStorage;
+use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\Storage\Wrapper\Jail;
use OC\Files\Storage\Wrapper\Wrapper;
use OCP\Files\Cache\ICache;
@@ -547,7 +548,10 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage,
}
public function moveFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath): bool {
- if ($this->isSameStorage($sourceStorage)) {
+ if (
+ !$sourceStorage->instanceOfStorage(Encryption::class) &&
+ $this->isSameStorage($sourceStorage)
+ ) {
// resolve any jailed paths
while ($sourceStorage->instanceOfStorage(Jail::class)) {
/**
diff --git a/lib/private/OCM/OCMDiscoveryService.php b/lib/private/OCM/OCMDiscoveryService.php
index 55da887494a..af612416372 100644
--- a/lib/private/OCM/OCMDiscoveryService.php
+++ b/lib/private/OCM/OCMDiscoveryService.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OC\OCM;
+use GuzzleHttp\Exception\ConnectException;
use JsonException;
use OCP\AppFramework\Http;
use OCP\Http\Client\IClientService;
@@ -50,7 +51,7 @@ class OCMDiscoveryService implements IOCMDiscoveryService {
// if scheme not specified, we test both;
try {
return $this->discover('https://' . $remote, $skipCache);
- } catch (OCMProviderException) {
+ } catch (OCMProviderException|ConnectException) {
return $this->discover('http://' . $remote, $skipCache);
}
}
diff --git a/lib/private/Security/Signature/SignatureManager.php b/lib/private/Security/Signature/SignatureManager.php
index fa52bbfaa7c..91a06e29b4a 100644
--- a/lib/private/Security/Signature/SignatureManager.php
+++ b/lib/private/Security/Signature/SignatureManager.php
@@ -142,7 +142,7 @@ class SignatureManager implements ISignatureManager {
if ($ttlSignatory > 0 && $knownSignatory->getLastUpdated() < (time() - $ttlSignatory)) {
$signatory = $this->getSaneRemoteSignatory($signatoryManager, $signedRequest);
$this->updateSignatoryMetadata($signatory);
- $knownSignatory->setMetadata($signatory->getMetadata());
+ $knownSignatory->setMetadata($signatory->getMetadata() ?? []);
}
$signedRequest->setSignatory($knownSignatory);
@@ -353,6 +353,7 @@ class SignatureManager implements ISignatureManager {
$time = time();
$signatory->setCreation($time);
$signatory->setLastUpdated($time);
+ $signatory->setMetadata($signatory->getMetadata() ?? []); // trigger insert on field metadata using current or default value
$this->mapper->insert($signatory);
}
diff --git a/lib/unstable/Federation/ISignedCloudFederationProvider.php b/lib/unstable/Federation/ISignedCloudFederationProvider.php
new file mode 100644
index 00000000000..1ec50f606ae
--- /dev/null
+++ b/lib/unstable/Federation/ISignedCloudFederationProvider.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace NCU\Federation;
+
+use OCP\Federation\ICloudFederationProvider;
+
+/**
+ * Interface ICloudFederationProvider
+ *
+ * Enable apps to create their own cloud federation provider
+ *
+ * @experimental 31.0.0
+ */
+interface ISignedCloudFederationProvider extends ICloudFederationProvider {
+
+ /**
+ * returns federationId in direct relation (as recipient or as author) of a sharedSecret
+ * the federationId must be the one at the remote end
+ *
+ * @param string $sharedSecret
+ * @param array $payload
+ *
+ * @experimental 31.0.0
+ * @return string
+ */
+ public function getFederationIdFromSharedSecret(string $sharedSecret, array $payload): string;
+}
diff --git a/lib/unstable/Security/Signature/Model/Signatory.php b/lib/unstable/Security/Signature/Model/Signatory.php
index d42be9c4544..c3a275082ae 100644
--- a/lib/unstable/Security/Signature/Model/Signatory.php
+++ b/lib/unstable/Security/Signature/Model/Signatory.php
@@ -42,7 +42,7 @@ use OCP\AppFramework\Db\Entity;
* @method void setAccount(string $account)
* @method string getAccount()
* @method void setMetadata(array $metadata)
- * @method array getMetadata()
+ * @method ?array getMetadata()
* @method void setCreation(int $creation)
* @method int getCreation()
* @method void setLastUpdated(int $creation)
@@ -59,7 +59,7 @@ class Signatory extends Entity implements JsonSerializable {
protected string $account = '';
protected int $type = 9;
protected int $status = 1;
- protected array $metadata = [];
+ protected ?array $metadata = null;
protected int $creation = 0;
protected int $lastUpdated = 0;