summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/de.js3
-rw-r--r--lib/l10n/de.json3
-rw-r--r--lib/l10n/de_DE.js3
-rw-r--r--lib/l10n/de_DE.json3
-rw-r--r--lib/l10n/es.js1
-rw-r--r--lib/l10n/es.json1
-rw-r--r--lib/l10n/fi_FI.js2
-rw-r--r--lib/l10n/fi_FI.json2
-rw-r--r--lib/l10n/gl.js1
-rw-r--r--lib/l10n/gl.json1
-rw-r--r--lib/l10n/it.js1
-rw-r--r--lib/l10n/it.json1
-rw-r--r--lib/l10n/nl.js1
-rw-r--r--lib/l10n/nl.json1
-rw-r--r--lib/l10n/pt_BR.js1
-rw-r--r--lib/l10n/pt_BR.json1
-rw-r--r--lib/private/app/codecheckvisitor.php9
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php1
-rw-r--r--lib/private/connector/sabre/objecttree.php2
-rw-r--r--lib/private/console/application.php2
-rw-r--r--lib/private/encryption/manager.php2
-rw-r--r--lib/private/encryption/util.php2
-rw-r--r--lib/private/files/node/root.php3
-rw-r--r--lib/private/files/objectstore/objectstorestorage.php3
-rw-r--r--lib/private/files/storage/localtempfiletrait.php9
-rw-r--r--lib/private/files/storage/wrapper/encryption.php8
-rw-r--r--lib/private/files/stream/encryption.php18
-rw-r--r--lib/private/group/database.php33
-rw-r--r--lib/private/log.php75
-rw-r--r--lib/private/log/errorlog.php5
-rw-r--r--lib/private/log/owncloud.php68
-rw-r--r--lib/private/log/syslog.php7
-rw-r--r--lib/private/search/result/file.php1
-rw-r--r--lib/private/user/database.php25
-rw-r--r--lib/private/util.php6
-rw-r--r--lib/public/appframework/http/contentsecuritypolicy.php112
-rw-r--r--lib/public/lock/ilockingprovider.php2
37 files changed, 309 insertions, 110 deletions
diff --git a/lib/l10n/de.js b/lib/l10n/de.js
index f501a65da8a..d9a5024318f 100644
--- a/lib/l10n/de.js
+++ b/lib/l10n/de.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort",
"File name contains at least one invalid character" : "Der Dateiname enthält mindestens ein ungültiges Zeichen",
"File name is too long" : "Dateiname ist zu lang",
+ "Can't read file" : "Datei kann nicht gelesen werden",
"App directory already exists" : "Das Applikationsverzeichnis existiert bereits",
"Can't create app folder. Please fix permissions. %s" : "Es kann kein Applikationsordner erstellt werden. Bitte passe die Berechtigungen an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -131,7 +132,7 @@ OC.L10N.register(
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
"PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
- "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist auf \"%s\", anstatt dem erwarteteten Wert \"0\", eingestellt",
+ "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Setze in Deiner php.ini <code>mbstring.func_overload</code> auf <code>-0</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
diff --git a/lib/l10n/de.json b/lib/l10n/de.json
index 2d384d00a48..6228b9e27e7 100644
--- a/lib/l10n/de.json
+++ b/lib/l10n/de.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort",
"File name contains at least one invalid character" : "Der Dateiname enthält mindestens ein ungültiges Zeichen",
"File name is too long" : "Dateiname ist zu lang",
+ "Can't read file" : "Datei kann nicht gelesen werden",
"App directory already exists" : "Das Applikationsverzeichnis existiert bereits",
"Can't create app folder. Please fix permissions. %s" : "Es kann kein Applikationsordner erstellt werden. Bitte passe die Berechtigungen an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -129,7 +130,7 @@
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
"PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
- "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist auf \"%s\", anstatt dem erwarteteten Wert \"0\", eingestellt",
+ "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Setze in Deiner php.ini <code>mbstring.func_overload</code> auf <code>-0</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js
index a813a654e35..fdad346751a 100644
--- a/lib/l10n/de_DE.js
+++ b/lib/l10n/de_DE.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort",
"File name contains at least one invalid character" : "Der Dateiname enthält mindestens ein ungültiges Zeichen",
"File name is too long" : "Dateiname ist zu lang",
+ "Can't read file" : "Datei kann nicht gelesen werden",
"App directory already exists" : "Der Ordner für die App ist bereits vorhanden.",
"Can't create app folder. Please fix permissions. %s" : "Der Ordner für die App konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -131,7 +132,7 @@ OC.L10N.register(
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
"PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
- "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist auf \"%s\", anstatt dem erwarteteten Wert \"0\", eingestellt",
+ "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Setzen Sie in Ihrer php.ini <code>mbstring.func_overload</code> auf <code>-0</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json
index c92e972bdbb..6b0ebc39cae 100644
--- a/lib/l10n/de_DE.json
+++ b/lib/l10n/de_DE.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort",
"File name contains at least one invalid character" : "Der Dateiname enthält mindestens ein ungültiges Zeichen",
"File name is too long" : "Dateiname ist zu lang",
+ "Can't read file" : "Datei kann nicht gelesen werden",
"App directory already exists" : "Der Ordner für die App ist bereits vorhanden.",
"Can't create app folder. Please fix permissions. %s" : "Der Ordner für die App konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -129,7 +130,7 @@
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
"PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
"Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
- "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist auf \"%s\", anstatt dem erwarteteten Wert \"0\", eingestellt",
+ "mbstring.func_overload is set to \"%s\" instead to the expected value \"0\"" : "mbstring.func_overload ist nicht auf den erwarteten Wert „0“, sondern stattdessen auf „%s“ gesetzt",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Setzen Sie in Ihrer php.ini <code>mbstring.func_overload</code> auf <code>-0</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index c9259e77695..1e36bf5f818 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "El nombre de archivo es una palabra reservada",
"File name contains at least one invalid character" : "El nombre del archivo contiene al menos un carácter inválido",
"File name is too long" : "El nombre del archivo es demasiado largo",
+ "Can't read file" : "No se puede leer archivo",
"App directory already exists" : "El directorio de la aplicación ya existe",
"Can't create app folder. Please fix permissions. %s" : "No se puede crear la carpeta de la aplicación. Corrija los permisos. %s",
"No source specified when installing app" : "No se ha especificado origen cuando se ha instalado la aplicación",
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index 7d0978827e1..f50b0034c8a 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "El nombre de archivo es una palabra reservada",
"File name contains at least one invalid character" : "El nombre del archivo contiene al menos un carácter inválido",
"File name is too long" : "El nombre del archivo es demasiado largo",
+ "Can't read file" : "No se puede leer archivo",
"App directory already exists" : "El directorio de la aplicación ya existe",
"Can't create app folder. Please fix permissions. %s" : "No se puede crear la carpeta de la aplicación. Corrija los permisos. %s",
"No source specified when installing app" : "No se ha especificado origen cuando se ha instalado la aplicación",
diff --git a/lib/l10n/fi_FI.js b/lib/l10n/fi_FI.js
index 54161ba47e6..74934d3fad9 100644
--- a/lib/l10n/fi_FI.js
+++ b/lib/l10n/fi_FI.js
@@ -41,6 +41,7 @@ OC.L10N.register(
"Dot files are not allowed" : "Pistetiedostot eivät ole sallittuja",
"File name contains at least one invalid character" : "Tiedoston nimi sisältää ainakin yhden virheellisen merkin",
"File name is too long" : "Tiedoston nimi on liian pitkä",
+ "Can't read file" : "Tiedostoa ei voi lukea",
"App directory already exists" : "Sovelluskansio on jo olemassa",
"Can't create app folder. Please fix permissions. %s" : "Sovelluskansion luominen ei onnistu. Korjaa käyttöoikeudet. %s",
"No source specified when installing app" : "Lähdettä ei määritelty sovellusta asennettaessa",
@@ -87,6 +88,7 @@ OC.L10N.register(
"Sharing %s failed, because %s is not a member of the group %s" : "Kohteen %s jakaminen epäonnistui, koska käyttäjä %s ei ole ryhmän %s jäsen",
"You need to provide a password to create a public link, only protected links are allowed" : "Anna salasana luodaksesi julkisen linkin. Vain suojatut linkit ovat sallittuja",
"Sharing %s failed, because sharing with links is not allowed" : "Kohteen %s jakaminen epäonnistui, koska jakaminen linkkejä käyttäen ei ole sallittu",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Kohteen %s jakaminen epäonnistui, kohdetta %s ei löytynyt. Kenties palvelin ei ole juuri nyt tavoitettavissa.",
"Setting permissions for %s failed, because the item was not found" : "Kohteen %s oikeuksien asettaminen epäonnistui, koska kohdetta ei löytynyt",
"Cannot set expiration date. Expiration date is in the past" : "Vanhentumispäivää ei voi asettaa. Vanhentumispäivä on jo mennyt",
"Cannot clear expiration date. Shares are required to have an expiration date." : "Vanhenemispäivän tyhjentäminen ei onnistu. Jaoille on määritelty pakolliseksi vanhenemispäivä.",
diff --git a/lib/l10n/fi_FI.json b/lib/l10n/fi_FI.json
index 35bf7f8257d..93bc893e673 100644
--- a/lib/l10n/fi_FI.json
+++ b/lib/l10n/fi_FI.json
@@ -39,6 +39,7 @@
"Dot files are not allowed" : "Pistetiedostot eivät ole sallittuja",
"File name contains at least one invalid character" : "Tiedoston nimi sisältää ainakin yhden virheellisen merkin",
"File name is too long" : "Tiedoston nimi on liian pitkä",
+ "Can't read file" : "Tiedostoa ei voi lukea",
"App directory already exists" : "Sovelluskansio on jo olemassa",
"Can't create app folder. Please fix permissions. %s" : "Sovelluskansion luominen ei onnistu. Korjaa käyttöoikeudet. %s",
"No source specified when installing app" : "Lähdettä ei määritelty sovellusta asennettaessa",
@@ -85,6 +86,7 @@
"Sharing %s failed, because %s is not a member of the group %s" : "Kohteen %s jakaminen epäonnistui, koska käyttäjä %s ei ole ryhmän %s jäsen",
"You need to provide a password to create a public link, only protected links are allowed" : "Anna salasana luodaksesi julkisen linkin. Vain suojatut linkit ovat sallittuja",
"Sharing %s failed, because sharing with links is not allowed" : "Kohteen %s jakaminen epäonnistui, koska jakaminen linkkejä käyttäen ei ole sallittu",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Kohteen %s jakaminen epäonnistui, kohdetta %s ei löytynyt. Kenties palvelin ei ole juuri nyt tavoitettavissa.",
"Setting permissions for %s failed, because the item was not found" : "Kohteen %s oikeuksien asettaminen epäonnistui, koska kohdetta ei löytynyt",
"Cannot set expiration date. Expiration date is in the past" : "Vanhentumispäivää ei voi asettaa. Vanhentumispäivä on jo mennyt",
"Cannot clear expiration date. Shares are required to have an expiration date." : "Vanhenemispäivän tyhjentäminen ei onnistu. Jaoille on määritelty pakolliseksi vanhenemispäivä.",
diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js
index 10f10ec123d..5433c2e65f4 100644
--- a/lib/l10n/gl.js
+++ b/lib/l10n/gl.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "O nome de ficheiro é unha palabra reservada",
"File name contains at least one invalid character" : "O nome de ficheiro contén algún carácter incorrecto",
"File name is too long" : "O nome de ficheiro é longo de máis",
+ "Can't read file" : "Non é posíbel ler o ficheiro",
"App directory already exists" : "Xa existe o directorio da aplicación",
"Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s",
"No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar a aplicación",
diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json
index d31cf2c4284..b2649d5e3fb 100644
--- a/lib/l10n/gl.json
+++ b/lib/l10n/gl.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "O nome de ficheiro é unha palabra reservada",
"File name contains at least one invalid character" : "O nome de ficheiro contén algún carácter incorrecto",
"File name is too long" : "O nome de ficheiro é longo de máis",
+ "Can't read file" : "Non é posíbel ler o ficheiro",
"App directory already exists" : "Xa existe o directorio da aplicación",
"Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s",
"No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar a aplicación",
diff --git a/lib/l10n/it.js b/lib/l10n/it.js
index b2ecb0c1b25..9b93478772b 100644
--- a/lib/l10n/it.js
+++ b/lib/l10n/it.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "Il nome del file è una parola riservata",
"File name contains at least one invalid character" : "Il nome del file contiene almeno un carattere non valido",
"File name is too long" : "Il nome del file è troppo lungo",
+ "Can't read file" : "Impossibile leggere il file",
"App directory already exists" : "La cartella dell'applicazione esiste già",
"Can't create app folder. Please fix permissions. %s" : "Impossibile creare la cartella dell'applicazione. Correggi i permessi. %s",
"No source specified when installing app" : "Nessuna fonte specificata durante l'installazione dell'applicazione",
diff --git a/lib/l10n/it.json b/lib/l10n/it.json
index bed8ecffbb9..121a0b9cd66 100644
--- a/lib/l10n/it.json
+++ b/lib/l10n/it.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "Il nome del file è una parola riservata",
"File name contains at least one invalid character" : "Il nome del file contiene almeno un carattere non valido",
"File name is too long" : "Il nome del file è troppo lungo",
+ "Can't read file" : "Impossibile leggere il file",
"App directory already exists" : "La cartella dell'applicazione esiste già",
"Can't create app folder. Please fix permissions. %s" : "Impossibile creare la cartella dell'applicazione. Correggi i permessi. %s",
"No source specified when installing app" : "Nessuna fonte specificata durante l'installazione dell'applicazione",
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index 79dbfe309e0..72e1918244c 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -44,6 +44,7 @@ OC.L10N.register(
"File name is a reserved word" : "Bestandsnaam is een gereserveerd woord",
"File name contains at least one invalid character" : "De bestandsnaam bevat ten minste één verboden teken",
"File name is too long" : "De bestandsnaam is te lang",
+ "Can't read file" : "Kan bestand niet lezen",
"App directory already exists" : "App directory bestaat al",
"Can't create app folder. Please fix permissions. %s" : "Kan de app map niet aanmaken, Herstel de permissies. %s",
"No source specified when installing app" : "Geen bron opgegeven bij installatie van de app",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index 723bf8adce0..fc9f30bc0e4 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -42,6 +42,7 @@
"File name is a reserved word" : "Bestandsnaam is een gereserveerd woord",
"File name contains at least one invalid character" : "De bestandsnaam bevat ten minste één verboden teken",
"File name is too long" : "De bestandsnaam is te lang",
+ "Can't read file" : "Kan bestand niet lezen",
"App directory already exists" : "App directory bestaat al",
"Can't create app folder. Please fix permissions. %s" : "Kan de app map niet aanmaken, Herstel de permissies. %s",
"No source specified when installing app" : "Geen bron opgegeven bij installatie van de app",
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index 49c21be6f42..fc5aaba2844 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -41,6 +41,7 @@ OC.L10N.register(
"File name is a reserved word" : "O nome do arquivo é uma palavra reservada",
"File name contains at least one invalid character" : "O nome do arquivo contém pelo menos um caractere inválido",
"File name is too long" : "O nome do arquivo é muito longo",
+ "Can't read file" : "Não é possível ler arquivo",
"App directory already exists" : "Diretório App já existe",
"Can't create app folder. Please fix permissions. %s" : "Não é possível criar pasta app. Corrija as permissões. %s",
"No source specified when installing app" : "Nenhuma fonte foi especificada enquanto instalava o aplicativo",
diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json
index 7227378b0cf..7819a4c339f 100644
--- a/lib/l10n/pt_BR.json
+++ b/lib/l10n/pt_BR.json
@@ -39,6 +39,7 @@
"File name is a reserved word" : "O nome do arquivo é uma palavra reservada",
"File name contains at least one invalid character" : "O nome do arquivo contém pelo menos um caractere inválido",
"File name is too long" : "O nome do arquivo é muito longo",
+ "Can't read file" : "Não é possível ler arquivo",
"App directory already exists" : "Diretório App já existe",
"Can't create app folder. Please fix permissions. %s" : "Não é possível criar pasta app. Corrija as permissões. %s",
"No source specified when installing app" : "Nenhuma fonte foi especificada enquanto instalava o aplicativo",
diff --git a/lib/private/app/codecheckvisitor.php b/lib/private/app/codecheckvisitor.php
index 03b238096e7..e983bd8630b 100644
--- a/lib/private/app/codecheckvisitor.php
+++ b/lib/private/app/codecheckvisitor.php
@@ -22,18 +22,9 @@
namespace OC\App;
-use OC\Hooks\BasicEmitter;
-use PhpParser\Lexer;
use PhpParser\Node;
use PhpParser\Node\Name;
-use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
-use PhpParser\Parser;
-use RecursiveCallbackFilterIterator;
-use RecursiveDirectoryIterator;
-use RecursiveIteratorIterator;
-use RegexIterator;
-use SplFileInfo;
class CodeCheckVisitor extends NodeVisitorAbstract {
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 5072a65c02f..8501fc69ad4 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -42,7 +42,6 @@ use OC\AppFramework\Utility\SimpleContainer;
use OC\AppFramework\Utility\TimeFactory;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\IApi;
-use OCP\AppFramework\QueryException;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\Middleware;
use OCP\IServerContainer;
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index 999750fd785..8def14e8e9c 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -27,9 +27,7 @@ namespace OC\Connector\Sabre;
use OC\Connector\Sabre\Exception\InvalidPath;
use OC\Files\FileInfo;
-use OC\Files\Filesystem;
use OC\Files\Mount\MoveableMount;
-use OC_Connector_Sabre_Exception_InvalidPath;
use OCP\Files\StorageInvalidException;
use OCP\Files\StorageNotAvailableException;
diff --git a/lib/private/console/application.php b/lib/private/console/application.php
index 6d24665e012..f2aacbfc0e6 100644
--- a/lib/private/console/application.php
+++ b/lib/private/console/application.php
@@ -35,7 +35,7 @@ class Application {
if ($this->config->getSystemValue('installed', false)) {
if (!\OCP\Util::needUpgrade()) {
OC_App::loadApps();
- foreach (OC_App::getAllApps() as $app) {
+ foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
$file = OC_App::getAppPath($app) . '/appinfo/register_command.php';
if (file_exists($file)) {
require $file;
diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php
index 1a42646daf6..45f45045643 100644
--- a/lib/private/encryption/manager.php
+++ b/lib/private/encryption/manager.php
@@ -79,7 +79,7 @@ class Manager implements IManager {
$oldEncryption = $this->config->getAppValue('files_encryption', 'installed_version');
if (!empty($oldEncryption)) {
$warning = 'Installation is in transit between the old Encryption (ownCloud <= 8.0)
- and the new encryption. Please enable the "ownCloud Default Encryption Module"
+ and the new encryption. Please enable the "Default encryption module"
and run \'occ encryption:migrate\'';
$this->logger->warning($warning);
return false;
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index 45d4dd90d9f..b77672d2f6b 100644
--- a/lib/private/encryption/util.php
+++ b/lib/private/encryption/util.php
@@ -114,7 +114,7 @@ class Util {
// ownCloud <= 8.0 with the old encryption
$id = \OCA\Encryption\Crypto\Encryption::ID;
} else {
- throw new ModuleDoesNotExistsException('ownCloud default encryption module missing');
+ throw new ModuleDoesNotExistsException('Default encryption module missing');
}
}
diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php
index d0cac46e593..e47f98b0f27 100644
--- a/lib/private/files/node/root.php
+++ b/lib/private/files/node/root.php
@@ -25,14 +25,11 @@
namespace OC\Files\Node;
-use OC\Files\Cache\Cache;
use OC\Files\Mount\Manager;
use OC\Files\Mount\MountPoint;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
-use OC\Hooks\Emitter;
use OC\Hooks\PublicEmitter;
-
use OCP\Files\IRootFolder;
/**
diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 3c92665da3f..24398649727 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -24,7 +24,6 @@
namespace OC\Files\ObjectStore;
-use OC\Files\Filesystem;
use OCP\Files\ObjectStore\IObjectStore;
class ObjectStoreStorage extends \OC\Files\Storage\Common {
@@ -220,7 +219,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
\OC\Files\Stream\Dir::register('objectstore' . $path . '/', $files);
return opendir('fakedir://objectstore' . $path . '/');
- } catch (Exception $e) {
+ } catch (\Exception $e) {
\OCP\Util::writeLog('objectstore', $e->getMessage(), \OCP\Util::ERROR);
return false;
}
diff --git a/lib/private/files/storage/localtempfiletrait.php b/lib/private/files/storage/localtempfiletrait.php
index 444e4e2e89e..7dc9b777ea1 100644
--- a/lib/private/files/storage/localtempfiletrait.php
+++ b/lib/private/files/storage/localtempfiletrait.php
@@ -21,15 +21,6 @@
namespace OC\Files\Storage;
-use OC\Files\Cache\Cache;
-use OC\Files\Cache\Scanner;
-use OC\Files\Filesystem;
-use OC\Files\Cache\Watcher;
-use OCP\Files\FileNameTooLongException;
-use OCP\Files\InvalidCharacterInPathException;
-use OCP\Files\InvalidPathException;
-use OCP\Files\ReservedWordException;
-
/**
* Storage backend class for providing common filesystem operation methods
* which are not storage-backend specific.
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 1683ff1350f..5d146b2dd1d 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -245,8 +245,12 @@ class Encryption extends Wrapper {
*/
public function rmdir($path) {
$result = $this->storage->rmdir($path);
- if ($result && $this->encryptionManager->isEnabled()) {
- $this->keyStorage->deleteAllFileKeys($this->getFullPath($path));
+ $fullPath = $this->getFullPath($path);
+ if ($result &&
+ $this->util->isExcluded($fullPath) === false &&
+ $this->encryptionManager->isEnabled()
+ ) {
+ $this->keyStorage->deleteAllFileKeys($fullPath);
}
return $result;
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index 0262405f367..f2f5b9c9af7 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -341,8 +341,8 @@ class Encryption extends Wrapper {
} else {
$data = '';
}
+ $this->unencryptedSize = max($this->unencryptedSize, $this->position);
}
- $this->unencryptedSize = max($this->unencryptedSize, $this->position);
return $length;
}
@@ -356,24 +356,22 @@ class Encryption extends Wrapper {
switch ($whence) {
case SEEK_SET:
- if ($offset < $this->unencryptedSize && $offset >= 0) {
- $newPosition = $offset;
- }
+ $newPosition = $offset;
break;
case SEEK_CUR:
- if ($offset >= 0) {
- $newPosition = $offset + $this->position;
- }
+ $newPosition = $this->position + $offset;
break;
case SEEK_END:
- if ($this->unencryptedSize + $offset >= 0) {
- $newPosition = $this->unencryptedSize + $offset;
- }
+ $newPosition = $this->unencryptedSize + $offset;
break;
default:
return $return;
}
+ if ($newPosition > $this->unencryptedSize || $newPosition < 0) {
+ return $return;
+ }
+
$newFilePosition = floor($newPosition / $this->unencryptedBlockSize)
* $this->util->getBlockSize() + $this->headerSize;
diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index a58d66010d5..ad6174808bb 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -180,8 +180,15 @@ class OC_Group_Database extends OC_Group_Backend {
* Returns a list with all groups
*/
public function getGroups($search = '', $limit = null, $offset = null) {
- $stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE LOWER(`gid`) LIKE LOWER(?) ORDER BY `gid` ASC', $limit, $offset);
- $result = $stmt->execute(array('%' . $search . '%'));
+ $parameters = [];
+ $searchLike = '';
+ if ($search !== '') {
+ $parameters[] = '%' . $search . '%';
+ $searchLike = ' WHERE LOWER(`gid`) LIKE LOWER(?)';
+ }
+
+ $stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups`' . $searchLike . ' ORDER BY `gid` ASC', $limit, $offset);
+ $result = $stmt->execute($parameters);
$groups = array();
while ($row = $result->fetchRow()) {
$groups[] = $row['gid'];
@@ -212,10 +219,17 @@ class OC_Group_Database extends OC_Group_Backend {
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = null, $offset = null) {
- $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ? ORDER BY `uid` ASC',
+ $parameters = [$gid];
+ $searchLike = '';
+ if ($search !== '') {
+ $parameters[] = '%' . $search . '%';
+ $searchLike = ' AND `uid` LIKE ?';
+ }
+
+ $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $searchLike . ' ORDER BY `uid` ASC',
$limit,
$offset);
- $result = $stmt->execute(array($gid, '%'.$search.'%'));
+ $result = $stmt->execute($parameters);
$users = array();
while ($row = $result->fetchRow()) {
$users[] = $row['uid'];
@@ -231,8 +245,15 @@ class OC_Group_Database extends OC_Group_Backend {
* @throws \OC\DatabaseException
*/
public function countUsersInGroup($gid, $search = '') {
- $stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?');
- $result = $stmt->execute(array($gid, '%' . $search . '%'));
+ $parameters = [$gid];
+ $searchLike = '';
+ if ($search !== '') {
+ $parameters[] = '%' . $search . '%';
+ $searchLike = ' AND `uid` LIKE ?';
+ }
+
+ $stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $searchLike);
+ $result = $stmt->execute($parameters);
$count = $result->fetchOne();
if($count !== false) {
$count = intval($count);
diff --git a/lib/private/log.php b/lib/private/log.php
index 56f36787e09..840713b2eda 100644
--- a/lib/private/log.php
+++ b/lib/private/log.php
@@ -28,6 +28,7 @@
namespace OC;
use \OCP\ILogger;
+use OCP\Security\StringUtils;
/**
* logging utilities
@@ -41,15 +42,29 @@ use \OCP\ILogger;
class Log implements ILogger {
+ /** @var string */
private $logger;
+ /** @var SystemConfig */
+ private $config;
+
+ /** @var boolean|null cache the result of the log condition check for the request */
+ private $logConditionSatisfied = null;
/**
* @param string $logger The logger that should be used
+ * @param SystemConfig $config the system config object
*/
- public function __construct($logger=null) {
+ public function __construct($logger=null, SystemConfig $config=null) {
+ // FIXME: Add this for backwards compatibility, should be fixed at some point probably
+ if($config === null) {
+ $config = \OC::$server->getSystemConfig();
+ }
+
+ $this->config = $config;
+
// FIXME: Add this for backwards compatibility, should be fixed at some point probably
if($logger === null) {
- $this->logger = 'OC_Log_'.ucfirst(\OC_Config::getValue('log_type', 'owncloud'));
+ $this->logger = 'OC_Log_'.ucfirst($this->config->getValue('log_type', 'owncloud'));
call_user_func(array($this->logger, 'init'));
} else {
$this->logger = $logger;
@@ -158,8 +173,22 @@ class Log implements ILogger {
* @param array $context
*/
public function log($level, $message, array $context = array()) {
+ $minLevel = min($this->config->getValue('loglevel', \OC_Log::WARN), \OC_Log::ERROR);
+ $logCondition = $this->config->getValue('log.condition', []);
+
if (isset($context['app'])) {
$app = $context['app'];
+
+ /**
+ * check log condition based on the context of each log message
+ * once this is met -> change the required log level to debug
+ */
+ if(!empty($logCondition)
+ && isset($logCondition['apps'])
+ && in_array($app, $logCondition['apps'], true)) {
+ $minLevel = \OC_Log::DEBUG;
+ }
+
} else {
$app = 'no app in context';
}
@@ -172,7 +201,45 @@ class Log implements ILogger {
// interpolate replacement values into the message and return
$message = strtr($message, $replace);
- $logger = $this->logger;
- call_user_func(array($logger, 'write'), $app, $message, $level);
+ /**
+ * check for a special log condition - this enables an increased log on
+ * a per request/user base
+ */
+ if($this->logConditionSatisfied === null) {
+ // default to false to just process this once per request
+ $this->logConditionSatisfied = false;
+ if(!empty($logCondition)) {
+
+ // check for secret token in the request
+ if(isset($logCondition['shared_secret'])) {
+ $request = \OC::$server->getRequest();
+
+ // if token is found in the request change set the log condition to satisfied
+ if($request && StringUtils::equals($request->getParam('log_secret'), $logCondition['shared_secret'])) {
+ $this->logConditionSatisfied = true;
+ }
+ }
+
+ // check for user
+ if(isset($logCondition['users'])) {
+ $user = \OC::$server->getUserSession()->getUser();
+
+ // if the user matches set the log condition to satisfied
+ if($user !== null && in_array($user->getUID(), $logCondition['users'], true)) {
+ $this->logConditionSatisfied = true;
+ }
+ }
+ }
+ }
+
+ // if log condition is satisfied change the required log level to DEBUG
+ if($this->logConditionSatisfied) {
+ $minLevel = \OC_Log::DEBUG;
+ }
+
+ if ($level >= $minLevel) {
+ $logger = $this->logger;
+ call_user_func(array($logger, 'write'), $app, $message, $level);
+ }
}
}
diff --git a/lib/private/log/errorlog.php b/lib/private/log/errorlog.php
index 007ab307722..ad3605136d0 100644
--- a/lib/private/log/errorlog.php
+++ b/lib/private/log/errorlog.php
@@ -39,10 +39,7 @@ class OC_Log_Errorlog {
* @param int $level
*/
public static function write($app, $message, $level) {
- $minLevel = min(OC_Config::getValue("loglevel", OC_Log::WARN), OC_Log::ERROR);
- if ($level >= $minLevel) {
- error_log('[owncloud]['.$app.'] '.$message);
- }
+ error_log('[owncloud]['.$app.']['.$level.'] '.$message);
}
}
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php
index 049b8dbdfa3..0125164394d 100644
--- a/lib/private/log/owncloud.php
+++ b/lib/private/log/owncloud.php
@@ -69,40 +69,40 @@ class OC_Log_Owncloud {
* @param int $level
*/
public static function write($app, $message, $level) {
- $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR);
- if($level>=$minLevel) {
- // default to ISO8601
- $format = OC_Config::getValue('logdateformat', 'c');
- $logtimezone=OC_Config::getValue( "logtimezone", 'UTC' );
- try {
- $timezone = new DateTimeZone($logtimezone);
- } catch (Exception $e) {
- $timezone = new DateTimeZone('UTC');
- }
- $time = new DateTime(null, $timezone);
- $request = \OC::$server->getRequest();
- $reqId = $request->getId();
- $remoteAddr = $request->getRemoteAddress();
- // remove username/passwords from URLs before writing the to the log file
- $time = $time->format($format);
- if($minLevel == OC_Log::DEBUG) {
- $url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '--';
- $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '--';
- $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time', 'method', 'url');
- }
- else {
- $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time');
- }
- $entry = json_encode($entry);
- $handle = @fopen(self::$logFile, 'a');
- @chmod(self::$logFile, 0640);
- if ($handle) {
- fwrite($handle, $entry."\n");
- fclose($handle);
- } else {
- // Fall back to error_log
- error_log($entry);
- }
+ $config = \OC::$server->getSystemConfig();
+
+ // default to ISO8601
+ $format = $config->getValue('logdateformat', 'c');
+ $logtimezone = $config->getValue( "logtimezone", 'UTC' );
+ try {
+ $timezone = new DateTimeZone($logtimezone);
+ } catch (Exception $e) {
+ $timezone = new DateTimeZone('UTC');
+ }
+ $time = new DateTime(null, $timezone);
+ $request = \OC::$server->getRequest();
+ $reqId = $request->getId();
+ $remoteAddr = $request->getRemoteAddress();
+ // remove username/passwords from URLs before writing the to the log file
+ $time = $time->format($format);
+ $minLevel=min($config->getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR);
+ if($minLevel == OC_Log::DEBUG) {
+ $url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '--';
+ $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '--';
+ $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time', 'method', 'url');
+ }
+ else {
+ $entry = compact('reqId', 'remoteAddr', 'app', 'message', 'level', 'time');
+ }
+ $entry = json_encode($entry);
+ $handle = @fopen(self::$logFile, 'a');
+ @chmod(self::$logFile, 0640);
+ if ($handle) {
+ fwrite($handle, $entry."\n");
+ fclose($handle);
+ } else {
+ // Fall back to error_log
+ error_log($entry);
}
}
diff --git a/lib/private/log/syslog.php b/lib/private/log/syslog.php
index 1763e6de6d1..8595b707d59 100644
--- a/lib/private/log/syslog.php
+++ b/lib/private/log/syslog.php
@@ -47,10 +47,7 @@ class OC_Log_Syslog {
* @param int $level
*/
public static function write($app, $message, $level) {
- $minLevel = min(OC_Config::getValue("loglevel", OC_Log::WARN), OC_Log::ERROR);
- if ($level >= $minLevel) {
- $syslog_level = self::$levels[$level];
- syslog($syslog_level, '{'.$app.'} '.$message);
- }
+ $syslog_level = self::$levels[$level];
+ syslog($syslog_level, '{'.$app.'} '.$message);
}
}
diff --git a/lib/private/search/result/file.php b/lib/private/search/result/file.php
index 50b74e1ced2..4329f504a7d 100644
--- a/lib/private/search/result/file.php
+++ b/lib/private/search/result/file.php
@@ -23,7 +23,6 @@
*/
namespace OC\Search\Result;
-use OC\Files\Filesystem;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index f2fa0cc39ce..d080bff04b5 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -148,11 +148,19 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
* Get a list of all display names and user ids.
*/
public function getDisplayNames($search = '', $limit = null, $offset = null) {
+ $parameters = [];
+ $searchLike = '';
+ if ($search !== '') {
+ $parameters[] = '%' . $search . '%';
+ $parameters[] = '%' . $search . '%';
+ $searchLike = ' WHERE LOWER(`displayname`) LIKE LOWER(?) OR '
+ . 'LOWER(`uid`) LIKE LOWER(?)';
+ }
+
$displayNames = array();
$query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`'
- . ' WHERE LOWER(`displayname`) LIKE LOWER(?) OR '
- . 'LOWER(`uid`) LIKE LOWER(?) ORDER BY `uid` ASC', $limit, $offset);
- $result = $query->execute(array('%' . $search . '%', '%' . $search . '%'));
+ . $searchLike .' ORDER BY `uid` ASC', $limit, $offset);
+ $result = $query->execute($parameters);
while ($row = $result->fetchRow()) {
$displayNames[$row['uid']] = $row['displayname'];
}
@@ -220,8 +228,15 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
* Get a list of all users.
*/
public function getUsers($search = '', $limit = null, $offset = null) {
- $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?) ORDER BY `uid` ASC', $limit, $offset);
- $result = $query->execute(array('%' . $search . '%'));
+ $parameters = [];
+ $searchLike = '';
+ if ($search !== '') {
+ $parameters[] = '%' . $search . '%';
+ $searchLike = ' WHERE LOWER(`uid`) LIKE LOWER(?)';
+ }
+
+ $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users`' . $searchLike . ' ORDER BY `uid` ASC', $limit, $offset);
+ $result = $query->execute($parameters);
$users = array();
while ($row = $result->fetchRow()) {
$users[] = $row['uid'];
diff --git a/lib/private/util.php b/lib/private/util.php
index 83c92326f8c..4470006b90c 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -746,14 +746,14 @@ class OC_Util {
if($iniWrapper->getBool('mbstring.func_overload') !== null &&
$iniWrapper->getBool('mbstring.func_overload') === true) {
$errors[] = array(
- 'error' => $l->t('mbstring.func_overload is set to "%s" instead to the expected value "0"', [$iniWrapper->getString('mbstring.func_overload')]),
+ 'error' => $l->t('mbstring.func_overload is set to "%s" instead of the expected value "0"', [$iniWrapper->getString('mbstring.func_overload')]),
'hint' => $l->t('To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini')
);
}
if (!self::isAnnotationsWorking()) {
$errors[] = array(
- 'error' => $l->t('PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.'),
+ 'error' => $l->t('PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.'),
'hint' => $l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')
);
}
@@ -1332,7 +1332,7 @@ class OC_Util {
if (ini_get('xcache.admin.enable_auth')) {
OC_Log::write('core', 'XCache opcode cache will not be cleared because "xcache.admin.enable_auth" is enabled.', \OC_Log::WARN);
} else {
- xcache_clear_cache(XC_TYPE_PHP, 0);
+ @xcache_clear_cache(XC_TYPE_PHP, 0);
}
}
// Opcache (PHP >= 5.5)
diff --git a/lib/public/appframework/http/contentsecuritypolicy.php b/lib/public/appframework/http/contentsecuritypolicy.php
index be4b6e60f97..9c7218dc8ba 100644
--- a/lib/public/appframework/http/contentsecuritypolicy.php
+++ b/lib/public/appframework/http/contentsecuritypolicy.php
@@ -101,7 +101,7 @@ class ContentSecurityPolicy {
* @since 8.1.0
*/
public function allowEvalScript($state = true) {
- $this->evalScriptAllowed= $state;
+ $this->evalScriptAllowed = $state;
return $this;
}
@@ -118,6 +118,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed script domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowScriptDomain($domain) {
+ $this->allowedScriptDomains = array_diff($this->allowedScriptDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Whether inline CSS snippets are allowed or forbidden
* @param bool $state
* @return $this
@@ -141,6 +153,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed style domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowStyleDomain($domain) {
+ $this->allowedStyleDomains = array_diff($this->allowedStyleDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Allows using fonts from a specific domain. Use * to allow
* fonts from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
@@ -153,6 +177,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed font domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowFontDomain($domain) {
+ $this->allowedFontDomains = array_diff($this->allowedFontDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Allows embedding images from a specific domain. Use * to allow
* images from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
@@ -165,6 +201,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed image domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowImageDomain($domain) {
+ $this->allowedImageDomains = array_diff($this->allowedImageDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* To which remote domains the JS connect to.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
@@ -176,7 +224,19 @@ class ContentSecurityPolicy {
}
/**
- * From whoch domains media elements can be embedded.
+ * Remove the specified allowed connect domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowConnectDomain($domain) {
+ $this->allowedConnectDomains = array_diff($this->allowedConnectDomains, [$domain]);
+ return $this;
+ }
+
+ /**
+ * From which domains media elements can be embedded.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
* @since 8.1.0
@@ -187,6 +247,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed media domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowMediaDomain($domain) {
+ $this->allowedMediaDomains = array_diff($this->allowedMediaDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* From which domains objects such as <object>, <embed> or <applet> are executed
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
@@ -198,6 +270,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed object domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowObjectDomain($domain) {
+ $this->allowedObjectDomains = array_diff($this->allowedObjectDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Which domains can be embedded in an iframe
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
@@ -209,6 +293,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed frame domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowFrameDomain($domain) {
+ $this->allowedFrameDomains = array_diff($this->allowedFrameDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Domains from which web-workers and nested browsing content can load elements
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
@@ -220,6 +316,18 @@ class ContentSecurityPolicy {
}
/**
+ * Remove the specified allowed child src domain from the allowed domains.
+ *
+ * @param string $domain
+ * @return $this
+ * @since 8.1.0
+ */
+ public function disallowChildSrcDomain($domain) {
+ $this->allowedChildSrcDomains = array_diff($this->allowedChildSrcDomains, [$domain]);
+ return $this;
+ }
+
+ /**
* Get the generated Content-Security-Policy as a string
* @return string
* @since 8.1.0
diff --git a/lib/public/lock/ilockingprovider.php b/lib/public/lock/ilockingprovider.php
index a584ec02ef6..0b17580faac 100644
--- a/lib/public/lock/ilockingprovider.php
+++ b/lib/public/lock/ilockingprovider.php
@@ -35,7 +35,7 @@ interface ILockingProvider {
/**
* @param string $path
* @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
- * @throws \OCP\Files\Lock\LockedException
+ * @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type);