Merge branch '1.5.x' into chore-deploy-dotnet

This commit is contained in:
Jake Barnby 2024-07-03 14:05:48 +12:00 committed by GitHub
commit 04ae166e54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
125 changed files with 55191 additions and 783 deletions

View file

@ -145,3 +145,6 @@ jobs:
- name: Run ${{matrix.service}} Tests
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
- name: Run ${{matrix.service}} Shared Tables Tests
run: _APP_DATABASE_SHARED_TABLES=database_db_main docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug

2
.gitmodules vendored
View file

@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 4.3.5
branch = 4.3.14

View file

@ -1,3 +1,37 @@
# Version 1.5.8
## What's Changed
### Notable changes
* Support Twilio messaging service SID in [8222](https://github.com/appwrite/appwrite/pull/8222)
* Improve cache performance in [8230](https://github.com/appwrite/appwrite/pull/8230)
* Add hk in translations in [8179](https://github.com/appwrite/appwrite/pull/8179)
* Bump console to version 4.3.14 in [8321](https://github.com/appwrite/appwrite/pull/8321)
* Update pwd abuse in [8255](https://github.com/appwrite/appwrite/pull/8255)
### Fixes
* Ensure usage is counted for errors in [8120](https://github.com/appwrite/appwrite/pull/8120)
* Fix MFA for OAuth2 only accounts in [8245](https://github.com/appwrite/appwrite/pull/8245)
* Delete Expired Targets Per Project in [8239](https://github.com/appwrite/appwrite/pull/8239)
* Don't set the target field if the existing target document is false in [8236](https://github.com/appwrite/appwrite/pull/8236)
* Disable validation for project DBs during migration in [8298](https://github.com/appwrite/appwrite/pull/8298)
* Add `default` to Collection Attributes in Migration in [8271](https://github.com/appwrite/appwrite/pull/8271)
* Fix Create bucket endpoint validator for maximum file size in [8275](https://github.com/appwrite/appwrite/pull/8275)
* Disable validation for subquery to prevent error in [8297](https://github.com/appwrite/appwrite/pull/8297)
* Fix 'Missing required attribute "expire"' on `users.createSession()` in [8308](https://github.com/appwrite/appwrite/pull/8308)
### Miscellaneous
* Bump base image from 0.9.0 to 0.9.1 in [8238](https://github.com/appwrite/appwrite/pull/8238)
* Use latest Platform and add Core module in [7936](https://github.com/appwrite/appwrite/pull/7936)
* Add Test to Validate Headers aren't Overridden in [8228](https://github.com/appwrite/appwrite/pull/8228)
* Fix hyperlink in storage docs in [8269](https://github.com/appwrite/appwrite/pull/8269)
* Update cache & database in [8285](https://github.com/appwrite/appwrite/pull/8285)
* Fix flaky certificate test in [8316](https://github.com/appwrite/appwrite/pull/8316)
* Fix flaky function test in [8317](https://github.com/appwrite/appwrite/pull/8317)
# Version 1.5.7
## What's Changed

View file

@ -67,7 +67,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
### Windows
@ -79,7 +79,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
#### PowerShell
@ -89,7 +89,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。

View file

@ -75,7 +75,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
### Windows
@ -87,7 +87,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
#### PowerShell
@ -97,7 +97,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.

View file

@ -109,7 +109,7 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
if (isset($databases[$dsn->getHost()])) {
$database = $databases[$dsn->getHost()];
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
@ -133,7 +133,7 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
$databases[$dsn->getHost()] = $database;
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
@ -202,7 +202,7 @@ CLI::setResource('logError', function (Registry $register) {
}, ['register']);
$platform = new Appwrite();
$platform->init(Service::TYPE_CLI);
$platform->init(Service::TYPE_TASK);
$cli = $platform->getCli();

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasië",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "غرينادا",
"countries.gt": "غواتيمالا",
"countries.gy": "غيانا",
"countries.hk": "هونغ كونغ",
"countries.hn": "هندوراس",
"countries.hr": "كرواتيا",
"countries.ht": "هايتي",

View file

@ -100,6 +100,7 @@
"countries.gd": "গ্ৰেনাডা",
"countries.gt": "গুয়াতেমালা",
"countries.gy": "গায়ানা",
"countries.hk": "হং কং",
"countries.hn": "হণ্ডুৰাছ",
"countries.hr": "ক্ৰোৱেছিয়া",
"countries.ht": "হাইতি",

View file

@ -100,6 +100,7 @@
"countries.gd": "Qrenada",
"countries.gt": "Qvatemala",
"countries.gy": "Guyana",
"countries.hk": "Honq Konq",
"countries.hn": "Honduras",
"countries.hr": "Xorvatiya",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Грэнада",
"countries.gt": "Гватэмала",
"countries.gy": "Гаяна",
"countries.hk": "Гонконг",
"countries.hn": "Гандурас",
"countries.hr": "Харватыя",
"countries.ht": "Гаіці",

View file

@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гвиана",
"countries.hk": "Хонг Конг",
"countries.hn": "Хондурас",
"countries.hr": "Хърватия",
"countries.ht": "Хаити",

View file

@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गयाना",
"countries.hk": "हांगकांग",
"countries.hn": "होंडुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",

View file

@ -100,6 +100,7 @@
"countries.gd": "গ্রেনাডা",
"countries.gt": "গুয়াতেমালা",
"countries.gy": "গায়ানা",
"countries.hk": "হংকং",
"countries.hn": "হন্ডুরাস",
"countries.hr": "ক্রোয়েশিয়া",
"countries.ht": "হাইতি",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvatska",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guaiana",
"countries.hk": "Hong Kong",
"countries.hn": "Hondures",
"countries.hr": "Croàcia",
"countries.ht": "Haití",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Chorvatsko",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Γρενάδα",
"countries.gt": "Γουατεμάλα",
"countries.gy": "Γουιάνα",
"countries.hk": "Χονγκ Κονγκ",
"countries.hn": "Ονδούρα",
"countries.hr": "Κροατία",
"countries.ht": "Αϊτή",

View file

@ -117,6 +117,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",

View file

@ -99,6 +99,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guayana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croacia",
"countries.ht": "Haití",

View file

@ -100,6 +100,7 @@
"countries.gd": "گرنادا",
"countries.gt": "گواتمالا",
"countries.gy": "گویان",
"countries.hk": "هنگ کنگ",
"countries.hn": "هندوراس",
"countries.hr": "کرواسی",
"countries.ht": "هائیتی",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Gujana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenade",
"countries.gt": "Guatemala",
"countries.gy": "Guyane",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatie",
"countries.ht": "Haïti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Greanáda",
"countries.gt": "Guatamala",
"countries.gy": "An Ghuáin",
"countries.hk": "Hong Kong",
"countries.hn": "Hondúras",
"countries.hr": "An Chróit",
"countries.ht": "Háítí",

View file

@ -100,6 +100,7 @@
"countries.gd": "ગ્રેનાડા",
"countries.gt": "ગ્વાટેમાલા",
"countries.gy": "ગુયાના",
"countries.hk": "હોંગ કોંગ",
"countries.hn": "હોન્ડુરાસ",
"countries.hr": "ક્રોએશિયા",
"countries.ht": "હૈતી",

View file

@ -100,6 +100,7 @@
"countries.gd": "גרנדה",
"countries.gt": "גואטמלה",
"countries.gy": "גיאנה",
"countries.hk": "הונג קונג",
"countries.hn": "הונדורס",
"countries.hr": "קרואטיה",
"countries.ht": "האיטי",

View file

@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गयाना",
"countries.hk": "हांग कांग",
"countries.hn": "होंडुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvatska",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Horvátország",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Գրենադա",
"countries.gt": "Գվատեմալա",
"countries.gy": "Գայանա",
"countries.hk": "Հոնգ Կոնգ",
"countries.hn": "Գոնդուրաս",
"countries.hr": "Խորվաթիա",
"countries.ht": "Հաիթի",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Hondúras",
"countries.hr": "Króatía",
"countries.ht": "Haítí",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croazia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "グレナダ",
"countries.gt": "グアテマラ",
"countries.gy": "ガイアナ",
"countries.hk": "香港",
"countries.hn": "ホンジュラス",
"countries.hr": "クロアチア",
"countries.ht": "ハイチ",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "ហ្គ្រេណាដា",
"countries.gt": "ហ្គាតេម៉ាឡា",
"countries.gy": "ហ្គីយ៉ាណា",
"countries.hk": "ហុងកុង",
"countries.hn": "ហុងឌូរ៉ាស",
"countries.hr": "ក្រូអាត",
"countries.ht": "ហៃទី",

View file

@ -100,6 +100,7 @@
"countries.gd": "ಗ್ರೆನಡಾ",
"countries.gt": "ಗ್ವಾಟೆಮಾಲಾ",
"countries.gy": "ಗಯಾನಾ",
"countries.hk": "ಹಾಂಗ್ ಕಾಂಗ್",
"countries.hn": "ಹೊಂಡುರಾಸ್",
"countries.hr": "ಕ್ರೊಯೇಷಿಯಾ",
"countries.ht": "ಹೈಟಿ",

View file

@ -100,6 +100,7 @@
"countries.gd": "그레나다",
"countries.gt": "과테말라",
"countries.gy": "기아나",
"countries.hk": "홍콩",
"countries.hn": "온두라스",
"countries.hr": "크로아티아",
"countries.ht": "아이티",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
@ -250,4 +251,4 @@
"emails.certificate.thanks": "Gratias",
"emails.certificate.signature": "team {{project}}",
"sms.verification.body": "{{secret}}"
}
}

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gajana",
"countries.hk": "Honkongas",
"countries.hn": "Hondūras",
"countries.hr": "Kroatija",
"countries.ht": "Haitis",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gajāna",
"countries.hk": "Honkonga",
"countries.hn": "Hondurasa",
"countries.hr": "Horvātija",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "ഗ്രെനാഡ",
"countries.gt": "ഗ്വാട്ടിമാല",
"countries.gy": "ഗയാന",
"countries.hk": "ഹോങ്കോങ്",
"countries.hn": "ഹോണ്ടുറാസ്",
"countries.hr": "ക്രോയേഷ്യ",
"countries.ht": "ഹെയ്തി",

View file

@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हाँगकांग",
"countries.hn": "होंडुरास",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",

View file

@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "ग्रेनेडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हाँगकाँग",
"countries.hn": "होन्डुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Croatië",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "ଗ୍ରେନାଡା",
"countries.gt": "ଗୁଆଟେମାଲା",
"countries.gy": "ଗୁଇନ୍ଦା",
"countries.hk": "ହଂ କଙ୍ଗ",
"countries.hn": "ହୋଣ୍ଡୁରାସ୍",
"countries.hr": "କ୍ରୋଏସିଆ",
"countries.ht": "ହାଇତି",

View file

@ -100,6 +100,7 @@
"countries.gd": "ਗ੍ਰੇਨਾਡਾ",
"countries.gt": "ਗੁਆਟੇਮਾਲਾ",
"countries.gy": "ਗੇਆਨਾ",
"countries.hk": "ਹਾਂਗ ਕਾਂਗ",
"countries.hn": "ਹੌਂਡੂਰਸ",
"countries.hr": "ਕਰੋਸ਼ੀਆ",
"countries.ht": "ਹੈਤੀ",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gwatemala",
"countries.gy": "Gujana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Chorwacja",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guiana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croácia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guiana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croácia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croația",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гайана",
"countries.hk": "Гонконг",
"countries.hn": "Гондурас",
"countries.hr": "Хорватия",
"countries.ht": "Гаити",

View file

@ -100,6 +100,7 @@
"countries.gd": "ग्रेनेडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हांगकांग",
"countries.hn": "होंडुरस्‌",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",

View file

@ -100,6 +100,7 @@
"countries.gd": "گرينڊا",
"countries.gt": "گٽيمالا",
"countries.gy": "گيانا",
"countries.hk": "هانگ کانگ",
"countries.hn": "هونڊرس",
"countries.hr": "ڪوريٽيا",
"countries.ht": "هيٽي",

View file

@ -100,6 +100,7 @@
"countries.gd": "ග්‍රෙනාඩා",
"countries.gt": "ග්වාතමාලාව",
"countries.gy": "ගයනා",
"countries.hk": "හොංකොං",
"countries.hn": "හොන්ඩුරාස්",
"countries.hr": "ක්‍රොඒෂියාව",
"countries.ht": "හයිටි",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Chorvátsko",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvaška",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroacia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "கிரெனடா",
"countries.gt": "குவாத்தமாலா",
"countries.gy": "கயானா",
"countries.hk": "ஹாங்காங்",
"countries.hn": "ஹொண்டூராஸ்",
"countries.hr": "குரோவாசியா",
"countries.ht": "ஹைத்தி",

View file

@ -100,6 +100,7 @@
"countries.gd": "గ్రెనడా",
"countries.gt": "గ్వాటెమాల",
"countries.gy": "గయానా",
"countries.hk": "హాంగ్ కొంగ",
"countries.hn": "హోండురాస్",
"countries.hr": "క్రొయేషియా",
"countries.ht": "హైతీ",

View file

@ -100,6 +100,7 @@
"countries.gd": "เกรเนดา",
"countries.gt": "กัวเตมาลา",
"countries.gy": "กายอานา",
"countries.hk": "ฮ่องกง",
"countries.hn": "ฮอนดูรัส",
"countries.hr": "โครเอเชีย",
"countries.ht": "ไฮติ",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guwatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasya",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hırvatistan",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гайана",
"countries.hk": "Гонконг",
"countries.hn": "Гондурас",
"countries.hr": "Хорватія",
"countries.ht": "Гаїті",

View file

@ -100,6 +100,7 @@
"countries.gd": "گریناڈا",
"countries.gt": "گوئٹے مالا",
"countries.gy": "گیانا",
"countries.hk": "ہانگ کانگ",
"countries.hn": "ہونڈوراس",
"countries.hr": "کروشیا",
"countries.ht": "ہیٹی",

View file

@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",

View file

@ -100,6 +100,7 @@
"countries.gd": "格林纳达",
"countries.gt": "危地马拉",
"countries.gy": "圭亚那",
"countries.hk": "香港",
"countries.hn": "洪都拉斯",
"countries.hr": "克罗地亚",
"countries.ht": "海地",

View file

@ -100,6 +100,7 @@
"countries.gd": "格瑞那達",
"countries.gt": "瓜地馬拉",
"countries.gy": "蓋亞那",
"countries.hk": "香港",
"countries.hn": "宏都拉斯",
"countries.hr": "克羅埃西亞",
"countries.ht": "海地",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -450,7 +450,7 @@ return [
],
[
'name' => '_APP_SMS_FROM',
'description' => 'Phone number used for sending out messages. Must start with a leading \'+\' and maximum of 15 digits without spaces (+123456789).',
'description' => 'Phone number used for sending out messages. If using Twilio, this may be a Messaging Service SID, starting with MG. Otherwise, the number must start with a leading \'+\' and maximum of 15 digits without spaces (+123456789). ',
'introduction' => '0.15.0',
'default' => '',
'required' => false,

@ -1 +1 @@
Subproject commit 5169fe16d63066f64ab5013c78953aea04e24b53
Subproject commit 412bc3331891c15ba7baf4f445e82ac3a678c6be

View file

@ -290,7 +290,9 @@ App::post('/v1/account')
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$email]),
]);
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
if($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
$dbForProject->purgeCachedDocument('users', $user->getId());
@ -2524,6 +2526,7 @@ App::patch('/v1/account/password')
->label('sdk.response.model', Response::MODEL_USER)
->label('sdk.offline.model', '/account')
->label('sdk.offline.key', 'current')
->label('abuse-limit', 10)
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
->inject('requestTimestamp')

View file

@ -852,7 +852,7 @@ App::get('/v1/health/queue/failed/:name')
Event::FUNCTIONS_QUEUE_NAME,
Event::USAGE_QUEUE_NAME,
Event::USAGE_DUMP_QUEUE_NAME,
Event::WEBHOOK_CLASS_NAME,
Event::WEBHOOK_QUEUE_NAME,
Event::CERTIFICATES_QUEUE_NAME,
Event::BUILDS_QUEUE_NAME,
Event::MESSAGING_QUEUE_NAME,

View file

@ -111,35 +111,8 @@ App::post('/v1/projects')
$projectId = ($projectId == 'unique()') ? ID::unique() : $projectId;
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '05:00'];
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '02:00'];
$databases = Config::getParam('pools-database', []);
/**
* Remove databases from the list that are currently undergoing an backup
*/
if (count($databases) > 1) {
$now = new \DateTime();
foreach ($databases as $index => $database) {
if (empty($backups[$database])) {
continue;
}
$backup = $backups[$database];
$from = \DateTime::createFromFormat('H:i', $backup['from']);
$to = \DateTime::createFromFormat('H:i', $backup['to']);
if ($now >= $from && $now <= $to) {
unset($databases[$index]);
break;
}
}
}
$databaseOverride = System::getEnv('_APP_DATABASE_OVERRIDE');
$index = \array_search($databaseOverride, $databases);
if ($index !== false) {
@ -152,37 +125,12 @@ App::post('/v1/projects')
throw new Exception(Exception::PROJECT_RESERVED_PROJECT, "'console' is a reserved project.");
}
// TODO: 1 in 5 projects use shared tables. Temporary until all projects are using shared tables.
if (
(
!\mt_rand(0, 4)
&& System::getEnv('_APP_DATABASE_SHARED_TABLES', 'enabled') === 'enabled'
&& System::getEnv('_APP_EDITION', 'self-hosted') !== 'self-hosted'
) ||
(
$dsn === DATABASE_SHARED_TABLES
)
) {
// TODO: Temporary until all projects are using shared tables.
if ($dsn === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$schema = 'appwrite';
$database = 'appwrite';
$namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', '');
$dsn = $schema . '://' . DATABASE_SHARED_TABLES . '?database=' . $database;
if (!empty($namespace)) {
$dsn .= '&namespace=' . $namespace;
}
}
// TODO: Allow overriding in development mode. Temporary until all projects are using shared tables.
if (
App::isDevelopment()
&& System::getEnv('_APP_EDITION', 'self-hosted') !== 'self-hosted'
&& $request->getHeader('x-appwrited-share-tables', false)
) {
$schema = 'appwrite';
$database = 'appwrite';
$namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', '');
$dsn = $schema . '://' . DATABASE_SHARED_TABLES . '?database=' . $database;
$dsn = $schema . '://' . System::getEnv('_APP_DATABASE_SHARED_TABLES', '') . '?database=' . $database;
if (!empty($namespace)) {
$dsn .= '&namespace=' . $namespace;
@ -236,7 +184,7 @@ App::post('/v1/projects')
$adapter = $pools->get($dsn->getHost())->pop()->getResource();
$dbForProject = new Database($adapter, $cache);
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$dbForProject
->setSharedTables(true)
->setTenant($project->getInternalId())

View file

@ -63,7 +63,7 @@ App::post('/v1/storage/buckets')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true)
->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024 * 1024), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan'])
->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan'])
->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true)
->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true)
@ -240,7 +240,7 @@ App::put('/v1/storage/buckets/:bucketId')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true)
->param('maximumFileSize', null, new Range(1, (int) System::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human((int)System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true)
->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan'])
->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true)
->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true)
@ -351,7 +351,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
->label('sdk.response.model', Response::MODEL_FILE)
->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).')
->param('fileId', '', new CustomId(), 'File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('file', [], new File(), 'Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/storage#file-input).', skipValidation: true)
->param('file', [], new File(), 'Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).', skipValidation: true)
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->inject('request')
->inject('response')

View file

@ -138,7 +138,9 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$email]),
]);
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
if($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
}
@ -160,7 +162,9 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$phone]),
]);
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
if($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
}
@ -1780,7 +1784,7 @@ App::post('/v1/users/:userId/sessions')
throw new Exception(Exception::USER_NOT_FOUND);
}
$secret = Auth::codeGenerator();
$secret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_SESSION);
$detector = new Detector($request->getUserAgent('UNKNOWN'));
$record = $geodb->get($request->getIP());
@ -1797,6 +1801,7 @@ App::post('/v1/users/:userId/sessions')
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
'expire' => $expire,
],
$detector->getOS(),
$detector->getClient(),
@ -1808,7 +1813,6 @@ App::post('/v1/users/:userId/sessions')
$session = $dbForProject->createDocument('sessions', $session);
$session
->setAttribute('secret', $secret)
->setAttribute('expire', $expire)
->setAttribute('countryName', $countryName);
$queueForEvents

View file

@ -2,6 +2,7 @@
require_once __DIR__ . '/../init.php';
use Appwrite\Auth\Auth;
use Appwrite\Event\Certificate;
use Appwrite\Event\Event;
use Appwrite\Event\Usage;
@ -583,7 +584,7 @@ App::init()
->addHeader('Server', 'Appwrite')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-Appwrite-Shared-Tables, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Forwarded-For, X-Forwarded-User-Agent')
->addHeader('Access-Control-Expose-Headers', 'X-Appwrite-Session, X-Fallback-Cookies')
->addHeader('Access-Control-Allow-Origin', $refDomain)
->addHeader('Access-Control-Allow-Credentials', 'true');
@ -634,7 +635,7 @@ App::options()
$response
->addHeader('Server', 'Appwrite')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-Appwrite-Shared-Tables, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent')
->addHeader('Access-Control-Expose-Headers', 'X-Appwrite-Session, X-Fallback-Cookies')
->addHeader('Access-Control-Allow-Origin', $origin)
->addHeader('Access-Control-Allow-Credentials', 'true')
@ -649,7 +650,8 @@ App::error()
->inject('project')
->inject('logger')
->inject('log')
->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log) {
->inject('queueForUsage')
->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log, Usage $queueForUsage) {
$version = System::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->getRoute();
$class = \get_class($error);
@ -738,6 +740,26 @@ App::error()
}
}
if ($publish && $project->getId() !== 'console') {
if (!Auth::isPrivilegedUser(Authorization::getRoles())) {
$fileSize = 0;
$file = $request->getFiles('file');
if (!empty($file)) {
$fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size'];
}
$queueForUsage
->addMetric(METRIC_NETWORK_REQUESTS, 1)
->addMetric(METRIC_NETWORK_INBOUND, $request->getSize() + $fileSize)
->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize());
}
$queueForUsage
->setProject($project)
->trigger();
}
if ($logger && $publish) {
try {
/** @var Utopia\Database\Document $user */

View file

@ -462,7 +462,12 @@ App::init()
->setContentType($cacheLog->getAttribute('mimeType'))
->send($data);
} else {
$response->addHeader('X-Appwrite-Cache', 'miss');
$response
->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate')
->addHeader('Pragma', 'no-cache')
->addHeader('Expires', 0)
->addHeader('X-Appwrite-Cache', 'miss')
;
}
}
});

View file

@ -112,8 +112,8 @@ const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return
const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 443;
const APP_VERSION_STABLE = '1.5.7';
const APP_CACHE_BUSTER = 4314;
const APP_VERSION_STABLE = '1.5.8';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
@ -143,9 +143,6 @@ const APP_SOCIAL_STACKSHARE = 'https://stackshare.io/appwrite';
const APP_SOCIAL_YOUTUBE = 'https://www.youtube.com/c/appwrite?sub_confirmation=1';
const APP_HOSTNAME_INTERNAL = 'appwrite';
// Databases
const DATABASE_SHARED_TABLES = 'database_db_fra1_self_hosted_16_0';
// Database Reconnect
const DATABASE_RECONNECT_SLEEP = 2;
const DATABASE_RECONNECT_MAX_ATTEMPTS = 10;
@ -610,9 +607,9 @@ Database::addFilter(
])
));
if (\count($targetIds) > 0) {
return $database->find('targets', [
return $database->skipValidation(fn () => $database->find('targets', [
Query::equal('$internalId', $targetIds)
]);
]));
}
return [];
}
@ -1338,7 +1335,7 @@ App::setResource('dbForProject', function (Group $pools, Database $dbForConsole,
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
@ -1391,7 +1388,7 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
->setMetadata('project', $project->getId())
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS);
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())

View file

@ -92,7 +92,7 @@ if (!function_exists("getProjectDB")) {
$database = new Database($adapter, getCache());
if ($dsn->getHost() === DATABASE_SHARED_TABLES) {
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())

Some files were not shown because too many files have changed in this diff Show more