Commit Graph
564 Commits
Author SHA1 Message Date
Dean Ferreyra aa50b1dfbf Fix typo in comment 2020-08-30 20:04:07 -07:00
Dean Ferreyra 5f94cc19a7 Fix restore GUI handling of folders with * or ?
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.
2020-08-30 17:07:04 -07:00
Kenneth Hsu f28550f4b5 Use overload instead of optional parameters.
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?
2020-08-24 07:51:57 -07:00
Kenneth Hsu d4d7874aaf Avoid decoding URL parameters when removing passwords.
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.
2020-08-24 07:41:00 -07:00
Kenneth Hsu e964072690 Target .NET Framework 4.7.1.
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.
2020-07-26 19:46:01 -07:00
Max b008aed1f3 migrate to net5 + runnable 2020-06-03 00:00:38 +02:00
Max c882953fdd upstream 2020-05-31 13:50:13 +02:00
Kenneth Hsu 0f4cfdb156 Fix confusing indentation.
The body of an if statement was not indented relative to the condition.
This also adds braces to clarify the body of the statement.
2020-04-26 19:51:12 -07:00
Rod Savard e79f331ae6 add Edge and Chrome cache folders 2020-04-06 16:27:42 -07:00
Kenneth Hsu 74573bf5ff Remove unnecessary variable assignment. 2020-01-25 13:51:27 -08:00
warwickmmandGitHub 52929e9eb2 Merge pull request #4042 from seantempleton/stopnowexceptions
Fix database corruptions that can occur with "stop now".

This was a source of the "Detected non-empty blocksets with no associated blocks!" exception.
2020-01-06 09:57:44 -08:00
warwickmmandGitHub df2c70e8d2 Merge pull request #4039 from drwtsn32x/filter-cleanup
Support additional Recycle Bin paths in default Windows filters
2020-01-06 09:51:18 -08:00
Sean Templeton 3b6306b556 Fix exceptions caused by Stop Now
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
2020-01-05 21:43:56 -06:00
drwtsn32x f4321ea115 fix typo 2020-01-01 16:50:34 -08:00
drwtsn32x c50d07ec40 fix typo 2020-01-01 16:49:40 -08:00
drwtsn32x e55d555558 Change case of recycle bins 2020-01-01 16:43:04 -08:00
drwtsn32x 559ab450a4 Improve Windows Temp filter 2020-01-01 16:40:10 -08:00
drwtsn32x 9cabdc51d0 Improve Windows Install filter 2020-01-01 16:25:22 -08:00
drwtsn32x 7e9eb58cdd remove Temp from SystemFiles 2020-01-01 16:18:42 -08:00
drwtsn32x e15b3a9278 add slash to 'usrclass' 2020-01-01 16:05:53 -08:00
drwtsn32x 54820bc192 remove duplicate 'ntuser' line 2020-01-01 16:02:57 -08:00
drwtsn32x 9b51773e6f add recycle bin, change all to be off root of drive 2020-01-01 15:59:43 -08:00
drwtsn32x dd7cc60e46 move '$Recycle.bin' to SystemFiles filter for consistency 2020-01-01 15:57:14 -08:00
drwtsn32x a5439fd30f remove 'Windows' duplicate 2020-01-01 15:54:57 -08:00
Max 7e2218663e Add Compat Analyzers 2019-12-25 19:08:52 +01:00
Max 28793ef204 packages update 2019-12-25 18:21:24 +01:00
Max 41a5591532 upstream 2019-12-25 16:34:56 +01:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
drwtsn32x 942d8b820d removed getter 2019-11-26 19:27:46 -08:00
drwtsn32x 77a1e3b88a disable attribute masking 2019-11-22 08:00:58 -08:00
Kenneth Hsu 6c36a4bc93 Avoid possible invalid DateTimeOffset values.
When creating a new backup, a value of DateTime.MinValue can be provided
to the NormalizeDateTimeToEpochSeconds method.  If DateTimeOffset is
used, it will convert the provided DateTime to the UTC equivalent, which
may result in a value outside of the allowable bounds.

This reverts the changes from pull request #3919.
This fixes issue #3955.
2019-10-23 19:49:36 -07:00
Kenneth SkovhedeandGitHub 99d0cb3c57 Merge pull request #3953 from warwickmm/make_fields_readonly
Mark fields that don't need to be reassigned as readonly
2019-10-21 08:36:17 +02:00
Kenneth Hsu 2aa76881a5 Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu 9e465c602d Fix invalid regex pattern.
This was introduced as part of revision b8199ad1c4 ("Fixed handling of
multi-byte characters in both HttpServer and Duplicati") to resolve
issues #1063 and #1085.  However, the regex pattern was invalid.  This
reverts the pattern to the previous value, which seems more appropriate
since most non-standard encodings are of the form %uxxxx where xxxx is a
4 byte hex string representing a UTF-16 code.

This fixes issue #3737.
2019-09-28 10:05:34 -07:00
Kyle Stanfield 7dffbaf800 Changed NormalizeDateTimeToEpochSeconds to use ToUnixTimeSeconds 2019-09-20 19:08:26 -07:00
Kenneth SkovhedeandGitHub d5b77ebb61 Fixed incorrect escaping of pipe characters 2019-09-19 22:09:50 +02:00
Kenneth SkovhedeandGitHub 5664686cc2 Merge pull request #3830 from BlueBlock/gpg-update
Update GPG library and path method
2019-09-17 09:53:46 +02:00
Kenneth Hsu e64d6a6216 Remove unused output parameter.
This will avoid potential confusion as the provided byte[] array is
itself being modified.
2019-09-14 18:46:06 -07:00
BlueBlock 7e8c6b22ba Merge remote-tracking branch 'upstream/master' into gpg-update 2019-09-11 12:03:44 -04:00
BlueBlock 1c28cf0b15 refactor AutoUpdater to an exe and a library 2019-09-06 16:57:44 -04:00
Max 62d64c3ab0 upstream 2019-09-05 15:34:09 +02:00
Kenneth SkovhedeandGitHub bb6c8cc558 Merge pull request #3880 from warwickmm/refactor/consolidate_datetime_methods
Consolidate duplicated DateTime utility methods
2019-09-03 22:57:10 +02:00
BlueBlock 4b6f7a906f upgrade missing references 2019-09-03 13:52:55 -04:00
BlueBlock eff5b79fd8 Merge remote-tracking branch 'upstream/master' into gpg-update 2019-09-02 09:04:07 -04:00
Kenneth Hsu 53befa36fc Fix XML documentation. 2019-09-01 12:38:23 -07:00
Kenneth Hsu 0a390bd31a Move NormalizeDateTimeToEpochSeconds method to Utility class. 2019-09-01 12:38:23 -07:00
Kenneth Hsu 40cae529e6 Move NormalizeDateTime method to Utility class. 2019-09-01 12:38:23 -07:00
BlueBlock 6a9f605e43 Merge remote-tracking branch 'upstream/master' into gpg-update 2019-08-31 19:01:57 -04:00
BlueBlock b3ef2eaa08 Merge remote-tracking branch 'upstream/master' into fix-tempfile-deletion 2019-08-31 18:56:27 -04:00