diff --git a/CHANGES.md b/CHANGES.md
index a822b68e70..1a113056cc 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,34 @@
-# Version DEV (NOT RELEASED YET)
+# Version 0.8.0 (Not Released Yet)
## Features
- Added Anonymous Login ([RFC-010](https://github.com/appwrite/rfc/blob/main/010-anonymous-login.md))
- Added new Environment Variable to enable or disable Anonymous Login
+# Version 0.7.1 (Not Released Yet)
+
+## Features
+
+- Added option for Redis authentication
+- Force adding a security email on setup
+- Better error logs on appwrite cretificates worker## Upgrades
+- SMTP is now disabled by default, no dummy SMTP is included in setup
+
+## Upgrades
+
+- Upgraded redis extenstion lib to version 5.3.3
+- Upgraded maxmind extenstion lib to version 1.10.0
+- Upgraded utopia-php/cli lib to version 0.10.0
+- Upgraded matomo/device-detector lib to version 4.1.0
+- Upgraded dragonmantank/cron-expression lib to version 3.1.0
+- Upgraded influxdb/influxdb-php lib to version 1.15.2
+- Upgraded phpmailer/phpmailer lib to version 6.3.0
+- Upgraded adhocore/jwt lib to version 1.1.2
+
+## Bug Fixes
+
+- Updated missing storage env vars
+
# Version 0.7.0
## Features
diff --git a/Dockerfile b/Dockerfile
index c7316bd1d4..7cd404b7ae 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,9 +14,9 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
FROM php:7.4-cli-alpine as step1
-ENV PHP_REDIS_VERSION=5.3.0 \
+ENV PHP_REDIS_VERSION=5.3.3 \
PHP_SWOOLE_VERSION=v4.5.8 \
- PHP_MAXMINDDB_VERSION=v1.8.0 \
+ PHP_MAXMINDDB_VERSION=v1.10.0 \
PHP_XDEBUG_VERSION=sdebug_2_9-beta
RUN \
@@ -90,8 +90,11 @@ ENV _APP_SERVER=swoole \
_APP_INFLUXDB_PORT=8086 \
_APP_STATSD_HOST=telegraf \
_APP_STATSD_PORT=8125 \
- _APP_SMTP_HOST=smtp \
- _APP_SMTP_PORT=25 \
+ _APP_SMTP_HOST= \
+ _APP_SMTP_PORT= \
+ _APP_SMTP_SECURE= \
+ _APP_SMTP_USERNAME= \
+ _APP_SMTP_PASSWORD= \
_APP_FUNCTIONS_TIMEOUT=900 \
_APP_FUNCTIONS_CONTAINERS=10 \
_APP_FUNCTIONS_CPUS=1 \
@@ -106,9 +109,6 @@ ENV _APP_SERVER=swoole \
# 1 Day = 86400 s
_APP_MAINTENANCE_RETENTION_ABUSE=86400 \
_APP_MAINTENANCE_INTERVAL=86400
-#ENV _APP_SMTP_SECURE ''
-#ENV _APP_SMTP_USERNAME ''
-#ENV _APP_SMTP_PASSWORD ''
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
diff --git a/app/config/platforms.php b/app/config/platforms.php
index f9756d1ae6..399d52e74b 100644
--- a/app/config/platforms.php
+++ b/app/config/platforms.php
@@ -301,7 +301,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
- 'version' => '0.4.0',
+ 'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://github.com/appwrite/sdk-for-cli',
'enabled' => true,
diff --git a/app/config/variables.php b/app/config/variables.php
index 62d9d302ac..c4a02b6c6b 100644
--- a/app/config/variables.php
+++ b/app/config/variables.php
@@ -105,10 +105,10 @@ return [
],
[
'name' => '_APP_SYSTEM_SECURITY_EMAIL_ADDRESS',
- 'description' => 'This is the email address used to issue SSL certificates for custom domains or the user agent in webhooks. The default value is \'security@localhost.test\'.',
+ 'description' => 'This is the email address used to issue SSL certificates for custom domains or the user agent in your webhooks payload.',
'introduction' => '0.7.0',
- 'default' => 'security@localhost.test',
- 'required' => false,
+ 'default' => '',
+ 'required' => true,
'question' => '',
],
[
@@ -149,6 +149,22 @@ return [
'required' => false,
'question' => '',
],
+ [
+ 'name' => '_APP_REDIS_USER',
+ 'description' => 'Redis server user.',
+ 'introduction' => '0.7',
+ 'default' => '',
+ 'required' => false,
+ 'question' => '',
+ ],
+ [
+ 'name' => '_APP_REDIS_PASS',
+ 'description' => 'Redis server password.',
+ 'introduction' => '0.7',
+ 'default' => '',
+ 'required' => false,
+ 'question' => '',
+ ],
],
],
[
@@ -247,17 +263,17 @@ return [
'variables' => [
[
'name' => '_APP_SMTP_HOST',
- 'description' => 'SMTP server host name address. Default value is: \'smtp\'. Pass an empty string to disable all mail sending from the server.',
+ 'description' => 'SMTP server host name address. Use an empty string to disable all mail sending from the server. The default value for this variable is an empty string',
'introduction' => '',
- 'default' => 'smtp',
+ 'default' => '',
'required' => false,
'question' => '',
],
[
'name' => '_APP_SMTP_PORT',
- 'description' => 'SMTP server TCP port. Default value is: \'25\'.',
+ 'description' => 'SMTP server TCP port. Empty by default.',
'introduction' => '',
- 'default' => '25',
+ 'default' => '',
'required' => false,
'question' => '',
],
diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php
index e51fdd044f..7a6b11bcda 100644
--- a/app/controllers/api/functions.php
+++ b/app/controllers/api/functions.php
@@ -294,7 +294,7 @@ App::put('/v1/functions/:functionId')
}
$original = $function->getAttribute('schedule', '');
- $cron = (!empty($function->getAttribute('tag', null)) && !empty($schedule)) ? CronExpression::factory($schedule) : null;
+ $cron = (!empty($function->getAttribute('tag', null)) && !empty($schedule)) ? new CronExpression($schedule) : null;
$next = (!empty($function->getAttribute('tag', null)) && !empty($schedule)) ? $cron->getNextRunDate()->format('U') : null;
$function = $projectDB->updateDocument(array_merge($function->getArrayCopy(), [
@@ -359,7 +359,7 @@ App::patch('/v1/functions/:functionId/tag')
}
$schedule = $function->getAttribute('schedule', '');
- $cron = (empty($function->getAttribute('tag')) && !empty($schedule)) ? CronExpression::factory($schedule) : null;
+ $cron = (empty($function->getAttribute('tag')) && !empty($schedule)) ? new CronExpression($schedule) : null;
$next = (empty($function->getAttribute('tag')) && !empty($schedule)) ? $cron->getNextRunDate()->format('U') : null;
$function = $projectDB->updateDocument(array_merge($function->getArrayCopy(), [
diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php
index ed0d3a4435..63c99ffaee 100644
--- a/app/controllers/api/projects.php
+++ b/app/controllers/api/projects.php
@@ -943,7 +943,7 @@ App::post('/v1/projects/:projectId/tasks')
throw new Exception('Project not found', 404);
}
- $cron = CronExpression::factory($schedule);
+ $cron = new CronExpression($schedule);
$next = ($status == 'play') ? $cron->getNextRunDate()->format('U') : null;
$security = ($security === '1' || $security === 'true' || $security === 1 || $security === true);
@@ -1093,7 +1093,7 @@ App::put('/v1/projects/:projectId/tasks/:taskId')
throw new Exception('Task not found', 404);
}
- $cron = CronExpression::factory($schedule);
+ $cron = new CronExpression($schedule);
$next = ($status == 'play') ? $cron->getNextRunDate()->format('U') : null;
$security = ($security === '1' || $security === 'true' || $security === 1 || $security === true);
diff --git a/app/controllers/shared/web.php b/app/controllers/shared/web.php
index 43eaf74d09..526a4dbb62 100644
--- a/app/controllers/shared/web.php
+++ b/app/controllers/shared/web.php
@@ -11,13 +11,18 @@ App::init(function ($utopia, $request, $response, $layout) {
/* AJAX check */
if (!empty($request->getQuery('version', ''))) {
- $layout->setPath(__DIR__.'/../../views/layouts/empty.phtml');
+ $layout->setPath(__DIR__ . '/../../views/layouts/empty.phtml');
}
-
+
+ $port = $request->getPort();
+ $protocol = $request->getProtocol();
+ $domain = $request->getHostname();
+
$layout
->setParam('title', APP_NAME)
- ->setParam('protocol', $request->getProtocol())
- ->setParam('domain', $request->getHostname())
+ ->setParam('protocol', $protocol)
+ ->setParam('domain', $domain)
+ ->setParam('endpoint', $protocol . '://' . $domain . ($port != 80 && $port != 443 ? ':' . $port : ''))
->setParam('home', App::getEnv('_APP_HOME'))
->setParam('setup', App::getEnv('_APP_SETUP'))
->setParam('class', 'unknown')
@@ -34,10 +39,10 @@ App::init(function ($utopia, $request, $response, $layout) {
$time = (60 * 60 * 24 * 45); // 45 days cache
$response
- ->addHeader('Cache-Control', 'public, max-age='.$time)
- ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time).' GMT') // 45 days cache
+ ->addHeader('Cache-Control', 'public, max-age=' . $time)
+ ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $time) . ' GMT') // 45 days cache
->addHeader('X-Frame-Options', 'SAMEORIGIN') // Avoid console and homepage from showing in iframes
- ->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url='.\urlencode($request->getURI()))
+ ->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url=' . \urlencode($request->getURI()))
->addHeader('X-UA-Compatible', 'IE=Edge') // Deny IE browsers from going into quirks mode
;
diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php
index 6b3e105aa3..b41f1d1f86 100644
--- a/app/controllers/web/console.php
+++ b/app/controllers/web/console.php
@@ -144,6 +144,7 @@ App::get('/console/settings')
$page
->setParam('customDomainsEnabled', ($target->isKnown() && !$target->isTest()))
->setParam('customDomainsTarget', $target->get())
+ ->setParam('smtpEnabled', (!empty(App::getEnv('_APP_SMTP_HOST'))))
;
$layout
diff --git a/app/init.php b/app/init.php
index bf7a26f912..a70ed1b88e 100644
--- a/app/init.php
+++ b/app/init.php
@@ -34,12 +34,12 @@ use PDO as PDONative;
const APP_NAME = 'Appwrite';
const APP_DOMAIN = 'appwrite.io';
const APP_EMAIL_TEAM = 'team@localhost.test'; // Default email address
-const APP_EMAIL_SECURITY = 'security@localhost.test'; // Default security email address
+const APP_EMAIL_SECURITY = ''; // Default security email address
const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_DEFAULT = 'default';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
-const APP_CACHE_BUSTER = 143;
+const APP_CACHE_BUSTER = 144;
const APP_VERSION_STABLE = '0.7.0';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
@@ -91,9 +91,13 @@ Config::load('storage-mimes', __DIR__.'/config/storage/mimes.php');
Config::load('storage-inputs', __DIR__.'/config/storage/inputs.php');
Config::load('storage-outputs', __DIR__.'/config/storage/outputs.php');
-Resque::setBackend(App::getEnv('_APP_REDIS_HOST', '')
- .':'.App::getEnv('_APP_REDIS_PORT', ''));
-
+$user = App::getEnv('_APP_REDIS_USER','');
+$pass = App::getEnv('_APP_REDIS_PASS','');
+if(!empty($user) || !empty($pass)) {
+ Resque::setBackend('redis://'.$user.':'.$pass.'@'.App::getEnv('_APP_REDIS_HOST', '').':'.App::getEnv('_APP_REDIS_PORT', ''));
+} else {
+ Resque::setBackend(App::getEnv('_APP_REDIS_HOST', '').':'.App::getEnv('_APP_REDIS_PORT', ''));
+}
/**
* DB Filters
*/
@@ -176,6 +180,18 @@ $register->set('statsd', function () { // Register DB connection
$register->set('cache', function () { // Register cache connection
$redis = new Redis();
$redis->pconnect(App::getEnv('_APP_REDIS_HOST', ''), App::getEnv('_APP_REDIS_PORT', ''));
+ $user = App::getEnv('_APP_REDIS_USER','');
+ $pass = App::getEnv('_APP_REDIS_PASS','');
+ $auth = [];
+ if(!empty($user)) {
+ $auth["user"] = $user;
+ }
+ if(!empty($pass)) {
+ $auth["pass"] = $pass;
+ }
+ if(!empty($auth)) {
+ $redis->auth($auth);
+ }
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
return $redis;
diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml
index afe0365ee8..45d3287cf5 100644
--- a/app/views/console/database/collection.phtml
+++ b/app/views/console/database/collection.phtml
@@ -114,7 +114,7 @@ $maxCells = 10;
-
+
{...}
diff --git a/app/views/console/database/search/documents.phtml b/app/views/console/database/search/documents.phtml
index 1b656dc4e4..6fb67feab1 100644
--- a/app/views/console/database/search/documents.phtml
+++ b/app/views/console/database/search/documents.phtml
@@ -72,7 +72,7 @@ $rules = $collection->getAttribute('rules', []);
-
+
{...}
diff --git a/app/views/console/database/search/files.phtml b/app/views/console/database/search/files.phtml
index f8c39f4a87..ac9f76e0ea 100644
--- a/app/views/console/database/search/files.phtml
+++ b/app/views/console/database/search/files.phtml
@@ -54,7 +54,7 @@
PowerShell
To complete set up, add this OAuth2 redirect URI to your escape(ucfirst($provider)); ?> app configuration.