Commit Graph

393 Commits

Author SHA1 Message Date
JustArchi
533bf45f35 Thanks netf 2022-10-10 22:57:34 +02:00
JustArchi
6227f84931 Misc cleanup 2022-10-10 22:50:36 +02:00
Sebastian Göls
5a182b7522 Add --input-cryptkey argument (#2714)
* Add --input-cryptkey argument

* Improve readability of argument parsing

* Make the compiler shut up

* Remove German translation again

* Revert switch expression

* Fix unused cryptkey

It seems to be late
2022-10-07 19:32:58 +02:00
JustArchi
712b53cb72 Add log errors for crypt file edge cases 2022-09-08 20:08:39 +02:00
JustArchi
dc0502a671 Add support for ASF_CRYPTKEY_FILE 2022-09-08 19:53:36 +02:00
JustArchi
ff7f661197 Misc 2022-06-04 22:46:37 +02:00
Sebastian Göls
b83f8fc669 Update Program.cs (#2589) 2022-05-25 17:18:06 +02:00
Archi
9f68d17a28 Add initialization for Madness
This is probably not needed, but might come useful in the future.
2022-04-23 13:09:51 +02:00
Archi
0bbc85527a Allow cmdline arg for forbidding Steam parental generation 2022-04-06 14:16:26 +02:00
Archi
8620a90787 Remove all workarounds that should be no longer needed 2022-01-10 11:19:35 +01:00
Archi
1809028c77 Rider cleanup 2022-01-06 20:22:38 +01:00
Archi
81a92d6781 Misc 2021-12-20 18:27:54 +01:00
Archi
4f598d5c8f Latest Rider cleanups 2021-12-12 01:12:54 +01:00
Archi
31da584f75 Relax root warning
Even though the case is justified, we shouldn't render whole setups unsupported because of that, as running as root, while discouraged, does not directly affect the program stability.

This is especially true on Windows boxes where there is a lot of setups running with administrators by default and users are not even aware of that, I don't have a good fix for them (apart from reinstallation), and because I do not, I should not expect from them to supply cmd-line arg they don't even understand why.
2021-12-04 13:38:00 +01:00
Archi
94c214af96 Init emergency loggers to notify user about very early failures
"Very early failures" include exclusively lack of being able to navigate to given --path, as everything else is postponed until we get core loggers up and running. We should print the information to the user and abort the program at the minimum in this case.

Until now ASF silently ignored those errors and proceeded like usual, this is unwanted, if --path is wrong then it's on user to fix it.
2021-12-04 02:33:23 +01:00
Archi
6a824c2c6f Avoid verifying whether the special folder exists
We don't care at this stage, we'll fail when moving to given location
2021-11-29 23:43:19 +01:00
Archi
ac02495e80 Replace ~ in path with user's home location 2021-11-29 23:32:51 +01:00
Archi
5ba0ad8eed Hide https://github.com/dotnet/runtime/issues/60856 2021-11-23 10:47:33 +01:00
Archi
941b704c41 Satisfy netf 2021-11-11 23:43:49 +01:00
Archi
1e6ab11d9f Use file-scoped namespaces 2021-11-10 21:23:24 +01:00
Archi
9aaf8d8215 Refuse to run as root
hooray
2021-11-10 19:18:00 +01:00
Archi
0964cdac96 Minimize define hell
Skipping a 20 KB stub in OS-specific non-windows builds and omitting a few very fast if checks isn't worth the code quality degradation that involves all of the ifdef options.

ifdefs should be reserved for stuff that either doesn't compile whatsoever in some specific configurations (NETFRAMEWORK), or is required to make logical decisions based on the compiler input (e.g. DEBUG for detecting debugging builds or ASF_VARIANT_* for hardcoding the platform identifier to use for auto-updates)

In all other situations, we should use OperatingSystem if condition, even if it's equal to hitting them on the platforms that are unlikely to hit them.

And I say unlikely, because nothing stops me from downloading a win-x64 build and running it like a generic one on windows, what you gonna do?
2021-11-10 19:03:05 +01:00
Łukasz Domeradzki
e62234892a Fix SIGINT/SIGTERM no longer working in .NET 6.0 (#2449)
* Try to use new signals

* Fix for netf and windows

* Misc
2021-11-10 18:40:12 +01:00
Archi
3b5a07aab3 React appropriate to SIGINT (CTRL+C)
We're using custom console mechanism in order to implement interactive console, on top of that CTRL+C would not work when using IPC: true due to the fact that it doesn't trigger shutdown sequence, fix both of those problems by listening to SIGINT and exiting with code 130 upon receiving one

Tested on Linux
2021-11-01 18:55:58 +01:00
Archi
eb876aa4d1 Warn about incomplete translation also in our plugin 2021-10-24 18:40:26 +02:00
Archi
618ff781eb Use ASF user account inside docker 2021-10-17 16:19:07 +02:00
Archi
8580852f84 Avoid a breaking change 2021-10-17 01:05:22 +02:00
Łukasz Domeradzki
bfbeb91633 Refuse to run as root without explicit ignore (#2427)
* Refuse to run as root without explicit ignore

* Apply feedback

* Detect docker a bit better

* Guard more OS parts behind ifdefs

* Fix warnings

* Further fixes
2021-10-17 00:11:04 +02:00
Archi
fc0c916137 Extend warnings for --cryptkey and lack of it
@Abrynos
2021-10-13 23:24:07 +02:00
Sebastian Göls
be027523ac Warn about insecure passwords (#2419)
* Add warnings about password security

* Warn about weak steam passwords even if they are encrypted

* Apply feedback

* Apply feedback

* Simplify code

* Move return criteria up a bit for increased performance

* Choose more fitting strings for localization

* Extract const value

* Fix incorrect null reference warning

* Switch prefix operator for postfix one

Co-authored-by: Łukasz Domeradzki <JustArchi@JustArchi.net>

* Add tests

* Disable CA1724

The type name Utilities conflicts in whole or in part with the namespace name 'Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities'.

* Tell users why their password is considered weak

* Apply feedback

* Merge resource comments

* Misc.

* Use library for password testing and Run testing in background

* Clean up

* OncSeparate forbidden phrases forfor IPC passwords (once again)

* Additionally check encryption key

* Add comment about {0}

Co-authored-by: Łukasz Domeradzki <JustArchi@JustArchi.net>
2021-10-13 21:44:48 +02:00
Archi
7e9e90764b Use static lambdas wherever possible
Thanks Rider
2021-09-27 21:33:52 +02:00
Archi
f2d3a2a894 Use string interpolation wherever possible
Majority of cases still need to go through string.Format() due to localization requirements
2021-09-27 19:59:00 +02:00
Archi
1bfedbe5e8 Implement --service cmd-line arg 2021-09-26 01:05:38 +02:00
Archi
4935ec3187 Remove support for SystemEvents.TimeChanged
This causes excessive delay during ASF shutdown on Windows, and because it's completely optional for irrelevant feature, it's not worth the burden
2021-09-02 13:45:56 +02:00
Łukasz Domeradzki
bb513921f1 Include ASF's windows-only parts only in generic and windows builds (#2404)
* Include ASF's windows-only parts only in generic and windows builds

* Apply Abry's note
2021-08-13 23:07:17 +02:00
Archi
de0ee3a497 Make use of latest Madness 1.1.0 features 2021-08-10 17:09:46 +02:00
Łukasz Domeradzki
f403e9c296 Better April Fools (#2401)
* Better April Fools

* Guard timer with lock

It's not thread-safe

* Address Abry note

* Add extra 100ms to the timer calculation
2021-08-10 11:43:36 +02:00
Archi
0e2510528b Cleanup program initialization
Initial string[] args actually can't be null according to MSDN
2021-07-26 00:19:09 +02:00
Archi
ead2d460f5 Make program args case-insensitive
There is no good reason why it should be case-sensitive
2021-07-25 23:50:02 +02:00
Archi
5d5baca72e Include more information as program identifier and user-agent 2021-07-19 14:37:58 +02:00
Archi
d479eb9f97 Address Rider EAP inspections/cleanup 2021-07-12 21:45:17 +02:00
Archi
abd8d41d06 Closes #2342 2021-06-23 12:51:24 +02:00
Archi
edf46c0ff4 Misc: copyright notice on program startup 2021-06-15 13:10:45 +02:00
Archi
bdf541b058 Implement --no-config-migrate option 2021-05-20 22:42:30 +02:00
JustArchi
e5872156c3 Add support for custom encodings 2021-05-11 23:10:16 +02:00
JustArchi
2d969758f6 Add auto-migration of global config, remove unnecessary delay 2021-05-08 23:23:34 +02:00
JustArchi
e60b54e402 Refactor EVERYTHING
Directories structure + namespaces relevant to them
2021-05-08 01:37:22 +02:00
JustArchi
b6772b9b1e Resolve CA1034 2021-05-06 20:16:06 +02:00
JustArchi
bfe453d9ca Rename 2/2 2021-03-30 10:14:23 +02:00
JustArchi
e122939906 Misc 2021-03-29 21:47:25 +02:00