summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-03-01 23:11:03 +0100
committerLukas Reschke <lukas@statuscode.ch>2013-03-01 23:11:03 +0100
commit5e7970f76158681876b51320d4f0e0b12ca01604 (patch)
treeae673236e344699d591bb9b4d512da2d58d44093 /lib
parent301d065686b7cb4b49d7662e2edec9ed5fe4115b (diff)
parent31754a653b13fdf31273177f12c39e32cb8c4001 (diff)
downloadnextcloud-server-5e7970f76158681876b51320d4f0e0b12ca01604.tar.gz
nextcloud-server-5e7970f76158681876b51320d4f0e0b12ca01604.zip
Merge master
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/ca.php1
-rw-r--r--lib/l10n/cs_CZ.php1
-rw-r--r--lib/l10n/de.php1
-rw-r--r--lib/l10n/de_DE.php1
-rw-r--r--lib/l10n/es.php1
-rw-r--r--lib/l10n/gl.php7
-rw-r--r--lib/l10n/hu_HU.php1
-rw-r--r--lib/l10n/lv.php1
-rw-r--r--lib/l10n/sk_SK.php1
-rw-r--r--lib/public/share.php26
-rw-r--r--lib/public/util.php11
-rwxr-xr-xlib/util.php17
12 files changed, 55 insertions, 14 deletions
diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php
index 3e3938aa6cb..108bb5c09be 100644
--- a/lib/l10n/ca.php
+++ b/lib/l10n/ca.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "L'usuari MySQL '%s'@'%%' ja existeix",
"Drop this user from MySQL." => "Elimina aquest usuari de MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "L'ordre en conflicte és: \"%s\", nom: %s, contrasenya: %s",
+"MS SQL username and/or password not valid: %s" => "Nom d'usuari i/o contrasenya MS SQL no vàlids: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "El servidor web no està configurat correctament per permetre la sincronització de fitxers perquè la interfície WebDAV sembla no funcionar correctament.",
"Please double check the <a href='%s'>installation guides</a>." => "Comproveu les <a href='%s'>guies d'instal·lació</a>.",
"seconds ago" => "segons enrere",
diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php
index d99f259cb0f..d9ec3d82cf7 100644
--- a/lib/l10n/cs_CZ.php
+++ b/lib/l10n/cs_CZ.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "Uživatel '%s'@'%%' již v MySQL existuje",
"Drop this user from MySQL." => "Zahodit uživatele z MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Podezřelý příkaz byl: \"%s\", jméno: %s, heslo: %s",
+"MS SQL username and/or password not valid: %s" => "Uživatelské jméno, či heslo MSSQL není platné: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server není správně nastaven pro umožnění synchronizace, protože rozhraní WebDAV je rozbité.",
"Please double check the <a href='%s'>installation guides</a>." => "Zkonzultujte, prosím, <a href='%s'>průvodce instalací</a>.",
"seconds ago" => "před vteřinami",
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index 87b0b29469c..3c2069d4637 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
+"MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Password ungültig: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Dein Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfe die <a href='%s'>Instalationsanleitungen</a>.",
"seconds ago" => "Gerade eben",
diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php
index d04c691f7ec..bbff4948096 100644
--- a/lib/l10n/de_DE.php
+++ b/lib/l10n/de_DE.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL." => "Lösche diesen Benutzer aus MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
+"MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Passwort nicht valide: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ihr Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfen Sie die <a href='%s'>Instalationsanleitungen</a>.",
"seconds ago" => "Gerade eben",
diff --git a/lib/l10n/es.php b/lib/l10n/es.php
index 3ee3ce2811b..37b15a375c4 100644
--- a/lib/l10n/es.php
+++ b/lib/l10n/es.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "Usuario MySQL '%s'@'%%' ya existe",
"Drop this user from MySQL." => "Eliminar este usuario de MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Comando infractor: \"%s\", nombre: %s, contraseña: %s",
+"MS SQL username and/or password not valid: %s" => "Usuario y/o contraseña de MS SQL no válidos: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Su servidor web aún no está configurado adecuadamente para permitir sincronización de archivos ya que la interfaz WebDAV parece no estar funcionando.",
"Please double check the <a href='%s'>installation guides</a>." => "Por favor, vuelva a comprobar las <a href='%s'>guías de instalación</a>.",
"seconds ago" => "hace segundos",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index 9673bb65fc1..a11724fef43 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -23,10 +23,10 @@
"%s enter the database name." => "%s introduza o nome da base de datos",
"%s you may not use dots in the database name" => "%s non se poden empregar puntos na base de datos",
"%s set the database host." => "%s estabeleza o servidor da base de datos",
-"PostgreSQL username and/or password not valid" => "Nome de usuario e/ou contrasinal PostgreSQL incorrecto",
+"PostgreSQL username and/or password not valid" => "Nome de usuario e/ou contrasinal de PostgreSQL incorrecto",
"You need to enter either an existing account or the administrator." => "Deberá introducir unha conta existente ou o administrador.",
-"Oracle username and/or password not valid" => "Nome de usuario e/ou contrasinal Oracle incorrecto",
-"MySQL username and/or password not valid" => "Nome de usuario e/ou contrasinal MySQL incorrecto",
+"Oracle username and/or password not valid" => "Nome de usuario e/ou contrasinal de Oracle incorrecto",
+"MySQL username and/or password not valid" => "Nome de usuario e/ou contrasinal de MySQL incorrecto",
"DB Error: \"%s\"" => "Produciuse un erro na base de datos: «%s»",
"Offending command was: \"%s\"" => "A orde ofensiva foi: «%s»",
"MySQL user '%s'@'localhost' exists already." => "O usuario MySQL '%s'@'localhost' xa existe.",
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "O usuario MySQL «%s»@«%%» xa existe.",
"Drop this user from MySQL." => "Omitir este usuario de MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "A orde ofensiva foi: «%s», nome: %s, contrasinal: %s",
+"MS SQL username and/or password not valid: %s" => "Nome de usuario e/ou contrasinal de MS SQL incorrecto: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "O seu servidor web non está aínda configurado adecuadamente para permitir a sincronización de ficheiros xa que semella que a interface WebDAV non está a funcionar.",
"Please double check the <a href='%s'>installation guides</a>." => "Volva comprobar as <a href='%s'>guías de instalación</a>",
"seconds ago" => "segundos atrás",
diff --git a/lib/l10n/hu_HU.php b/lib/l10n/hu_HU.php
index d1aeb621e23..537066c6fea 100644
--- a/lib/l10n/hu_HU.php
+++ b/lib/l10n/hu_HU.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "A '%s'@'%%' MySQL felhasználó már létezik",
"Drop this user from MySQL." => "Törölje ezt a felhasználót a MySQL-ből.",
"Offending command was: \"%s\", name: %s, password: %s" => "A hibát okozó parancs ez volt: \"%s\", login név: %s, jelszó: %s",
+"MS SQL username and/or password not valid: %s" => "Az MS SQL felhasználónév és/vagy jelszó érvénytelen: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Az Ön webkiszolgálója nincs megfelelően beállítva az állományok szinkronizálásához, mert a WebDAV-elérés úgy tűnik, nem működik.",
"Please double check the <a href='%s'>installation guides</a>." => "Kérjük tüzetesen tanulmányozza át a <a href='%s'>telepítési útmutatót</a>.",
"seconds ago" => "másodperce",
diff --git a/lib/l10n/lv.php b/lib/l10n/lv.php
index 5ec9ddd9693..c73d306ca0a 100644
--- a/lib/l10n/lv.php
+++ b/lib/l10n/lv.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "MySQL lietotājs '%s'@'%%' jau eksistē",
"Drop this user from MySQL." => "Izmest šo lietotāju no MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Vainīgā komanda bija \"%s\", vārds: %s, parole: %s",
+"MS SQL username and/or password not valid: %s" => "Nav derīga MySQL parole un/vai lietotājvārds — %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Jūsu serveris vēl nav pareizi iestatīts, lai ļautu sinhronizēt datnes, jo izskatās, ka WebDAV saskarne ir salauzta.",
"Please double check the <a href='%s'>installation guides</a>." => "Lūdzu, vēlreiz pārbaudiet <a href='%s'>instalēšanas palīdzību</a>.",
"seconds ago" => "sekundes atpakaļ",
diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php
index 97a4999407f..8c9ce61622c 100644
--- a/lib/l10n/sk_SK.php
+++ b/lib/l10n/sk_SK.php
@@ -34,6 +34,7 @@
"MySQL user '%s'@'%%' already exists" => "Používateľ '%s'@'%%' už v MySQL existuje",
"Drop this user from MySQL." => "Zahodiť používateľa z MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Podozrivý príkaz bol: \"%s\", meno: %s, heslo: %s",
+"MS SQL username and/or password not valid: %s" => "Používateľské meno, alebo heslo MS SQL nie je platné: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server nie je správne nastavený na synchronizáciu, pretože rozhranie WebDAV je poškodené.",
"Please double check the <a href='%s'>installation guides</a>." => "Prosím skontrolujte <a href='%s'>inštalačnú príručku</a>.",
"seconds ago" => "pred sekundami",
diff --git a/lib/public/share.php b/lib/public/share.php
index 37cf0838ed1..8146a23f360 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -61,6 +61,7 @@ class Share {
private static $shareTypeGroupUserUnique = 2;
private static $backends = array();
private static $backendTypes = array();
+ private static $isResharingAllowed;
/**
* @brief Register a sharing backend class that implements OCP\Share_Backend for an item type
@@ -568,6 +569,24 @@ class Share {
}
/**
+ * @brief Check if resharing is allowed
+ * @return Returns true if allowed or false
+ *
+ * Resharing is allowed by default if not configured
+ *
+ */
+ private static function isResharingAllowed() {
+ if (!isset(self::$isResharingAllowed)) {
+ if (\OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes') == 'yes') {
+ self::$isResharingAllowed = true;
+ } else {
+ self::$isResharingAllowed = false;
+ }
+ }
+ return self::$isResharingAllowed;
+ }
+
+ /**
* @brief Get a list of collection item types for the specified item type
* @param string Item type
* @return array
@@ -840,7 +859,10 @@ class Share {
continue;
}
}
-
+ // Check if resharing is allowed, if not remove share permission
+ if (isset($row['permissions']) && !self::isResharingAllowed()) {
+ $row['permissions'] &= ~PERMISSION_SHARE;
+ }
// Add display names to result
if ( isset($row['share_with']) && $row['share_with'] != '') {
$row['share_with_displayname'] = \OCP\User::getDisplayName($row['share_with']);
@@ -978,7 +1000,7 @@ class Share {
throw new \Exception($message);
}
// Check if share permissions is granted
- if ((int)$checkReshare['permissions'] & PERMISSION_SHARE) {
+ if (self::isResharingAllowed() && (int)$checkReshare['permissions'] & PERMISSION_SHARE) {
if (~(int)$checkReshare['permissions'] & $permissions) {
$message = 'Sharing '.$itemSource
.' failed, because the permissions exceed permissions granted to '.$uidOwner;
diff --git a/lib/public/util.php b/lib/public/util.php
index 13498b260ef..5d814114a24 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -217,11 +217,14 @@ class Util {
*/
public static function getDefaultEmailAddress($user_part) {
$host_name = self::getServerHostName();
- // handle localhost installations
- if ($host_name === 'localhost') {
- $host_name = "example.com";
+ $defaultEmailAddress = $user_part.'@'.$host_name;
+
+ if (\PHPMailer::ValidateAddress($defaultEmailAddress)) {
+ return $defaultEmailAddress;
}
- return $user_part.'@'.$host_name;
+
+ // incase we cannot build a valid email address from the hostname let's fallback to 'localhost.localdomain'
+ return $user_part.'@localhost.localdomain';
}
/**
diff --git a/lib/util.php b/lib/util.php
index 2e32ee2e3c2..ce426684fea 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -75,7 +75,7 @@ class OC_Util {
public static function getVersion() {
// hint: We only can count up. Reset minor/patchlevel when
// updating major/minor version number.
- return array(4, 94, 10);
+ return array(4, 95, 10);
}
/**
@@ -83,7 +83,7 @@ class OC_Util {
* @return string
*/
public static function getVersionString() {
- return '5.0 beta 2';
+ return '5.0 RC 1';
}
/**
@@ -464,13 +464,17 @@ class OC_Util {
* @see OC_Util::callRegister()
*/
public static function isCallRegistered() {
+ if(!isset($_SESSION['requesttoken'])) {
+ return false;
+ }
+
if(isset($_GET['requesttoken'])) {
$token=$_GET['requesttoken'];
- }elseif(isset($_POST['requesttoken'])) {
+ } elseif(isset($_POST['requesttoken'])) {
$token=$_POST['requesttoken'];
- }elseif(isset($_SERVER['HTTP_REQUESTTOKEN'])) {
+ } elseif(isset($_SERVER['HTTP_REQUESTTOKEN'])) {
$token=$_SERVER['HTTP_REQUESTTOKEN'];
- }else{
+ } else {
//no token found.
return false;
}
@@ -577,6 +581,9 @@ class OC_Util {
$client = new \Sabre_DAV_Client($settings);
+ // for this self test we don't care if the ssl certificate is self signed and the peer cannot be verified.
+ $client->setVerifyPeer(false);
+
$return = true;
try {
// test PROPFIND