When only having OpenSSL 3 installed, FasterHashing.FasterHash.Create()
currently throws an EntryPointNotFoundException.
Mitigate this by falling back to HashAlgorithm.Create in the error case.
By default, the dot (.) element matches every character _except_ the
newline character. This causes issues with files that have a newline
character in the name. For example, they are excluded when restoring
the containing directory.
By specifying the RegexOptions.Singleline option, the dot (.) element
will match every character, including the newline character.
This fixes#4508.
First, when performing an upload using an upload session, data is streamed directly from the input stream to the request stream. (It is no longer read into an intermediate buffer first.)
Hopefully this will help these uploads respond to throttling behavior better.
Second, these backends now check for and respect a Retry-After header if it is present.
On 5xx errors, the existing exponential backoff is used for the intermediate retries.
A few other minor things have also been cleaned up (e.g., using Task.Delay instead of Thread.Sleep)
An example of when this happens is when shutting down TrayIcon (using its context menu), at least on Windows. This is quite annoying when debugging with Visual Studio (having the default exception settings).
Switch back to using `FilterType.Simple` for `@` filters to fix the
restore picker again.
In LocalDatabase.cs, replace code that was explicitly looking for the
presence of wildcard characters to instead trigger off of
`FilterType.Wildcard`. This fixes the "find" command.
Change FilterEntry.ToString() to prefix Simple filters with `@` so
that if simple filters with wildcard characters make the round-trip
through a string, their `FilterType.Simple` type is preserved.
Add new filter syntax, prefixing with an "at sign"; i.e., `@...`, that
disables glob expansion, treating `*` and `?` wildcard characters as
literal characters.
In the GUI, change the restore file picker to prefix paths with `@`
when expanding a node to avoid mistaking literal `*` or `?` characters
for wildcards characters and triggering the following error:
```
Filter for list-folder-contents must be a path prefix with no wildcards Parameter name: filter
```
This fixes#4300.
From Codacy:
The overloading mechanism should be used in place of optional parameters for several reasons:
* Optional parameter values are baked into the method call site code,
thus, if a default value has been changed, all referencing assemblies
need to be rebuilt, otherwise the original values will be used.
* The Common Language Specification (CLS) allows compilers to ignore
default parameter values, and thus require the caller to explicitly
specify the values. For example, if you want to consume a method with
default argument from another .NET compatible language (for instance
C++/CLI), you will have to provide all arguments. When using method
overloads, you could achieve similar behavior as default arguments.
* Optional parameters prevent muddying the definition of the function
contract. Here is a simple example: if there are two optional
parameters, when one is defined, is the second one still optional or
mandatory?
In revision c41f2c6a60 ("moved all sanitization logic into backup class
and moved from regex to using internal Uri library"), we cleaned up the
removal of passwords from an exported backup configuration. However,
the use of Uri.QueryParameters resulted in exporting decoded parameter
values, which violated some assumptions made by the decode_uri function
in AppUtils.js. This caused usernames in the JSON to contain '@'
instead of '%40', which led to incorrect decomposition of the target URL
into its components in the UI.
This concerns issue #3619.
This updates all projects to target .NET Framework 4.7.1. The
TencentCOS and Tardigrade backends depend on .NET Standard 2.0. When a
.NET Framework prior to 4.7.1 is targeted, the system cannot be sure
that all the dependencies exist, so it copies all dependent assemblies
to the output directory. This causes many assemblies from the System
namespace to become bundled in the release.
https://stackoverflow.com/a/48875007
We had previously attempted to make individual projects target 4.7.1
(see pull request #4242), but this can cause compatibility issues when
4.6.2 projects depend on 4.7.1. projects.
This will require Mono 5.10.0 or greater (previously, we required 5.0.0
or greater).
https://www.mono-project.com/docs/about-mono/releases/5.10.0/#class-libraries
This fixes issue #4234.
The LocalDatabase class was deleting from the BlocklistHash table based on the volume id of blocks. The deletes for the Blockset and BlocksetEntry tables were using a union query which included the same query the BlocklistHash delete was using. Changed the BlocklistHash delete query to use the union as well to ensure that all three tables would use the same query to delete the necessary rows. This fixes the "Detected non-empty blocksets with no associated blocks!" error.
Moved a write call in the DataBlockProcessor to send a volume for upload after setting blockvolume to null. This prevents a null reference exception because otherwise it would be sent to the SpillCollector and it tries to add a block, but the volume has already been closed.
Added the ? operator to the RegistryUtility class to prevent a null reference exception while debugging. It was annoying catching it in the debugger.
Fixes#4037