This PR updates the probing logic to not try the database if a password is supplied on the commandline.
It also fixes a crash that could happen at an unwanted place, if the user does not have write access to the supplied data folder. After this, the application will still crash due to not having a place to write information, but it does not crash in the preloader logic. This also prevents creating the folder while probing for the database.
This PR also fixes a case where the database could become encrypted, if the ServerUtil was providing an encryption key to an unencrypted database. Before this fix, the database would be encrypted with the key provided to ServerUtil, which would most likely cause the Server/TrayIcon to fail starting and perhaps crash.
This fixes#6377
If the secret provider is used to supply arguments only used by the TrayIcon it does not work.
The secret provider is applied in the Server part, so any settings passed through are correctly resolved, but for the few options that apply directly to the TrayIcon this was not resolved.
With this PR, the secret provider is applied to TrayIcon options as well.
This applies to:
- `--hosturl`
- `--browser-command`
- `--host-cert-hash`
- `--webservice-password`
Improvement on AvaloniaRunner, HttpServerConnection, and HostedInstanceKeeper to prevent race conditions during shutdown.
Adds cancellation tokens and locking mechanisms to ensure that operations are properly stopped and resources are released in a controlled manner.
Also handles a NullReferenceException during Avalonia shutdown, and avoids invoking `InstanceShutdown` or `ConnectionClosed` multiple times.
This addresses [Issue](https://github.com/duplicati/duplicati/issues/6114).
Whenever in non-write context, the permissions of the folder are not set.
Changing pattern from static constructor execution.
This adds support for starting the trayicon even if there is no server.
The trayicon will start up in a disconnected state and stay like that until it manages to connect.
This fixes Support TrayIcon running with no connection #5993
It should be noted that I was unable to completely remove IPv4 on Windows 11 to a state where it would not provide the 127.0.0.1 loopback, even when disabling Ipv4 in various ways, including with registry flags.
On ubuntu/linux, after completely disabling ipv4 the ipv6 loopback was returned.
Implemented support for disconneted state with TrayIcon.
Added some notification support (Windows and Linux).
Changed some logic to prevent hangs on clicks.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.
Fixed a few places where file reads were not cached properly.
Moved some responsibilities of UpdaterManager into DataFolderManager.
This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.
It is possible that some fringe backwards compatibility is lost with this update.
Fixed an issue with AutoUpdater crashing on check/download.
This fixes#5902
All CLI tools and executables now accept a unified set of help command variants:
"help", "/help","--help", "usage", "/usage", "--usage", "/h", "-h"
Affected executables:
Duplicati.Agent
Duplicati.CommandLine
Duplicati.CommandLine.AutoUpdater
Duplicati.CommandLine.BackendTester
Duplicati.CommandLine.BackendTool
Duplicati.CommandLine.ConfigurationImporter
Duplicati.CommandLine.SecretTool
Duplicati.CommandLine.Snapshots
Duplicati.GUI.TrayIcon
Duplicati.Server
Duplicati.Service
Duplicati.WindowsService
Note that SharpAesCrypt command is not included in this because the parameter parsing is part of the SharpAesCrypt code base.
* Implemented support for emitting intermediate certificates from pfx files
* Added certificate check to crash earlier
* Fixed loading certificate on Windows
Exception was bundled in the innerexception and thus the catch statement was not functioning as expected.
Additionally adding ? operator to the ApplicationExitEvent ServerStartedEvent events.
Kept the infrastructure to allow re-introducing it later if a better source for a device key is found.
Added support for not having any valid settings encryption key.
Added warnings if the user is running without a settings encryption key.
Added additional checks during startup to help with troubleshooting and configuring a setup with a settings encryption key.
Docker builds will now warn if no encryption key is set.
This fixes#5518
This commit adds the option to provide preload/preset options that change the default values for Duplicati's commandline or environment variables.
This fixes#5480
Added auth requirement on all endpoints.
Added SignIn-, Access- and Refresh-Tokens based on JWT.
Upgraded stored password to be based on PBKDF2.
Added default password assignment.
Updated logic to support auth-header and re-sign-in for tray-icon and web-ui.
Re-implemented everything using ASP.NET.
Changed some requests to use JSON instead of FORM data.
Some work towards deleting the FIXMEGlobal instance.
Auth is missing, XSRF does not work correctly.