Adds automatically background refresh of all external links if they are belongs to the current blob (S3) storage. The feature is disabled by default in order to keep backward compatibility.
The background go-routine spawns once during startup and periodically signs and updates external links if that links belongs to current S3 storage.
The original idea was to sign external links on-demand, however, with current architecture it will require duplicated code in plenty of places. If do it, the changes will be quite invasive and in the end pointless: I believe, the architecture will be eventually updated to give more scalable way for pluggable storage. For example - Upload/Download interface without hard dependency on external link. There are stubs already, but I don't feel confident enough to change significant part of the application architecture.
Signup is not allowed if password login is disabled
If password login is disabled in the system configuration, the "signup" in the "/auth" page disappears, but the user can manually enter "/auth/signup" to access the system by creating a new user.
Add {uuid} in path template when using local storage or S3
Add an addition tag `{uuid}` to the `replacePathTemplate`.
It is a workaround to leak the public links of a resource when using S3-based object storage. Currently, all resource blobs stored in S3 (R2, OSS) are set to be public. It is insecure as the resources for the private memos are also accessible on the Internet. Using an additional {uuid} might reduce this risk.
Meanwhile, it is also possible to avoid filename conflict
- always store resources with a relative path with forward slashes, which will be transformed as needed when the file is accessed
- fix an issue with thumbnail generation on Windows
- add several validations for local storage setting
- improve front-end error feedback when changing local storage
- add migrations to make existing resource paths relative (not needed, but improves database consistency)