Skip to content

Commit e6c8e1b

Browse files
merge branch v2 (release 2.0.0-beta.33)
2 parents d9dc838 + 66f7d23 commit e6c8e1b

16 files changed

Lines changed: 151 additions & 73 deletions

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# Changelog
22

3-
## [v2.0.0-beta.32](https://github.com/marcantondahmen/automad/commit/8713cccebb050201735f8cf91d8e6d794300466f)
3+
## [v2.0.0-beta.33](https://github.com/marcantondahmen/automad/commit/01d123edd54ae375acffbc8e3b14d25713f7f793)
44

5-
Mon, 11 May 2026 11:40:57 +0200
5+
Fri, 22 May 2026 21:46:37 +0200
6+
7+
### New Features
8+
9+
- also return success on account recovery token requests when user doesn't exist ([eac0b05da](https://github.com/marcantondahmen/automad/commit/eac0b05dafdb0ddf8b9139dad8929aaba86568ca))
10+
- improve editing performance by caching disk usage information ([d1238cc15](https://github.com/marcantondahmen/automad/commit/d1238cc15e8f6716bddb72a53aa970b9c60cc218))
11+
12+
## [v2.0.0-beta.32](https://github.com/marcantondahmen/automad/commit/d9dc838ab916ae566f6726409ccb2bb20b529c48)
13+
14+
Mon, 11 May 2026 11:44:31 +0200
615

716
### Bugfixes
817

automad/lang/english.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"accountRecoverySuccessHeading": "Account recovered",
1515
"accountRecoverySuccessText": "Your password has been updated and two-factor authentication has been disabled. You can now sign in and set up 2FA again.",
1616
"accountRecoveryTokenSentHeading": "Check your email",
17-
"accountRecoveryTokenSentText": "A verification email has been sent to your inbox. Click the link in the email to set a new password and complete account recovery.",
17+
"accountRecoveryTokenSentText": "If the provided username or email matches an account, a verification email has been sent to your inbox. Click the link in the email to set a new password and complete account recovery.",
1818
"add": "Add",
1919
"addImage": "Add image",
2020
"addPage": "Add Page",

automad/src/server/App.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* @license See LICENSE.md for license information
5757
*/
5858
class App {
59-
const VERSION = '2.0.0-beta.32';
59+
const VERSION = '2.0.0-beta.33';
6060

6161
/**
6262
* Required PHP version.

automad/src/server/Auth/User.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ public function sendPasswordResetToken(string $type, Messenger $Messenger): bool
208208
$email = $this->email;
209209

210210
if (!$email) {
211-
$Messenger->setError(Text::get('error_user_no_email'));
212-
213211
return false;
214212
}
215213

automad/src/server/Controllers/API/AppController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
use Automad\Core\FileSystem;
4646
use Automad\Core\Str;
4747
use Automad\Core\Text;
48+
use Automad\System\DiskUsage;
4849
use Automad\System\Fields;
4950

5051
defined('AUTOMAD') or die('Direct access not permitted!');
@@ -101,7 +102,7 @@ public static function getServerInfo(): Response {
101102
'phpVersion' => phpversion(),
102103
'phpSapiName' => php_sapi_name(),
103104
'memoryLimit' => ini_get('memory_limit'),
104-
'diskUsage' => FileSystem::diskUsage(),
105+
'diskUsage' => DiskUsage::calculate(),
105106
'diskQuota' => AM_DISK_QUOTA
106107
));
107108
}

automad/src/server/Controllers/API/FileCollectionController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
use Automad\Core\Request;
4444
use Automad\Core\Text;
4545
use Automad\Models\FileCollection;
46+
use Automad\System\DiskUsage;
4647

4748
defined('AUTOMAD') or die('Direct access not permitted!');
4849

@@ -105,7 +106,7 @@ public static function list(): Response {
105106
public static function upload(): Response {
106107
$Response = new Response();
107108

108-
if (FileSystem::diskQuotaExceeded()) {
109+
if (DiskUsage::quotaExceeded()) {
109110
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
110111
}
111112

automad/src/server/Controllers/API/FileController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
namespace Automad\Controllers\API;
3737

3838
use Automad\API\Response;
39-
use Automad\Core\FileSystem;
4039
use Automad\Core\Messenger;
4140
use Automad\Core\Request;
4241
use Automad\Core\Text;
4342
use Automad\Models\File;
43+
use Automad\System\DiskUsage;
4444

4545
defined('AUTOMAD') or die('Direct access not permitted!');
4646

@@ -82,7 +82,7 @@ public static function import(): Response {
8282
$Response = new Response();
8383
$Messenger = new Messenger();
8484

85-
if (FileSystem::diskQuotaExceeded()) {
85+
if (DiskUsage::quotaExceeded()) {
8686
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
8787
}
8888

automad/src/server/Controllers/API/ImageController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use Automad\Core\Request;
4343
use Automad\Core\Text;
4444
use Automad\Models\Image;
45+
use Automad\System\DiskUsage;
4546

4647
defined('AUTOMAD') or die('Direct access not permitted!');
4748

@@ -61,7 +62,7 @@ class ImageController {
6162
public static function save(): Response {
6263
$Response = new Response();
6364

64-
if (FileSystem::diskQuotaExceeded()) {
65+
if (DiskUsage::quotaExceeded()) {
6566
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
6667
}
6768

automad/src/server/Controllers/API/PageController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
use Automad\Models\Page;
4848
use Automad\Models\Selection;
4949
use Automad\Stores\DataStore;
50+
use Automad\System\DiskUsage;
5051
use Automad\System\Fields;
5152
use Automad\System\ThemeCollection;
5253

@@ -68,7 +69,7 @@ class PageController {
6869
public static function add(): Response {
6970
$Response = new Response();
7071

71-
if (FileSystem::diskQuotaExceeded()) {
72+
if (DiskUsage::quotaExceeded()) {
7273
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
7374
}
7475

@@ -255,7 +256,7 @@ public static function discardDraft(): Response {
255256
public static function duplicate(): Response {
256257
$Response = new Response();
257258

258-
if (FileSystem::diskQuotaExceeded()) {
259+
if (DiskUsage::quotaExceeded()) {
259260
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
260261
}
261262

@@ -435,7 +436,7 @@ private static function getTemplateNameFromPost(): string {
435436
private static function save(Page $Page, array $data): Response {
436437
$Response = new Response();
437438

438-
if (FileSystem::diskQuotaExceeded()) {
439+
if (DiskUsage::quotaExceeded()) {
439440
return $Response->setError(Text::get('diskQuotaExceeded'))->setCode(403);
440441
}
441442

automad/src/server/Controllers/API/UserController.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,8 @@ public static function requestPasswordResetToken(): Response {
134134

135135
$User = $UserCollection->getUser($nameOrEmail);
136136

137-
if (!$User) {
138-
return $Response->setError(Text::get('userNotFoundError'));
139-
}
140-
141-
if ($User->sendPasswordResetToken(Request::post('type'), $Messenger)) {
137+
// Also return success when user doesn't exist.
138+
if (!$User || $User->sendPasswordResetToken(Request::post('type'), $Messenger)) {
142139
return $Response->setData(array('success' => true));
143140
}
144141

0 commit comments

Comments
 (0)