diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/fr.js | 8 | ||||
-rw-r--r-- | lib/l10n/fr.json | 8 | ||||
-rw-r--r-- | lib/l10n/hr.js | 10 | ||||
-rw-r--r-- | lib/l10n/hr.json | 10 | ||||
-rw-r--r-- | lib/l10n/sk_SK.js | 5 | ||||
-rw-r--r-- | lib/l10n/sk_SK.json | 5 | ||||
-rw-r--r-- | lib/private/connector/sabre/auth.php | 48 | ||||
-rw-r--r-- | lib/private/db/connectionfactory.php | 13 | ||||
-rw-r--r-- | lib/private/mail.php | 1 | ||||
-rw-r--r-- | lib/private/memcache/redis.php | 8 | ||||
-rw-r--r-- | lib/private/request.php | 2 | ||||
-rw-r--r-- | lib/private/tags.php | 2 | ||||
-rw-r--r-- | lib/private/user.php | 2 |
13 files changed, 88 insertions, 34 deletions
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index 24aac44d42d..1a4ea3c1310 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -94,13 +94,13 @@ OC.L10N.register( "Setting permissions for %s failed, because the item was not found" : "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé", "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa création", "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.", - "Sharing backend %s must implement the interface OCP\\Share_Backend" : "L'emplacement du partage %s doit implémenter l'interface OCP\\Share_Backend", - "Sharing backend %s not found" : "Emplacement de partage %s introuvable", - "Sharing backend for %s not found" : "L'emplacement du partage %s est introuvable", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend", + "Sharing backend %s not found" : "Service de partage %s non trouvé", + "Sharing backend for %s not found" : "Le service de partage pour %s est introuvable", "Sharing %s failed, because the user %s is the original sharer" : "Le partage de %s a échoué car l'utilisateur %s est l'utilisateur à l'origine du partage.", "Sharing %s failed, because the permissions exceed permissions granted to %s" : "Le partage de %s a échoué car les permissions dépassent les permissions accordées à %s", "Sharing %s failed, because resharing is not allowed" : "Le partage de %s a échoué car le repartage n'est pas autorisé", - "Sharing %s failed, because the sharing backend for %s could not find its source" : "Le partage %s a échoué parce que la source n'a été trouvée pour le partage %s.", + "Sharing %s failed, because the sharing backend for %s could not find its source" : "Le partage de %s a échoué parce que la source n'a été trouvée pour le partage %s.", "Sharing %s failed, because the file could not be found in the file cache" : "Le partage de %s a échoué car le fichier n'a pas été trouvé dans les fichiers mis en cache.", "Could not find category \"%s\"" : "Impossible de trouver la catégorie \"%s\"", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Seuls les caractères suivants sont autorisés dans un nom d'utilisateur : \"a-z\", \"A-Z\", \"0-9\", et \"_.@-\"", diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index 527b58b909d..6370bad1253 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -92,13 +92,13 @@ "Setting permissions for %s failed, because the item was not found" : "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé", "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa création", "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.", - "Sharing backend %s must implement the interface OCP\\Share_Backend" : "L'emplacement du partage %s doit implémenter l'interface OCP\\Share_Backend", - "Sharing backend %s not found" : "Emplacement de partage %s introuvable", - "Sharing backend for %s not found" : "L'emplacement du partage %s est introuvable", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend", + "Sharing backend %s not found" : "Service de partage %s non trouvé", + "Sharing backend for %s not found" : "Le service de partage pour %s est introuvable", "Sharing %s failed, because the user %s is the original sharer" : "Le partage de %s a échoué car l'utilisateur %s est l'utilisateur à l'origine du partage.", "Sharing %s failed, because the permissions exceed permissions granted to %s" : "Le partage de %s a échoué car les permissions dépassent les permissions accordées à %s", "Sharing %s failed, because resharing is not allowed" : "Le partage de %s a échoué car le repartage n'est pas autorisé", - "Sharing %s failed, because the sharing backend for %s could not find its source" : "Le partage %s a échoué parce que la source n'a été trouvée pour le partage %s.", + "Sharing %s failed, because the sharing backend for %s could not find its source" : "Le partage de %s a échoué parce que la source n'a été trouvée pour le partage %s.", "Sharing %s failed, because the file could not be found in the file cache" : "Le partage de %s a échoué car le fichier n'a pas été trouvé dans les fichiers mis en cache.", "Could not find category \"%s\"" : "Impossible de trouver la catégorie \"%s\"", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Seuls les caractères suivants sont autorisés dans un nom d'utilisateur : \"a-z\", \"A-Z\", \"0-9\", et \"_.@-\"", diff --git a/lib/l10n/hr.js b/lib/l10n/hr.js index 03323882399..c7e561262b4 100644 --- a/lib/l10n/hr.js +++ b/lib/l10n/hr.js @@ -8,11 +8,18 @@ OC.L10N.register( "Sample configuration detected" : "Nađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je da je ogledna konfiguracija kopirana. To može vašu instalaciju prekinuti i nije podržano.Molimo pročitajte dokumentaciju prije nego li izvršite promjene na config.php", "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", + "PHP with a version lower than %s is required." : "PHP sa verzijom manjom od %s je potrebna.", + "Following databases are supported: %s" : "Sljedece baza podataka je podrzana: %s", + "The library %s is not available." : "Knjiznica %s nije dostupna.", + "Following platforms are supported: %s" : "Sljedece platforme su podrzane: %s", + "ownCloud %s or higher is required." : "ownCloud %s ili visi je potreban.", + "ownCloud with a version lower than %s is required." : "ownCloud sa verzijom manjom od %s je potrebna.", "Help" : "Pomoć", "Personal" : "Osobno", "Settings" : "Postavke", "Users" : "Korisnici", "Admin" : "Admin", + "Recommended" : "Preporuceno", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacija \\\"%s\\\" se ne može instalirati jer nije kompatibilna s ovom verzijom ownClouda.", "No app name specified" : "Nikakav naziv aplikacije nije naveden", "Unknown filetype" : "Vrsta datoteke nepoznata", @@ -27,6 +34,8 @@ OC.L10N.register( "_%n hour ago_::_%n hours ago_" : ["prije %n sata","prije %n sati","prije %n sati"], "_%n minute ago_::_%n minutes ago_" : ["prije %n minute","prije %n minuta","prije %n minuta"], "seconds ago" : "prije par sekundi", + "Database Error" : "Database Greska", + "Please contact your system administrator." : "Molimo vas da kontaktirate vaseg sistem administratora.", "web services under your control" : "web usluge pod vašom kontrolom", "App directory already exists" : "Direktorij aplikacije već postoji", "Can't create app folder. Please fix permissions. %s" : "Nije moguće kreirati mapu aplikacija. molimo popravite dozvole. %s", @@ -62,6 +71,7 @@ OC.L10N.register( "PostgreSQL username and/or password not valid" : "Korisničko ime i/ili lozinka PostgreSQL neispravni", "Set an admin username." : "Navedite admin korisničko ime.", "Set an admin password." : "Navedite admin lozinku.", + "Can't create or write into the data directory %s" : "Ne moze se kreirati ili napisati u imenik podataka %s", "%s shared »%s« with you" : "%s je s vama podijelio »%s«", "Sharing %s failed, because the file does not exist" : "Dijeljenje %s nije uspjelo jer ta datoteka ne postoji", "You are not allowed to share %s" : "Nije vam dopušteno dijeliti %s", diff --git a/lib/l10n/hr.json b/lib/l10n/hr.json index 22beeba3f94..d4cab3a16b7 100644 --- a/lib/l10n/hr.json +++ b/lib/l10n/hr.json @@ -6,11 +6,18 @@ "Sample configuration detected" : "Nađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je da je ogledna konfiguracija kopirana. To može vašu instalaciju prekinuti i nije podržano.Molimo pročitajte dokumentaciju prije nego li izvršite promjene na config.php", "PHP %s or higher is required." : "PHP verzija treba biti %s ili viša.", + "PHP with a version lower than %s is required." : "PHP sa verzijom manjom od %s je potrebna.", + "Following databases are supported: %s" : "Sljedece baza podataka je podrzana: %s", + "The library %s is not available." : "Knjiznica %s nije dostupna.", + "Following platforms are supported: %s" : "Sljedece platforme su podrzane: %s", + "ownCloud %s or higher is required." : "ownCloud %s ili visi je potreban.", + "ownCloud with a version lower than %s is required." : "ownCloud sa verzijom manjom od %s je potrebna.", "Help" : "Pomoć", "Personal" : "Osobno", "Settings" : "Postavke", "Users" : "Korisnici", "Admin" : "Admin", + "Recommended" : "Preporuceno", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacija \\\"%s\\\" se ne može instalirati jer nije kompatibilna s ovom verzijom ownClouda.", "No app name specified" : "Nikakav naziv aplikacije nije naveden", "Unknown filetype" : "Vrsta datoteke nepoznata", @@ -25,6 +32,8 @@ "_%n hour ago_::_%n hours ago_" : ["prije %n sata","prije %n sati","prije %n sati"], "_%n minute ago_::_%n minutes ago_" : ["prije %n minute","prije %n minuta","prije %n minuta"], "seconds ago" : "prije par sekundi", + "Database Error" : "Database Greska", + "Please contact your system administrator." : "Molimo vas da kontaktirate vaseg sistem administratora.", "web services under your control" : "web usluge pod vašom kontrolom", "App directory already exists" : "Direktorij aplikacije već postoji", "Can't create app folder. Please fix permissions. %s" : "Nije moguće kreirati mapu aplikacija. molimo popravite dozvole. %s", @@ -60,6 +69,7 @@ "PostgreSQL username and/or password not valid" : "Korisničko ime i/ili lozinka PostgreSQL neispravni", "Set an admin username." : "Navedite admin korisničko ime.", "Set an admin password." : "Navedite admin lozinku.", + "Can't create or write into the data directory %s" : "Ne moze se kreirati ili napisati u imenik podataka %s", "%s shared »%s« with you" : "%s je s vama podijelio »%s«", "Sharing %s failed, because the file does not exist" : "Dijeljenje %s nije uspjelo jer ta datoteka ne postoji", "You are not allowed to share %s" : "Nije vam dopušteno dijeliti %s", diff --git a/lib/l10n/sk_SK.js b/lib/l10n/sk_SK.js index 1a4ad8c6293..a848a084bf8 100644 --- a/lib/l10n/sk_SK.js +++ b/lib/l10n/sk_SK.js @@ -8,6 +8,7 @@ OC.L10N.register( "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", + "PHP with a version lower than %s is required." : "PHP je vyžadované vo vyššej verzii ako %s.", "Help" : "Pomoc", "Personal" : "Osobné", "Settings" : "Nastavenia", @@ -20,11 +21,11 @@ OC.L10N.register( "Invalid image" : "Chybný obrázok", "today" : "dnes", "yesterday" : "včera", - "_%n day ago_::_%n days ago_" : ["","",""], + "_%n day ago_::_%n days ago_" : ["včera","pred %n dňami","pred %n dňami"], "last month" : "minulý mesiac", "_%n month ago_::_%n months ago_" : ["pred %n mesiacom","pred %n mesiacmi","pred %n mesiacmi"], "last year" : "minulý rok", - "_%n year ago_::_%n years ago_" : ["","",""], + "_%n year ago_::_%n years ago_" : ["vlani","pred %n rokmi","pred %n rokmi"], "_%n hour ago_::_%n hours ago_" : ["pred %n hodinou","pred %n hodinami","pred %n hodinami"], "_%n minute ago_::_%n minutes ago_" : ["pred %n minútou","pred %n minútami","pred %n minútami"], "seconds ago" : "pred sekundami", diff --git a/lib/l10n/sk_SK.json b/lib/l10n/sk_SK.json index 3d7fb6e7c83..a844bd0b973 100644 --- a/lib/l10n/sk_SK.json +++ b/lib/l10n/sk_SK.json @@ -6,6 +6,7 @@ "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", "PHP %s or higher is required." : "Požadovaná verzia PHP %s alebo vyššia.", + "PHP with a version lower than %s is required." : "PHP je vyžadované vo vyššej verzii ako %s.", "Help" : "Pomoc", "Personal" : "Osobné", "Settings" : "Nastavenia", @@ -18,11 +19,11 @@ "Invalid image" : "Chybný obrázok", "today" : "dnes", "yesterday" : "včera", - "_%n day ago_::_%n days ago_" : ["","",""], + "_%n day ago_::_%n days ago_" : ["včera","pred %n dňami","pred %n dňami"], "last month" : "minulý mesiac", "_%n month ago_::_%n months ago_" : ["pred %n mesiacom","pred %n mesiacmi","pred %n mesiacmi"], "last year" : "minulý rok", - "_%n year ago_::_%n years ago_" : ["","",""], + "_%n year ago_::_%n years ago_" : ["vlani","pred %n rokmi","pred %n rokmi"], "_%n hour ago_::_%n hours ago_" : ["pred %n hodinou","pred %n hodinami","pred %n hodinami"], "_%n minute ago_::_%n minutes ago_" : ["pred %n minútou","pred %n minútami","pred %n minútami"], "seconds ago" : "pred sekundami", diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php index 6e1baca9332..533d250d68e 100644 --- a/lib/private/connector/sabre/auth.php +++ b/lib/private/connector/sabre/auth.php @@ -22,25 +22,50 @@ */ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic { + const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND'; + + /** + * Whether the user has initially authenticated via DAV + * + * This is required for WebDAV clients that resent the cookies even when the + * account was changed. + * + * @see https://github.com/owncloud/core/issues/13245 + * + * @param string $username + * @return bool + */ + protected function isDavAuthenticated($username) { + return !is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED)) && + \OC::$server->getSession()->get(self::DAV_AUTHENTICATED) === $username; + } + /** * Validates a username and password * * This method should return true or false depending on if login * succeeded. * + * @param string $username + * @param string $password * @return bool */ protected function validateUserPass($username, $password) { - if (OC_User::isLoggedIn()) { + if (OC_User::isLoggedIn() && + $this->isDavAuthenticated($username) + ) { OC_Util::setupFS(OC_User::getUser()); + \OC::$server->getSession()->close(); return true; } else { - OC_Util::setUpFS();//login hooks may need early access to the filesystem + OC_Util::setUpFS(); //login hooks may need early access to the filesystem if(OC_User::login($username, $password)) { OC_Util::setUpFS(OC_User::getUser()); + \OC::$server->getSession()->set(self::DAV_AUTHENTICATED, $username); + \OC::$server->getSession()->close(); return true; - } - else{ + } else { + \OC::$server->getSession()->close(); return false; } } @@ -55,10 +80,10 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic { */ public function getCurrentUser() { $user = OC_User::getUser(); - if(!$user) { - return null; + if($user && $this->isDavAuthenticated($user)) { + return $user; } - return $user; + return null; } /** @@ -76,10 +101,6 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic { public function authenticate(\Sabre\DAV\Server $server, $realm) { $result = $this->auth($server, $realm); - - // close the session - right after authentication there is not need to write to the session any more - \OC::$server->getSession()->close(); - return $result; } @@ -89,10 +110,13 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic { * @return bool */ private function auth(\Sabre\DAV\Server $server, $realm) { - if (OC_User::handleApacheAuth() || OC_User::isLoggedIn()) { + if (OC_User::handleApacheAuth() || + (OC_User::isLoggedIn() && is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED))) + ) { $user = OC_User::getUser(); OC_Util::setupFS($user); $this->currentUser = $user; + \OC::$server->getSession()->close(); return true; } diff --git a/lib/private/db/connectionfactory.php b/lib/private/db/connectionfactory.php index 9c75baf887d..44b598dcda0 100644 --- a/lib/private/db/connectionfactory.php +++ b/lib/private/db/connectionfactory.php @@ -7,6 +7,9 @@ */ namespace OC\DB; +use Doctrine\DBAL\Event\Listeners\OracleSessionInit; +use Doctrine\DBAL\Event\Listeners\SQLSessionInit; +use Doctrine\DBAL\Event\Listeners\MysqlSessionInit; /** * Takes care of creating and configuring Doctrine connections. @@ -84,10 +87,12 @@ class ConnectionFactory { case 'mysql': // Send "SET NAMES utf8". Only required on PHP 5.3 below 5.3.6. // See http://stackoverflow.com/questions/4361459/php-pdo-charset-set-names#4361485 - $eventManager->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\MysqlSessionInit); + $eventManager->addEventSubscriber(new MysqlSessionInit); + $eventManager->addEventSubscriber( + new SQLSessionInit("SET SESSION AUTOCOMMIT=1")); break; case 'oci': - $eventManager->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\OracleSessionInit); + $eventManager->addEventSubscriber(new OracleSessionInit); break; case 'sqlite3': $journalMode = $additionalConnectionParams['sqlite.journal_mode']; @@ -136,8 +141,8 @@ class ConnectionFactory { $name = $config->getValue('dbname', 'owncloud'); if ($this->normalizeType($type) === 'sqlite3') { - $datadir = $config->getValue("datadirectory", \OC::$SERVERROOT . '/data'); - $connectionParams['path'] = $datadir . '/' . $name . '.db'; + $dataDir = $config->getValue("datadirectory", \OC::$SERVERROOT . '/data'); + $connectionParams['path'] = $dataDir . '/' . $name . '.db'; } else { $host = $config->getValue('dbhost', ''); if (strpos($host, ':')) { diff --git a/lib/private/mail.php b/lib/private/mail.php index 691ae1dd33f..8ba7343e011 100644 --- a/lib/private/mail.php +++ b/lib/private/mail.php @@ -61,6 +61,7 @@ class OC_Mail { $mailo->Port = $SMTPPORT; $mailo->SMTPAuth = $SMTPAUTH; $mailo->SMTPDebug = $SMTPDEBUG; + $mailo->Debugoutput = 'error_log'; $mailo->SMTPSecure = $SMTPSECURE; $mailo->AuthType = $SMTPAUTHTYPE; $mailo->Username = $SMTPUSERNAME; diff --git a/lib/private/memcache/redis.php b/lib/private/memcache/redis.php index f21619887d0..78ddd081338 100644 --- a/lib/private/memcache/redis.php +++ b/lib/private/memcache/redis.php @@ -49,18 +49,18 @@ class Redis extends Cache { public function get($key) { $result = self::$cache->get($this->getNamespace() . $key); - if ($result === false and ! self::$cache->exists($this->getNamespace() . $key)) { + if ($result === false && !self::$cache->exists($this->getNamespace() . $key)) { return null; } else { - return $result; + return json_decode($result, true); } } public function set($key, $value, $ttl = 0) { if ($ttl > 0) { - return self::$cache->setex($this->getNamespace() . $key, $ttl, $value); + return self::$cache->setex($this->getNamespace() . $key, $ttl, json_encode($value)); } else { - return self::$cache->set($this->getNamespace() . $key, $value); + return self::$cache->set($this->getNamespace() . $key, json_encode($value)); } } diff --git a/lib/private/request.php b/lib/private/request.php index 3c33dfc340a..3bf7d94d9cf 100644 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -278,6 +278,8 @@ class OC_Request { $requestUri = '/' . ltrim($requestUri, '/'); } + $requestUri = preg_replace('%/{2,}%', '/', $requestUri); + // Remove the query string from REQUEST_URI if ($pos = strpos($requestUri, '?')) { $requestUri = substr($requestUri, 0, $pos); diff --git a/lib/private/tags.php b/lib/private/tags.php index 9ff433b6984..4d737e47e07 100644 --- a/lib/private/tags.php +++ b/lib/private/tags.php @@ -211,7 +211,7 @@ class Tags implements \OCP\ITags { try { $conn = \OC_DB::getConnection(); - $chunks = array_chunk($objIds, 1000, false); + $chunks = array_chunk($objIds, 900, false); foreach ($chunks as $chunk) { $result = $conn->executeQuery( 'SELECT `category`, `categoryid`, `objid` ' . diff --git a/lib/private/user.php b/lib/private/user.php index d66354b247d..d1fedffcaaf 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -320,7 +320,7 @@ class OC_User { * Tries to login the user with HTTP Basic Authentication */ public static function tryBasicAuthLogin() { - if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_USER'])) { + if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { \OC_User::login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); } } |