Commit Graph
27 Commits
Author SHA1 Message Date
Kenneth Skovhede 23e7233691 Do not encode http form extra parameters.
This changes the encoding that broke because the encoding function was changed.

The new logic is to not encode the parameters, but just use them as provided.

Any escaping needs to then be applied to the input by the user/caller.

This fixes #5900
2025-01-30 21:39:41 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Marcelo C. a3967527e8 Renaming the options to scope them down to the send-http module 2024-12-05 10:26:37 -03:00
Marcelo C. aa22766939 Adding support for self-signed or specific by hash certificates
This will add support for the parameters  accept-any-ssl-certificate and accept-specified-ssl-hash to the Http sender used in reporting.
2024-12-04 13:25:55 -03:00
Kenneth Skovhede f251d34b57 Implemented support for including the machine hostname in reports for simpler identification. 2024-10-16 16:22:47 +02:00
Kenneth Skovhede 1e8bffbb67 Fixed an issue where the option value would be parsed case-sensitive.
This fixes #5500
2024-08-29 14:35:03 +02:00
Kenneth Skovhede 2a79e3e4c3 Fixed options to be string type to allow the UI to present multi-value input.
This fixes #5342
2024-07-29 14:05:40 +02:00
Suguru Hirahara ea0ade2bb8 Rename OptionLoglevellShort to OptionLoglevelShort 2024-07-24 22:33:52 -04:00
Kenneth Skovhede 1d913e026f Added check for valid status code after sending http request with report 2024-07-10 09:22:07 +02:00
Kenneth Skovhede 67c1213a98 Fixed sending the wrong report message 2024-04-30 10:53:14 +02:00
Kenneth Skovhede dab3d989e1 Added support for sending reports via HTTP(s) to multiple destinations 2024-04-24 13:16:21 +02:00
Kenneth Skovhede 9f0810612a Changed logic for reporting exceptions, so all statistics are reported despite an exception stopping the backup 2024-04-02 22:31:55 +02:00
Kenneth Skovhede 6b9165a587 Added support for machine and backup ids in reports 2024-03-07 22:11:49 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Skovhede de84650eae Rewrote the logic for reporting JSON to avoid reporting JSON inside a text blob, but instead use an extra tag in the JSON.
The logic is currently that the template is scanned for potential values, and those that are found are reported in the extra tag for the JSON.
A bit clumsy, but allows the user to choose specific fields to include in the reported data.
2018-04-12 11:46:54 +02:00
Kenneth Skovhede 4e5f4a12bf Merge branch 'master' into feature/filters-for-sendmail
Integrated changes to support log-lines and to have a common shared module for reporters

# Conflicts:
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/RunScript.cs
#	Duplicati/Library/Modules/Builtin/SendHttpMessage.cs
#	Duplicati/Library/Modules/Builtin/SendJabberMessage.cs
#	Duplicati/Library/Modules/Builtin/SendMail.cs
2018-04-12 11:16:57 +02:00
Stephen Gregory b7bda1d1c4 Add result serializers 2018-04-11 22:40:44 -02:30
Stephen Gregory 637e5a4a48 Change method signature of ResultSerializer 2018-04-11 22:40:43 -02:30
Stephen Gregory 46170de84e Extract result serialization to file 2018-04-11 22:40:42 -02:30
Kenneth Skovhede 731ecfc47d Rewrote the report modules to use a shared base class with all the non-sending specific code.
Change the logic for how the log data is included. It is now added as log lines _after_ the normal messages.
Added support for limiting the number of log lines sent.
Added support for setting the log levels on the modules.
Added support for setting a log filter on the modules.
Added support for sending log data as JSON from the http module.
2018-04-10 12:58:06 +02: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
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 80d533b839 Updated Jabber, Http and Mail modules to always set the parsedresult variable. 2017-09-01 10:49:12 +02:00
Kenneth Skovhede 1b3ede8921 Fixed not reading a custom http message 2017-08-01 11:48:38 +02:00
matt 150f15269e Added HTTP reporting module 2017-01-30 18:01:12 -05:00