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 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.
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.
For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
This change means that URL's in the form `scheme://username:password@server` can no longer have any of the characters `:?/` in the username or password component without encoding.