diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/InstalledVersions.php | 20 | ||||
-rw-r--r-- | lib/composer/composer/installed.php | 4 | ||||
-rw-r--r-- | lib/l10n/et_EE.js | 32 | ||||
-rw-r--r-- | lib/l10n/et_EE.json | 32 | ||||
-rw-r--r-- | lib/l10n/fr.js | 8 | ||||
-rw-r--r-- | lib/l10n/fr.json | 8 | ||||
-rw-r--r-- | lib/l10n/sw.js | 3 | ||||
-rw-r--r-- | lib/l10n/sw.json | 3 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 47 | ||||
-rw-r--r-- | lib/private/Files/Cache/CacheQueryBuilder.php | 2 | ||||
-rw-r--r-- | lib/private/Files/SetupManager.php | 12 | ||||
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 8 | ||||
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 1 | ||||
-rw-r--r-- | lib/public/Calendar/ICreateFromString.php | 24 |
15 files changed, 161 insertions, 47 deletions
diff --git a/lib/composer/composer/InstalledVersions.php b/lib/composer/composer/InstalledVersions.php index 6d29bff66aa..2052022fd8e 100644 --- a/lib/composer/composer/InstalledVersions.php +++ b/lib/composer/composer/InstalledVersions.php @@ -27,6 +27,12 @@ use Composer\Semver\VersionParser; class InstalledVersions { /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + + /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null */ @@ -323,6 +329,18 @@ class InstalledVersions } /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + + /** * @return array[] * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ @@ -336,7 +354,7 @@ class InstalledVersions $copiedLocalDir = false; if (self::$canGetVendors) { - $selfDir = strtr(__DIR__, '\\', '/'); + $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { diff --git a/lib/composer/composer/installed.php b/lib/composer/composer/installed.php index 1cfe4bf1d74..cd89ef10785 100644 --- a/lib/composer/composer/installed.php +++ b/lib/composer/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'b7422ba97b7b42a9955a52031a32457ca521d740', + 'reference' => '3fce359f4c606737b21b1b4213efd5bc5536e867', 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'b7422ba97b7b42a9955a52031a32457ca521d740', + 'reference' => '3fce359f4c606737b21b1b4213efd5bc5536e867', 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js index 1b86c9138c7..92080235dd5 100644 --- a/lib/l10n/et_EE.js +++ b/lib/l10n/et_EE.js @@ -30,14 +30,14 @@ OC.L10N.register( "%sbit or higher PHP required." : "Vajalik on %s-bitine või parem PHP versioon.", "The following architectures are supported: %s" : "Toetatud on järgnevad arhitektuurid: %s", "The following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leitud", - "The library %s is not available." : "Teek %s pole saadaval.", + "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leidu", + "The library %s is not available." : " %s teek pole saadaval.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek suurema versiooniga kui %2$s - hetkel on versioon %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek väiksema versiooniga kui %2$s - hetkel on versioon %3$s.", "The following platforms are supported: %s" : "Toetatud on järgmised platvormid: %s", "Server version %s or higher is required." : "Nõutav on serveri versioon %s või suurem.", "Server version %s or lower is required." : "Serveri versioon %s või madalam on nõutav.", - "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õiguse selle seadustuse muutmiseks", + "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õigust selle seadustuse muutmiseks", "Your current IP address doesn't allow you to perform admin actions" : "Sinu praeguselt e-posti aadressilt ei saa teha haldustoiminguid", "Logged in account must be an admin or sub admin" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige", "Logged in account must be an admin" : "Sisselogitud kasutajakonto peab olema peakasutajate grupi liige", @@ -160,6 +160,7 @@ OC.L10N.register( "PostgreSQL Login and/or password not valid" : "PostgreSQLi andmebaasi kasutajatunnus ja/või salasõna pole õiged", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk!" : "Mac OS X ei ole toetatud ja %s ei pruugi korralikult toimida sellel platvormil. Kasuta seda omal vastutusel!", "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Tundub, et %s server töötab 32-bitises PHP käituskeskkonnas ja „open_basedir“ on php.ini failis seadistatud. Kui failide suurus on üle 4 GB, siis võib tekkida probleeme ning antud lahenduse kasutamist me ei soovita.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Palun eemalda oma serveri seadistustest php.ini failist „open_basedir“ seadistus või võta kasutusele 64-bitisel platvormil põhinev PHP versioon.", "Set an admin Login." : "Lisa peakasutaja kasutajanimi.", "Set an admin password." : "Lisa peakasutaja salasõna.", @@ -214,6 +215,7 @@ OC.L10N.register( "Group \"%s\" does not exist" : "„%s“ gruppi pole olemas", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "The requested share comes from a disabled user" : "Soovitud jaosmeedia on loonud blokeeritud kasutaja", + "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Kuna kasutajate arvu ülempiir on käes, siis uus kasutaja jäi lisamata. Lisateavet leiad oma teavitustest.", "Could not find category \"%s\"" : "Ei leia kategooriat „%s“", "Input text" : "Sisendtekst", "The input text" : "Sisendtekst", @@ -386,6 +388,8 @@ OC.L10N.register( "Output speech" : "Kõneväljund", "The generated speech" : "Koostatud kõne", "Describe a task that you want the assistant to do or ask a question" : "Kirjelda seda, mida soovid Abilisele ülesandeks teha või lihtsalt küsi midagi.", + "Generated reply" : "Koostatud vastus", + "The generated text from the assistant" : "Abilise poolt koostatud tekst", "Change Tone" : "Teksti tooni muutmine", "Change the tone of a piece of text." : "Muuda antud teksti tonaalsust.", "Write a text that you want the assistant to rewrite in another tone." : "Kirjuta üles see, mille tonaalsust tahad Abilisel lasta ümber kirjutada.", @@ -399,6 +403,9 @@ OC.L10N.register( "The generated response as part of the conversation" : "Loodud vastus vestluse osana", "Formalize text" : "Muuda tekst ametlikuks", "Takes a text and makes it sound more formal" : "Sisestatud teksti vormistamine ametlikuna", + "Write a text that you want the assistant to formalize" : "Sisesta tekst, mille Abiline peaks tegema ametlikumaks", + "Formalized text" : "Ametlikus vormis tekst", + "The formalized text" : "Mitteametlikus vormis tekst", "Generate a headline" : "Alapealkirja loomine", "Generates a possible headline for a text." : "Võimaldab luua teksti põhjal kokkuvõtliku alapealkirja.", "Original text" : "Lähtetekst", @@ -410,7 +417,26 @@ OC.L10N.register( "The text to proofread" : "Keelekorrektuuri vajav tekst", "Corrections" : "Korrektuuris tehtud parandused", "The corrections that should be made in your text" : "Korrektuuris tehtud parandused, mis peaks sinu teksti lisanduma", + "Reformulate text" : "Teksti sõnastuse mutmine", + "Takes a text and reformulates it" : "Sisendina antud tekst saab ümbersõnastatud", + "Write a text that you want the assistant to reformulate" : "Sisesta tekst, mille Abiline peaks ümbersõnastama", + "Reformulated text" : "Ümbersõnastatud tekst", + "The reformulated text, written by the assistant" : "Abilise poolt ümbersõnastatud tekst", + "Simplify text" : "Teksti lihtsustamine", + "Takes a text and simplifies it" : "Sisendina antud tekst saab lihtsustatud", + "Write a text that you want the assistant to simplify" : "Sisesta tekst, mille Abiline peaks tegema lihtsamaks", + "Simplified text" : "Lihtsustatud tekst", + "The simplified text" : "Lihtsustatud tekst", + "Summarize" : "Teksti kokkuvõte", + "Summarizes a text" : "Sisendina antud tekstist tehakse kokkuvõte", + "The original text to summarize" : "Algme tekst, millest peaks tegema kokkuvõtte", "Summary" : "Kokkuvõte", + "The generated summary" : "Koostatud kokkuvõte", + "Extract topics" : "Teemade esiletoomine", + "Extracts topics from a text and outputs them separated by commas" : "Sisendina antud tekstist leitakse teemad, mis väljastatakse komadega eraldatud loendina", + "The original text to extract topics from" : "Lähtetekst, millest teemad tuvastatakse", + "Topics" : "Teemad", + "The list of extracted topics" : "Tuvastatud teemade loend", "Translate" : "Tõlgi", "Translate text from one language to another" : "Tõlgi teksti ühest keelest teise", "Origin text" : "Lähtetekst", diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json index d0d0451b338..b8e16d36993 100644 --- a/lib/l10n/et_EE.json +++ b/lib/l10n/et_EE.json @@ -28,14 +28,14 @@ "%sbit or higher PHP required." : "Vajalik on %s-bitine või parem PHP versioon.", "The following architectures are supported: %s" : "Toetatud on järgnevad arhitektuurid: %s", "The following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leitud", - "The library %s is not available." : "Teek %s pole saadaval.", + "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leidu", + "The library %s is not available." : " %s teek pole saadaval.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek suurema versiooniga kui %2$s - hetkel on versioon %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek väiksema versiooniga kui %2$s - hetkel on versioon %3$s.", "The following platforms are supported: %s" : "Toetatud on järgmised platvormid: %s", "Server version %s or higher is required." : "Nõutav on serveri versioon %s või suurem.", "Server version %s or lower is required." : "Serveri versioon %s või madalam on nõutav.", - "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õiguse selle seadustuse muutmiseks", + "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õigust selle seadustuse muutmiseks", "Your current IP address doesn't allow you to perform admin actions" : "Sinu praeguselt e-posti aadressilt ei saa teha haldustoiminguid", "Logged in account must be an admin or sub admin" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige", "Logged in account must be an admin" : "Sisselogitud kasutajakonto peab olema peakasutajate grupi liige", @@ -158,6 +158,7 @@ "PostgreSQL Login and/or password not valid" : "PostgreSQLi andmebaasi kasutajatunnus ja/või salasõna pole õiged", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk!" : "Mac OS X ei ole toetatud ja %s ei pruugi korralikult toimida sellel platvormil. Kasuta seda omal vastutusel!", "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Tundub, et %s server töötab 32-bitises PHP käituskeskkonnas ja „open_basedir“ on php.ini failis seadistatud. Kui failide suurus on üle 4 GB, siis võib tekkida probleeme ning antud lahenduse kasutamist me ei soovita.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Palun eemalda oma serveri seadistustest php.ini failist „open_basedir“ seadistus või võta kasutusele 64-bitisel platvormil põhinev PHP versioon.", "Set an admin Login." : "Lisa peakasutaja kasutajanimi.", "Set an admin password." : "Lisa peakasutaja salasõna.", @@ -212,6 +213,7 @@ "Group \"%s\" does not exist" : "„%s“ gruppi pole olemas", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "The requested share comes from a disabled user" : "Soovitud jaosmeedia on loonud blokeeritud kasutaja", + "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Kuna kasutajate arvu ülempiir on käes, siis uus kasutaja jäi lisamata. Lisateavet leiad oma teavitustest.", "Could not find category \"%s\"" : "Ei leia kategooriat „%s“", "Input text" : "Sisendtekst", "The input text" : "Sisendtekst", @@ -384,6 +386,8 @@ "Output speech" : "Kõneväljund", "The generated speech" : "Koostatud kõne", "Describe a task that you want the assistant to do or ask a question" : "Kirjelda seda, mida soovid Abilisele ülesandeks teha või lihtsalt küsi midagi.", + "Generated reply" : "Koostatud vastus", + "The generated text from the assistant" : "Abilise poolt koostatud tekst", "Change Tone" : "Teksti tooni muutmine", "Change the tone of a piece of text." : "Muuda antud teksti tonaalsust.", "Write a text that you want the assistant to rewrite in another tone." : "Kirjuta üles see, mille tonaalsust tahad Abilisel lasta ümber kirjutada.", @@ -397,6 +401,9 @@ "The generated response as part of the conversation" : "Loodud vastus vestluse osana", "Formalize text" : "Muuda tekst ametlikuks", "Takes a text and makes it sound more formal" : "Sisestatud teksti vormistamine ametlikuna", + "Write a text that you want the assistant to formalize" : "Sisesta tekst, mille Abiline peaks tegema ametlikumaks", + "Formalized text" : "Ametlikus vormis tekst", + "The formalized text" : "Mitteametlikus vormis tekst", "Generate a headline" : "Alapealkirja loomine", "Generates a possible headline for a text." : "Võimaldab luua teksti põhjal kokkuvõtliku alapealkirja.", "Original text" : "Lähtetekst", @@ -408,7 +415,26 @@ "The text to proofread" : "Keelekorrektuuri vajav tekst", "Corrections" : "Korrektuuris tehtud parandused", "The corrections that should be made in your text" : "Korrektuuris tehtud parandused, mis peaks sinu teksti lisanduma", + "Reformulate text" : "Teksti sõnastuse mutmine", + "Takes a text and reformulates it" : "Sisendina antud tekst saab ümbersõnastatud", + "Write a text that you want the assistant to reformulate" : "Sisesta tekst, mille Abiline peaks ümbersõnastama", + "Reformulated text" : "Ümbersõnastatud tekst", + "The reformulated text, written by the assistant" : "Abilise poolt ümbersõnastatud tekst", + "Simplify text" : "Teksti lihtsustamine", + "Takes a text and simplifies it" : "Sisendina antud tekst saab lihtsustatud", + "Write a text that you want the assistant to simplify" : "Sisesta tekst, mille Abiline peaks tegema lihtsamaks", + "Simplified text" : "Lihtsustatud tekst", + "The simplified text" : "Lihtsustatud tekst", + "Summarize" : "Teksti kokkuvõte", + "Summarizes a text" : "Sisendina antud tekstist tehakse kokkuvõte", + "The original text to summarize" : "Algme tekst, millest peaks tegema kokkuvõtte", "Summary" : "Kokkuvõte", + "The generated summary" : "Koostatud kokkuvõte", + "Extract topics" : "Teemade esiletoomine", + "Extracts topics from a text and outputs them separated by commas" : "Sisendina antud tekstist leitakse teemad, mis väljastatakse komadega eraldatud loendina", + "The original text to extract topics from" : "Lähtetekst, millest teemad tuvastatakse", + "Topics" : "Teemad", + "The list of extracted topics" : "Tuvastatud teemade loend", "Translate" : "Tõlgi", "Translate text from one language to another" : "Tõlgi teksti ühest keelest teise", "Origin text" : "Lähtetekst", diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index edfe25a6362..3356ec5f0f2 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -371,10 +371,10 @@ OC.L10N.register( "Output images" : "Images de sortie", "The generated images" : "Les images générées", "Generate speech" : "Générer une synthèse vocale", - "Generate speech from a transcript" : "Générer la vocalisation à partir d'une transcription", - "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la vocalisation", - "Output speech" : "Sortie de la vocalisation", - "The generated speech" : "La vocalisation générée", + "Generate speech from a transcript" : "Générer synthèse vocale à partir d'une transcription", + "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la synthèse vocale", + "Output speech" : "Synthèse vocale", + "The generated speech" : "La synthèse vocale générée", "Free text to text prompt" : "Texte libre à texte libre", "Runs an arbitrary prompt through a language model that returns a reply" : "Exécute une commande arbitraire à l'aide d'un modèle linguistique qui génère une réponse", "Describe a task that you want the assistant to do or ask a question" : "Décrivez une tâche que vous voulez que l'assistant effectue ou posez une question", diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index 6f1edd70da2..4d7ac492a36 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -369,10 +369,10 @@ "Output images" : "Images de sortie", "The generated images" : "Les images générées", "Generate speech" : "Générer une synthèse vocale", - "Generate speech from a transcript" : "Générer la vocalisation à partir d'une transcription", - "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la vocalisation", - "Output speech" : "Sortie de la vocalisation", - "The generated speech" : "La vocalisation générée", + "Generate speech from a transcript" : "Générer synthèse vocale à partir d'une transcription", + "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la synthèse vocale", + "Output speech" : "Synthèse vocale", + "The generated speech" : "La synthèse vocale générée", "Free text to text prompt" : "Texte libre à texte libre", "Runs an arbitrary prompt through a language model that returns a reply" : "Exécute une commande arbitraire à l'aide d'un modèle linguistique qui génère une réponse", "Describe a task that you want the assistant to do or ask a question" : "Décrivez une tâche que vous voulez que l'assistant effectue ou posez une question", diff --git a/lib/l10n/sw.js b/lib/l10n/sw.js index adc3bc63473..9e10b43b403 100644 --- a/lib/l10n/sw.js +++ b/lib/l10n/sw.js @@ -8,12 +8,15 @@ OC.L10N.register( "View profile" : "Angalia wasifu", "Local time: %s" : "Muda wa kawaida: %s", "_%n year ago_::_%n years ago_" : ["%n year ago","%n years ago"], + "_%n hour ago_::_%n hours ago_" : ["%n hour ago","%n hours ago"], + "_%n minute ago_::_%n minutes ago_" : ["%n minute ago","%n minutes ago"], "seconds ago" : "sukunde zilizopita", "%1$s (renamed)" : "%1$s (iliyopew jina jipya)", "renamed file" : "Faili iliyopewa jina jipya", "Filenames must not end with \"%1$s\"." : "Majina ya faili hayapaswi kuishia na \"%1$s\"", "File already exists" : "Faili lipo tayari", "Templates" : "Violezo", + "Filename contains at least one invalid character" : "Filename contains at least one invalid character", "__language_name__" : "_lugha_jina_", "Apps" : "Maombi", "Settings" : "Mipangilio", diff --git a/lib/l10n/sw.json b/lib/l10n/sw.json index c576f37cabc..a645af4e6a8 100644 --- a/lib/l10n/sw.json +++ b/lib/l10n/sw.json @@ -6,12 +6,15 @@ "View profile" : "Angalia wasifu", "Local time: %s" : "Muda wa kawaida: %s", "_%n year ago_::_%n years ago_" : ["%n year ago","%n years ago"], + "_%n hour ago_::_%n hours ago_" : ["%n hour ago","%n hours ago"], + "_%n minute ago_::_%n minutes ago_" : ["%n minute ago","%n minutes ago"], "seconds ago" : "sukunde zilizopita", "%1$s (renamed)" : "%1$s (iliyopew jina jipya)", "renamed file" : "Faili iliyopewa jina jipya", "Filenames must not end with \"%1$s\"." : "Majina ya faili hayapaswi kuishia na \"%1$s\"", "File already exists" : "Faili lipo tayari", "Templates" : "Violezo", + "Filename contains at least one invalid character" : "Filename contains at least one invalid character", "__language_name__" : "_lugha_jina_", "Apps" : "Maombi", "Settings" : "Mipangilio", diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index e662cb8679a..7cc7467675c 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -14,6 +14,7 @@ use OC\Security\TrustedDomainHelper; use OCP\IConfig; use OCP\IRequest; use OCP\IRequestId; +use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\IpUtils; /** @@ -627,36 +628,46 @@ class Request implements \ArrayAccess, \Countable, IRequest { /** * Returns the server protocol. It respects one or more reverse proxies servers - * and load balancers + * and load balancers. Precedence: + * 1. `overwriteprotocol` config value + * 2. `X-Forwarded-Proto` header value + * 3. $_SERVER['HTTPS'] value + * If an invalid protocol is provided, defaults to http, continues, but logs as an error. + * * @return string Server protocol (http or https) */ public function getServerProtocol(): string { - if ($this->config->getSystemValueString('overwriteprotocol') !== '' - && $this->isOverwriteCondition()) { - return $this->config->getSystemValueString('overwriteprotocol'); - } + $proto = 'http'; - if ($this->fromTrustedProxy() && isset($this->server['HTTP_X_FORWARDED_PROTO'])) { + if ($this->config->getSystemValueString('overwriteprotocol') !== '' + && $this->isOverwriteCondition() + ) { + $proto = strtolower($this->config->getSystemValueString('overwriteprotocol')); + } elseif ($this->fromTrustedProxy() + && isset($this->server['HTTP_X_FORWARDED_PROTO']) + ) { if (str_contains($this->server['HTTP_X_FORWARDED_PROTO'], ',')) { $parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); $proto = strtolower(trim($parts[0])); } else { $proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); } - - // Verify that the protocol is always HTTP or HTTPS - // default to http if an invalid value is provided - return $proto === 'https' ? 'https' : 'http'; + } elseif (!empty($this->server['HTTPS']) + && $this->server['HTTPS'] !== 'off' + ) { + $proto = 'https'; } - if (isset($this->server['HTTPS']) - && $this->server['HTTPS'] !== null - && $this->server['HTTPS'] !== 'off' - && $this->server['HTTPS'] !== '') { - return 'https'; + if ($proto !== 'https' && $proto !== 'http') { + // log unrecognized value so admin has a chance to fix it + \OCP\Server::get(LoggerInterface::class)->critical( + 'Server protocol is malformed [falling back to http] (check overwriteprotocol and/or X-Forwarded-Proto to remedy): ' . $proto, + ['app' => 'core'] + ); } - return 'http'; + // default to http if provided an invalid value + return $proto === 'https' ? 'https' : 'http'; } /** @@ -743,11 +754,11 @@ class Request implements \ArrayAccess, \Countable, IRequest { } /** - * Get PathInfo from request + * Get PathInfo from request (rawurldecoded) * @throws \Exception * @return string|false Path info or false when not found */ - public function getPathInfo() { + public function getPathInfo(): string|false { $pathInfo = $this->getRawPathInfo(); return \Sabre\HTTP\decodePath($pathInfo); } diff --git a/lib/private/Files/Cache/CacheQueryBuilder.php b/lib/private/Files/Cache/CacheQueryBuilder.php index 5ae60ee80b6..5492452273b 100644 --- a/lib/private/Files/Cache/CacheQueryBuilder.php +++ b/lib/private/Files/Cache/CacheQueryBuilder.php @@ -28,7 +28,7 @@ class CacheQueryBuilder extends ExtendedQueryBuilder { public function selectTagUsage(): self { $this - ->select('systemtag.name', 'systemtag.id', 'systemtag.visibility', 'systemtag.editable', 'systemtag.etag') + ->select('systemtag.name', 'systemtag.id', 'systemtag.visibility', 'systemtag.editable', 'systemtag.etag', 'systemtag.color') ->selectAlias($this->createFunction('COUNT(filecache.fileid)'), 'number_files') ->selectAlias($this->createFunction('MAX(filecache.fileid)'), 'ref_file_id') ->from('filecache', 'filecache') diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php index 37ecd5779e6..b92c608a81d 100644 --- a/lib/private/Files/SetupManager.php +++ b/lib/private/Files/SetupManager.php @@ -292,7 +292,7 @@ class SetupManager { $mounts = array_filter($mounts, function (IMountPoint $mount) use ($previouslySetupProviders) { return !in_array($mount->getMountProvider(), $previouslySetupProviders); }); - $this->userMountCache->registerMounts($user, $mounts, $newProviders); + $this->registerMounts($user, $mounts, $newProviders); $cacheDuration = $this->config->getSystemValueInt('fs_mount_cache_duration', 5 * 60); if ($cacheDuration > 0) { @@ -457,7 +457,7 @@ class SetupManager { } if (count($mounts)) { - $this->userMountCache->registerMounts($user, $mounts, $currentProviders); + $this->registerMounts($user, $mounts, $currentProviders); $this->setupForUserWith($user, function () use ($mounts) { array_walk($mounts, [$this->mountManager, 'addMount']); }); @@ -528,7 +528,7 @@ class SetupManager { $mounts = $this->mountProviderCollection->getUserMountsForProviderClasses($user, $providers); } - $this->userMountCache->registerMounts($user, $mounts, $providers); + $this->registerMounts($user, $mounts, $providers); $this->setupForUserWith($user, function () use ($mounts) { array_walk($mounts, [$this->mountManager, 'addMount']); }); @@ -600,4 +600,10 @@ class SetupManager { }); } } + + private function registerMounts(IUser $user, array $mounts, ?array $mountProviderClasses = null): void { + if ($this->lockdownManager->canAccessFilesystem()) { + $this->userMountCache->registerMounts($user, $mounts, $mountProviderClasses); + } + } } diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index afd8f87e2de..2d166b5438d 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -116,7 +116,7 @@ class DAV extends Common { // inject mock for testing $this->certManager = \OC::$server->getCertificateManager(); } - $this->root = $parameters['root'] ?? '/'; + $this->root = rawurldecode($parameters['root'] ?? '/'); $this->root = '/' . ltrim($this->root, '/'); $this->root = rtrim($this->root, '/') . '/'; } else { @@ -191,7 +191,7 @@ class DAV extends Common { if ($this->secure) { $baseUri .= 's'; } - $baseUri .= '://' . $this->host . $this->root; + $baseUri .= '://' . $this->host . $this->encodePath($this->root); return $baseUri; } diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index e9ed351b27b..576cb66b3cf 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -205,7 +205,10 @@ class Scanner extends PublicEmitter { foreach (['', 'files'] as $path) { if (!$storage->isCreatable($path)) { $fullPath = $storage->getSourcePath($path); - if (!$storage->is_dir($path) && $storage->getCache()->inCache($path)) { + if (isset($mounts[$mount->getMountPoint() . $path . '/'])) { + // /<user>/files is overwritten by a mountpoint, so this check is irrelevant + break; + } elseif (!$storage->is_dir($path) && $storage->getCache()->inCache($path)) { throw new NotFoundException("User folder $fullPath exists in cache but not on disk"); } elseif ($storage->is_dir($path)) { $ownerUid = fileowner($fullPath); @@ -213,9 +216,6 @@ class Scanner extends PublicEmitter { $owner = $owner['name'] ?? $ownerUid; $permissions = decoct(fileperms($fullPath)); throw new ForbiddenException("User folder $fullPath is not writable, folders is owned by $owner and has mode $permissions"); - } elseif (isset($mounts[$mount->getMountPoint() . $path . '/'])) { - // /<user>/files is overwritten by a mountpoint, so this check is irrelevant - break; } else { // if the root exists in neither the cache nor the storage the user isn't setup yet break 2; diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index ec4ce040090..8f6294faa66 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -77,7 +77,6 @@ abstract class AbstractDatabase { $this->config->setValues([ 'dbname' => $dbName, 'dbhost' => $dbHost, - 'dbport' => $dbPort, 'dbtableprefix' => $dbTablePrefix, ]); diff --git a/lib/public/Calendar/ICreateFromString.php b/lib/public/Calendar/ICreateFromString.php index 5badaa2d4cf..2bb0f2ffa20 100644 --- a/lib/public/Calendar/ICreateFromString.php +++ b/lib/public/Calendar/ICreateFromString.php @@ -17,9 +17,31 @@ use OCP\Calendar\Exceptions\CalendarException; */ interface ICreateFromString extends ICalendar { /** - * @since 23.0.0 + * Create an event in this calendar from an ICS string. + * + * @param string $name the file name - needs to contain the .ics ending + * @param string $calendarData a string containing a valid VEVENT ics * * @throws CalendarException + * + * @since 23.0.0 + * */ public function createFromString(string $name, string $calendarData): void; + + /** + * Create an event in this calendar from an ICS string using a minimal CalDAV server. + * Usually, the createFromString() method should be preferred. + * + * However, in some cases it is useful to not set up a full CalDAV server. + * Missing features include no iMIP plugin, no invitation emails amongst others. + * + * @param string $name the file name - needs to contain the .ics ending + * @param string $calendarData a string containing a valid VEVENT ics + * + * @throws CalendarException + * + * @since 32.0.0 + */ + public function createFromStringMinimal(string $name, string $calendarData): void; } |