Age | Commit message (Collapse) | Author |
|
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.
This fixes #4556.
|
|
.NET 5 moves the responsibility to the operating system, and since
SSH.NET currently relies on the ECDsaCng class, we will simply interpret
all exceptions to mean lack of ECDSA support.
|
|
This is simpler, and would potentially allow us to query this without an
instance.
|
|
|
|
It's possible that our test will no longer be valid (e.g., due to
changes in SSH.NET), so we don't want the backend to fail if our test
is no longer valid.
|
|
This more closely reflects the SSH.NET code.
|
|
The previous implementation could possibly fail for reasons unrelated to
ECDSA support.
|
|
|
|
SSH.NET relies on the System.Security.Cryptography.ECDsaCng class for
ECDSA algorithms, which is not implemented in Mono (as of 6.12.0.144).
This prevents clients from connecting if one of the ECDSA algorithms is
chosen as the host key algorithm. In the event that this causes a
connection failure, we will prevent the client from advertising support
for ECDSA algorithms and make another connection attempt.
Related forum discussion:
https://forum.duplicati.com/t/release-2-0-6-1-beta-2021-sftp-failure-synology/12358
|
|
From the release notes:
Even though RFC 4253 requires that an identification string MUST be
terminated by a carriage return and line feed, this fix restores support
for banners and identification strings that are only terminated by a
line feed.
This is a workaround for an issue in version 7.4 of OpenSSH which was
fixed in version 7.5.
|
|
This includes support for additional key exchange algorithms, host key
algorithms, and private key formats.
https://github.com/sshnet/SSH.NET/releases/tag/2020.0.0
This fixes #2808, #2950, #3360, and #4378.
|
|
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.
|
|
|
|
Mostly auto suggested from IDE.
|
|
|
|
- no code changes except those noted below
- projects upgrade to 4.6.2
- wixinstaller project upgraded automatically by VisualStudio
- wixinstaller updated to require 4.6.2
- Library.Encryption changed to Standard2.0 so accommodate update to SharpAesCrypt
|
|
|
|
|
|
|
|
|
|
|
|
If the user specifies a path with multiple directories that do not
exist, the SftpClient.CreateDirectory method does not create all the
missing parent directories. As such, we have to do so ourselves.
This addresses issue #2080.
|
|
|
|
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
|
|
|
|
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
|
|
This removes some duplicated code.
|
|
|
|
Remove ineffective statements
|
|
The removed code was introduced in revision ba58651e5a ("Fix for
CreateFolder with SSH"), presumably to fix an issue where some SSH
backends did not like the trailing slash when creating new folders.
However, since we are not using the output argument of the call to
Substring, these statements have no effect.
|
|
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
|
|
granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
|
|
Updated most backends to return the actual DNS names for cache invalidation.
|
|
DNSName is provided
|
|
methods on each backend class
|
|
Remove redundant calls to ToString
|
|
|
|
These string comparisons should not be culture-aware.
|
|
This fixes #2856
|
|
Using strong-named assemblies can cause difficulties with the GNU LGPL
license, which allows for one to recombine or relink their application
with modified versions of the code. While one solution is to share the
private key so that people can sign the assemblies themselves, this
would break the trust that is expected from signed assemblies. For now,
the easiest fix is to simply not sign the assemblies. Note that by
doing so, we prevent the code from being referenced from other signed
assemblies.
This also fixes an issue introduced in revision ba94d36a80 ("Added
auto-update for WindowsService and Service."), where the WindowsService
project (signed) referenced the AutoUpdater project (not signed).
We also removed instances of <SignAssembly>false</SignAssembly> to be
consistent with newly created .csproj files that do not contain the
SignAssembly element.
This was motivated by the discussion in issue #2814.
|
|
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
|
|
|
|
|
|
in string comparisons.
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)
|
|
|
|
|
|
properties.
|
|
|
|
|
|
This fixes #2109
|