diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 6 | ||||
-rw-r--r-- | lib/l10n/ar.js | 1 | ||||
-rw-r--r-- | lib/l10n/ar.json | 1 | ||||
-rw-r--r-- | lib/l10n/bg.js | 8 | ||||
-rw-r--r-- | lib/l10n/bg.json | 8 | ||||
-rw-r--r-- | lib/l10n/lv.js | 2 | ||||
-rw-r--r-- | lib/l10n/lv.json | 2 | ||||
-rw-r--r-- | lib/l10n/sw.js | 7 | ||||
-rw-r--r-- | lib/l10n/sw.json | 7 | ||||
-rw-r--r-- | lib/l10n/uk.js | 1 | ||||
-rw-r--r-- | lib/l10n/uk.json | 1 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/S3ConfigTrait.php | 4 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/S3ConnectionTrait.php | 4 | ||||
-rw-r--r-- | lib/private/Server.php | 2 | ||||
-rw-r--r-- | lib/private/Session/CryptoWrapper.php | 2 | ||||
-rw-r--r-- | lib/private/User/Session.php | 20 | ||||
-rw-r--r-- | lib/public/AppFramework/App.php | 6 | ||||
-rw-r--r-- | lib/public/OCM/IOCMProvider.php | 1 |
18 files changed, 61 insertions, 22 deletions
diff --git a/lib/base.php b/lib/base.php index 55856889489..876d62c3596 100644 --- a/lib/base.php +++ b/lib/base.php @@ -393,6 +393,12 @@ class OC { $cookie_path = OC::$WEBROOT ? : '/'; ini_set('session.cookie_path', $cookie_path); + // set the cookie domain to the Nextcloud domain + $cookie_domain = self::$config->getValue('cookie_domain', ''); + if ($cookie_domain) { + ini_set('session.cookie_domain', $cookie_domain); + } + // Let the session name be changed in the initSession Hook $sessionName = OC_Util::getInstanceId(); diff --git a/lib/l10n/ar.js b/lib/l10n/ar.js index 734d8c693d7..4747362aaa8 100644 --- a/lib/l10n/ar.js +++ b/lib/l10n/ar.js @@ -93,6 +93,7 @@ OC.L10N.register( "Destination does not exist" : "المَقصِد غير موجود", "Destination is not creatable" : "المِقصِد لايمكن إنشاؤه", "Dot files are not allowed" : "الملفات النقطية (ملفات ذات أسماء تبدأ بنقطة) غير مسموح بها", + "renamed file" : "ملف معاد تسميته", "\"%1$s\" is a forbidden file or folder name." : "\"%1$s\" غير مسموح به أن يكون اسم ملف أو مجلد.", "\"%1$s\" is a forbidden prefix for file or folder names." : "\"%1$s\" غير مسموح به أن يكون بادئة لاسم ملف أو مجلد.", "\"%1$s\" is not allowed inside a file or folder name." : "\"%1$s\" غير مسموح به أن يكون داخل اسم ملف أو مجلد.", diff --git a/lib/l10n/ar.json b/lib/l10n/ar.json index e53cdc2fd6c..2bc87515bac 100644 --- a/lib/l10n/ar.json +++ b/lib/l10n/ar.json @@ -91,6 +91,7 @@ "Destination does not exist" : "المَقصِد غير موجود", "Destination is not creatable" : "المِقصِد لايمكن إنشاؤه", "Dot files are not allowed" : "الملفات النقطية (ملفات ذات أسماء تبدأ بنقطة) غير مسموح بها", + "renamed file" : "ملف معاد تسميته", "\"%1$s\" is a forbidden file or folder name." : "\"%1$s\" غير مسموح به أن يكون اسم ملف أو مجلد.", "\"%1$s\" is a forbidden prefix for file or folder names." : "\"%1$s\" غير مسموح به أن يكون بادئة لاسم ملف أو مجلد.", "\"%1$s\" is not allowed inside a file or folder name." : "\"%1$s\" غير مسموح به أن يكون داخل اسم ملف أو مجلد.", diff --git a/lib/l10n/bg.js b/lib/l10n/bg.js index 6674c4be2ad..445da4c9626 100644 --- a/lib/l10n/bg.js +++ b/lib/l10n/bg.js @@ -92,6 +92,7 @@ OC.L10N.register( "Administration settings" : "Административни настройки", "Settings" : "Настройки", "Log out" : "Отписване", + "Accounts" : "Профили", "Email" : "Имейл", "Mail %s" : "Поща %s", "Fediverse" : "Fediverse /съвкупност от обединени сървъри/", @@ -103,12 +104,13 @@ OC.L10N.register( "Website" : "Уеб сайт", "Visit %s" : "Посещение %s", "Address" : "Адрес", - "Profile picture" : "Снимка на профила", + "Profile picture" : "Профилна снимка", "About" : "Относно", "Display name" : "Име за визуализация", "Headline" : "Заглавие", "Organisation" : "Организация", "Role" : "Роля", + "Pronouns" : "Обръщение", "Additional settings" : "Допълнителни настройки", "Enter the database name for %s" : "Въведете името на базата данни за %s", "You cannot use dots in the database name %s" : "Не можете да използвате точки в името на базата данни %s", @@ -196,8 +198,8 @@ OC.L10N.register( "This can usually be fixed by giving the web server write access to the root directory. See %s" : "Това обикновено може да бъде оправено като, се даде достъп на уеб сървъра да записва в основната директория. Погледнете %s", "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : "Права обикновено могат да бъдат оправени когато се даде достъп на уеб сървъра да пише в основната директория. Погледнете %s.", "Your data directory is not writable." : "Вашата директория с данни не е записваема.", - "Setting locale to %s failed." : "Неуспешно задаване на езикова променлива %s.", - "Please install one of these locales on your system and restart your web server." : "Моля, инсталирайте една от тези езикови променливи на вашата система и си рестартирайте уеб сървъра.", + "Setting locale to %s failed." : "Неуспешно задаване на регион %s. ", + "Please install one of these locales on your system and restart your web server." : "Моля, задайте един от следните региони във Вашата система след което рестартирайте сървъра.", "PHP module %s not installed." : "PHP модулът %s не е инсталиран.", "Please ask your server administrator to install the module." : "Моля, помолете вашия администратор да инсталира модула.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP настройка \"%s\" не е зададена на \"%s\".", diff --git a/lib/l10n/bg.json b/lib/l10n/bg.json index 0dfca8ec315..a4bc3162762 100644 --- a/lib/l10n/bg.json +++ b/lib/l10n/bg.json @@ -90,6 +90,7 @@ "Administration settings" : "Административни настройки", "Settings" : "Настройки", "Log out" : "Отписване", + "Accounts" : "Профили", "Email" : "Имейл", "Mail %s" : "Поща %s", "Fediverse" : "Fediverse /съвкупност от обединени сървъри/", @@ -101,12 +102,13 @@ "Website" : "Уеб сайт", "Visit %s" : "Посещение %s", "Address" : "Адрес", - "Profile picture" : "Снимка на профила", + "Profile picture" : "Профилна снимка", "About" : "Относно", "Display name" : "Име за визуализация", "Headline" : "Заглавие", "Organisation" : "Организация", "Role" : "Роля", + "Pronouns" : "Обръщение", "Additional settings" : "Допълнителни настройки", "Enter the database name for %s" : "Въведете името на базата данни за %s", "You cannot use dots in the database name %s" : "Не можете да използвате точки в името на базата данни %s", @@ -194,8 +196,8 @@ "This can usually be fixed by giving the web server write access to the root directory. See %s" : "Това обикновено може да бъде оправено като, се даде достъп на уеб сървъра да записва в основната директория. Погледнете %s", "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : "Права обикновено могат да бъдат оправени когато се даде достъп на уеб сървъра да пише в основната директория. Погледнете %s.", "Your data directory is not writable." : "Вашата директория с данни не е записваема.", - "Setting locale to %s failed." : "Неуспешно задаване на езикова променлива %s.", - "Please install one of these locales on your system and restart your web server." : "Моля, инсталирайте една от тези езикови променливи на вашата система и си рестартирайте уеб сървъра.", + "Setting locale to %s failed." : "Неуспешно задаване на регион %s. ", + "Please install one of these locales on your system and restart your web server." : "Моля, задайте един от следните региони във Вашата система след което рестартирайте сървъра.", "PHP module %s not installed." : "PHP модулът %s не е инсталиран.", "Please ask your server administrator to install the module." : "Моля, помолете вашия администратор да инсталира модула.", "PHP setting \"%s\" is not set to \"%s\"." : "PHP настройка \"%s\" не е зададена на \"%s\".", diff --git a/lib/l10n/lv.js b/lib/l10n/lv.js index 13a169c3fd2..d70b713b15f 100644 --- a/lib/l10n/lv.js +++ b/lib/l10n/lv.js @@ -40,6 +40,8 @@ OC.L10N.register( "_%n minute ago_::_%n minutes ago_" : ["pirms %n minūtēm","pirms %n minūtes","pirms %n minūtēm"], "seconds ago" : "pirms vairākām sekundēm", "Empty file" : "Tukša datne", + "%1$s (renamed)" : "%1$s (pārdēvēta)", + "renamed file" : "pārdēvēja datni", "File already exists" : "Datne jau pastāv", "Filename contains at least one invalid character" : "Datnes nosaukums satur vismaz vienu nederīgu rakstzīmi", "Empty filename is not allowed" : "Tukšs datnes nosaukums nav atļauts", diff --git a/lib/l10n/lv.json b/lib/l10n/lv.json index 0540c50ad27..985ca12e30a 100644 --- a/lib/l10n/lv.json +++ b/lib/l10n/lv.json @@ -38,6 +38,8 @@ "_%n minute ago_::_%n minutes ago_" : ["pirms %n minūtēm","pirms %n minūtes","pirms %n minūtēm"], "seconds ago" : "pirms vairākām sekundēm", "Empty file" : "Tukša datne", + "%1$s (renamed)" : "%1$s (pārdēvēta)", + "renamed file" : "pārdēvēja datni", "File already exists" : "Datne jau pastāv", "Filename contains at least one invalid character" : "Datnes nosaukums satur vismaz vienu nederīgu rakstzīmi", "Empty filename is not allowed" : "Tukšs datnes nosaukums nav atļauts", diff --git a/lib/l10n/sw.js b/lib/l10n/sw.js index d7e06ec3451..baef028baf7 100644 --- a/lib/l10n/sw.js +++ b/lib/l10n/sw.js @@ -1,9 +1,12 @@ OC.L10N.register( "lib", { + "Files" : "Mafaili", "seconds ago" : "sukunde zilizopita", "File already exists" : "Faili lipo tayari", + "Settings" : "Mipangilio", "Email" : "Barua pepe", + "Additional settings" : "Mipangilio ya nyongeza", "Sunday" : "Jumapili", "Monday" : "Jumatatu", "Tuesday" : "Jumanne", @@ -11,6 +14,8 @@ OC.L10N.register( "Thursday" : "Alhamisi", "Friday" : "Ijumaa", "Saturday" : "Jumamosi", - "Confirmation" : "Uthibitisho" + "Confirmation" : "Uthibitisho", + "Text" : "Maandishi", + "Summary" : "Muhtasari" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/sw.json b/lib/l10n/sw.json index 54b9a3bfdc9..bc299dcef06 100644 --- a/lib/l10n/sw.json +++ b/lib/l10n/sw.json @@ -1,7 +1,10 @@ { "translations": { + "Files" : "Mafaili", "seconds ago" : "sukunde zilizopita", "File already exists" : "Faili lipo tayari", + "Settings" : "Mipangilio", "Email" : "Barua pepe", + "Additional settings" : "Mipangilio ya nyongeza", "Sunday" : "Jumapili", "Monday" : "Jumatatu", "Tuesday" : "Jumanne", @@ -9,6 +12,8 @@ "Thursday" : "Alhamisi", "Friday" : "Ijumaa", "Saturday" : "Jumamosi", - "Confirmation" : "Uthibitisho" + "Confirmation" : "Uthibitisho", + "Text" : "Maandishi", + "Summary" : "Muhtasari" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js index d511d276c9e..b92f38a5f57 100644 --- a/lib/l10n/uk.js +++ b/lib/l10n/uk.js @@ -275,6 +275,7 @@ OC.L10N.register( "A valid Login must be provided" : "Зазначте дійсне ім'я користувача", "Login contains whitespace at the beginning or at the end" : "Ім'я користувача містить символ пробілу на початку або наприкінці", "Login must not consist of dots only" : "Ім'я користувача не може складатися лише з крапок", + "Username is too long" : "Ім'я користувача задовге", "Login is invalid because files already exist for this user" : "Недійсне ім'я облікового запису, оскільки файли для цього користувача вже присутні", "Account disabled" : "Обліковий запис вимкнено", "Login canceled by app" : "Вхід скасовано застосунком", diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json index c21e23f71f3..e091c070aa7 100644 --- a/lib/l10n/uk.json +++ b/lib/l10n/uk.json @@ -273,6 +273,7 @@ "A valid Login must be provided" : "Зазначте дійсне ім'я користувача", "Login contains whitespace at the beginning or at the end" : "Ім'я користувача містить символ пробілу на початку або наприкінці", "Login must not consist of dots only" : "Ім'я користувача не може складатися лише з крапок", + "Username is too long" : "Ім'я користувача задовге", "Login is invalid because files already exist for this user" : "Недійсне ім'я облікового запису, оскільки файли для цього користувача вже присутні", "Account disabled" : "Обліковий запис вимкнено", "Login canceled by app" : "Вхід скасовано застосунком", diff --git a/lib/private/Files/ObjectStore/S3ConfigTrait.php b/lib/private/Files/ObjectStore/S3ConfigTrait.php index 63f14ac2d00..5b086db8f77 100644 --- a/lib/private/Files/ObjectStore/S3ConfigTrait.php +++ b/lib/private/Files/ObjectStore/S3ConfigTrait.php @@ -18,6 +18,10 @@ trait S3ConfigTrait { /** Maximum number of concurrent multipart uploads */ protected int $concurrency; + /** Timeout, in seconds, for the connection to S3 server, not for the + * request. */ + protected float $connectTimeout; + protected int $timeout; protected string|false $proxy; diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index b7017583dc2..062d2e4bde4 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -39,6 +39,7 @@ trait S3ConnectionTrait { // Default to 5 like the S3 SDK does $this->concurrency = $params['concurrency'] ?? 5; $this->proxy = $params['proxy'] ?? false; + $this->connectTimeout = $params['connect_timeout'] ?? 5; $this->timeout = $params['timeout'] ?? 15; $this->storageClass = !empty($params['storageClass']) ? $params['storageClass'] : 'STANDARD'; $this->uploadPartSize = $params['uploadPartSize'] ?? 524288000; @@ -102,8 +103,7 @@ trait S3ConnectionTrait { 'use_arn_region' => false, 'http' => [ 'verify' => $this->getCertificateBundlePath(), - // Timeout for the connection to S3 server, not for the request. - 'connect_timeout' => 5 + 'connect_timeout' => $this->connectTimeout, ], 'use_aws_shared_config_files' => false, 'retries' => [ diff --git a/lib/private/Server.php b/lib/private/Server.php index 5ca97b261f4..b84c001a200 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -199,6 +199,7 @@ use OCP\Log\ILogFactory; use OCP\Mail\IMailer; use OCP\OCM\ICapabilityAwareOCMProvider; use OCP\OCM\IOCMDiscoveryService; +use OCP\OCM\IOCMProvider; use OCP\Preview\IMimeIconProvider; use OCP\Profile\IProfileManager; use OCP\Profiler\IProfiler; @@ -1273,6 +1274,7 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias(IPhoneNumberUtil::class, PhoneNumberUtil::class); $this->registerAlias(ICapabilityAwareOCMProvider::class, OCMProvider::class); + $this->registerDeprecatedAlias(IOCMProvider::class, OCMProvider::class); $this->registerAlias(ISetupCheckManager::class, SetupCheckManager::class); diff --git a/lib/private/Session/CryptoWrapper.php b/lib/private/Session/CryptoWrapper.php index 380c699d32d..40c2ba6adf3 100644 --- a/lib/private/Session/CryptoWrapper.php +++ b/lib/private/Session/CryptoWrapper.php @@ -59,7 +59,7 @@ class CryptoWrapper { [ 'expires' => 0, 'path' => $webRoot, - 'domain' => '', + 'domain' => \OCP\Server::get(\OCP\IConfig::class)->getSystemValueString('cookie_domain'), 'secure' => $secureCookie, 'httponly' => true, 'samesite' => 'Lax', diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 27570822ef2..a638cd24557 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -967,6 +967,7 @@ class Session implements IUserSession, Emitter { if ($webRoot === '') { $webRoot = '/'; } + $domain = $this->config->getSystemValueString('cookie_domain'); $maxAge = $this->config->getSystemValueInt('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); \OC\Http\CookieHelper::setCookie( @@ -974,7 +975,7 @@ class Session implements IUserSession, Emitter { $username, $maxAge, $webRoot, - '', + $domain, $secureCookie, true, \OC\Http\CookieHelper::SAMESITE_LAX @@ -984,7 +985,7 @@ class Session implements IUserSession, Emitter { $token, $maxAge, $webRoot, - '', + $domain, $secureCookie, true, \OC\Http\CookieHelper::SAMESITE_LAX @@ -995,7 +996,7 @@ class Session implements IUserSession, Emitter { $this->session->getId(), $maxAge, $webRoot, - '', + $domain, $secureCookie, true, \OC\Http\CookieHelper::SAMESITE_LAX @@ -1011,18 +1012,19 @@ class Session implements IUserSession, Emitter { public function unsetMagicInCookie() { //TODO: DI for cookies and IRequest $secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https'; + $domain = $this->config->getSystemValueString('cookie_domain'); unset($_COOKIE['nc_username']); //TODO: DI unset($_COOKIE['nc_token']); unset($_COOKIE['nc_session_id']); - setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); - setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); - setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); + setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, $domain, $secureCookie, true); + setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, $domain, $secureCookie, true); + setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, $domain, $secureCookie, true); // old cookies might be stored under /webroot/ instead of /webroot // and Firefox doesn't like it! - setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); - setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); - setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); + setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', $domain, $secureCookie, true); + setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', $domain, $secureCookie, true); + setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', $domain, $secureCookie, true); } /** diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index eec5c6e83e9..2cf976ce90a 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -9,6 +9,7 @@ declare(strict_types=1); */ namespace OCP\AppFramework; +use OC\AppFramework\Utility\SimpleContainer; use OC\ServerContainer; use OCP\IConfig; use OCP\Server; @@ -70,9 +71,10 @@ class App { $setUpViaQuery = true; break; } elseif (isset($step['class'], $step['function'], $step['args'][0]) && - $step['class'] === \ReflectionClass::class && - $step['function'] === 'initializeLazyObject' && + $step['class'] === SimpleContainer::class && + preg_match('/{closure:OC\\\\AppFramework\\\\Utility\\\\SimpleContainer::buildClass\\(\\):\\d+}/', $step['function']) && $step['args'][0] === $this) { + /* We are setup through a lazy ghost, fine */ $setUpViaQuery = true; break; } diff --git a/lib/public/OCM/IOCMProvider.php b/lib/public/OCM/IOCMProvider.php index a267abc52d2..7141b0a9ab9 100644 --- a/lib/public/OCM/IOCMProvider.php +++ b/lib/public/OCM/IOCMProvider.php @@ -16,6 +16,7 @@ use OCP\OCM\Exceptions\OCMProviderException; * Model based on the Open Cloud Mesh Discovery API * @link https://github.com/cs3org/OCM-API/ * @since 28.0.0 + * @deprecated 32.0.0 Please use {@see \OCP\OCM\ICapabilityAwareOCMProvider} */ interface IOCMProvider extends JsonSerializable { /** |