Commit Graph
68 Commits
Author SHA1 Message Date
Kenneth Hsu bbe65f9dfb 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.
2018-05-26 10:36:50 -07:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more 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.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Rune Henriksen fc77b476fc changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided 2018-02-21 22:38:01 +01:00
Rune Henriksen 00292953c3 added DNSName getter on Backend interface and added NotImplementedException methods on each backend class 2018-02-18 00:18:44 +01:00
Kenneth SkovhedeandGitHub 36aadc4ad1 Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Kenneth Skovhede 6cc70c7ae5 Added a friendly error message if the SSH key fails to parse/load.
This fixes #2856
2017-11-19 17:28:51 +01:00
Kenneth Hsu 3d51e9153b Avoid signing assemblies.
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.
2017-10-15 22:00:23 -07:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
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()
2017-09-25 23:17:45 -06:00
Kenneth Skovhede ba36cadde3 Updated Renci.SSH 2017-09-23 00:27:55 +02:00
Kenneth Skovhede 5970562022 Bugfix: better error message when there is no password for SSH backend 2017-09-23 00:15:53 +02:00
Tyler Gill 83a1dcfb64 Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase 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)
2017-09-18 23:55:08 -06:00
Kenneth Skovhede 1731c341b5 String fix 2017-09-01 09:48:56 +02:00
Kenneth Skovhede 6a3ea03232 Updated SSH library to 2016.1.0-beta2 to see if speed improvements are working 2017-08-29 09:36:56 +02:00
Kenneth Skovhede 81d5b77c8e Added extra options to SSH that exposes the operation timeout and keep-alive properties. 2017-08-06 17:48:09 +02:00
Kenneth Skovhede a029890409 Implemented better default error messsages 2017-01-09 11:35:38 +01:00
Kenneth Skovhede 52eb8e8478 Disabled MSBuild for much faster builds on MacOS 2016-12-29 23:12:41 +01:00
Kenneth Skovhede 4c1ea6d614 Removed custom handling of the SSH fingerprints.
This fixes #2109
2016-12-03 15:16:06 +01:00
Kenneth Skovhede d2771cf554 Updated Renci SSH 2016-11-10 10:31:31 +01:00
Kenneth Skovhede b69af94b3c Fixed an issue where the --ssh-accept-any-fingerprint option would cause a warning stating that it was not supported. 2016-10-13 23:21:01 +02:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede 3666d0268a Implemented UI check for host keys, to allow easy SSH hostkey protection. 2016-08-30 11:36:31 +02:00
Kenneth Skovhede f3572892be Changed SSH backend to report invalid host keys via the HostKeyException 2016-08-30 10:00:48 +02:00
Max 4960fd4202 merge upstream 2016-06-28 19:52:28 +02:00
Kenneth Skovhede 8c7811ae89 Updated SSH library to latest version, marked beta but should be stable. 2016-06-28 10:03:53 +02:00
Max 9f0b3a0042 default behavior is that fingerprint needs to be specified, but can be overided 2016-06-27 19:57:36 +02:00
Kenneth Skovhede 3005594b38 Merge branch 'master' into nuget_setup
# Conflicts:
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj
#	Duplicati/Library/Backend/S3/S3Wrapper.cs
#	thirdparty/CoCoL/CoCoL.dll
#	thirdparty/SSH.NET/Renci.SshNet.dll
2016-06-27 15:25:52 +02:00
Max e53f5808d9 add ability to check server fingerprint 2016-06-24 15:03:08 +02:00
Max 300ef96800 fix 1341 2016-06-11 22:11:33 +02:00
Troels BlumandKenneth Skovhede 09e805d2e9 Correct line width in PEM files 2016-04-21 15:57:26 +02:00
Kenneth Skovhede 785c4d325f Reverted changes to solution file so it again forces Windows linefeeds.
This also moved stuff around in some project files.
2016-04-13 00:36:22 +02:00
Kenneth Skovhede 59cc0005a3 Removed unused references and updated most libraries to come from NuGet sources instead of being provided in the thirdparty library 2016-01-29 10:47:39 +01:00
Kenneth Skovhede 9ae7ea233a Possible fix for PR #1456 and issue #1449 2015-09-08 16:41:16 +02:00
Kenneth Skovhede b68290b95a Follow up to the latest pull request, changed all references to HexaD to "Duplicati Team" 2015-05-17 11:06:07 +02:00
Fabian Trampusch 55a853463d update year to 2015 2015-05-16 21:15:39 +02:00
Kenneth Skovhede 0d7cf7203b Updated to .Net framework version 4.5 2015-01-26 11:22:52 +01:00
Kenneth Skovhede 3149064cde Merge branch 'no_more_resx' 2015-01-20 21:45:54 +01:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede 16c791f0b5 Removed all resx files, now using Duplicati.Library.Localization exclusively 2015-01-20 21:07:24 +01:00
Kenneth Skovhede 290fde1f9b Bugfix from EddiVonDerAlm@1e83373 2014-11-17 12:01:11 +01:00
Malte Neumann 4a57eed9b5 Fixed a problem with canceled backups
Was an backup canceled, a restart doesn't work. The problem was that a non existing file caused an failure. This fix handles this situation for the ssh and googledocs backend.
2014-11-14 14:41:36 +01:00
Kenneth Skovhede 4702323d6c Added rename support to S3 and SSH. 2014-08-21 20:59:21 +02:00
Kenneth Skovhede b5de1b56ce Updated copyright year on all assemblies.
Also removed the copyright microsoft statement that was erroneously applied to some assemblies.
This fixes issue #1083.
2014-08-12 13:31:30 +02:00
Kenneth Skovhede fec4336414 Removed a few compile warnings 2014-08-06 10:31:01 +02:00
Kenneth Skovhede 69bd080aa5 Updated the version number in all projects to 2.0.0.7 2014-06-13 15:08:51 +02:00
Kenneth Skovhede 989c759374 Added keyfile as password 2014-03-18 22:17:31 +01:00
Kenneth Skovhede 457399f7f0 Correctly passing port if using password auth.
Update issue #955
Status: Fixed
2014-03-18 22:09:47 +01:00
Kenneth Skovhede 28deeea1f3 Updated SSH project file with the KeyLoader changes 2014-03-13 11:38:34 +01:00