Commit Graph

21 Commits

Author SHA1 Message Date
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
c60d413a70 Misc 2021-09-15 12:43:25 +02:00
Łukasz Domeradzki
9f281c6055 Embrace madness (#2394)
* Embrace madness

* Remove unused code

* Misc

* Address Abry's note

* Update for Madness 0.3.0
2021-08-07 14:03:46 +02:00
Archi
a1955bc881 Mark additional stuff for removal 2021-08-02 22:15:37 +02:00
Archi
6e285178d4 Misc 2021-07-23 20:35:48 +02:00
Archi
7ff747fb6e Misc 2021-07-23 17:05:43 +02:00
Sebastian Göls
4b7edf388c Fix GlobalConfig update via IPC removing IPCPassword (#2379) 2021-07-23 16:54:20 +02:00
Archi
d479eb9f97 Address Rider EAP inspections/cleanup 2021-07-12 21:45:17 +02:00
Archi
cfa23ffe21 Misc 2021-07-01 12:00:23 +02:00
Archi
0060e76829 Make custom swagger limitations more generic to use 2021-06-30 22:23:01 +02:00
Archi
874eb4d3a6 Add helpful limitations on properties for https://github.com/JustArchiNET/ASF-ui/issues/1445
Monologue explaining how it works: https://ptb.discord.com/channels/267292556709068800/332735075315744768/859854787634004049

(eventually also on wiki)
2021-06-30 20:39:38 +02:00
Łukasz Domeradzki
2aab56b775 Rewrite SendMessage() functions to account for new rate-limits (#2335)
* Rewrite SendMessage() functions to account for new rate-limits

* Refactor new message splitting logic into SteamChatMessage.cs

This makes it ready for unit tests

* Change the concept into UTF8-oriented logic

* Misc

* Add fix for another unit test

* Update

* Fix failing test

I SPENT HOURS ON THIS

* Misc

* Misc

* Add additional unit tests ensuring this works as designed

* Misc

* Misc

* Add one more unit test

* Rework the logic to account for new findings

* Misc

* Add unit test verifying exception on too long prefix

* Address first @Abrynos concern

Because we can

* Throw also on too long prefix in regards to newlines

* Correct wrong bytesRead calculation

This worked previously only because we actually never had enough of room for escaped chars anyway and skipped over (2 + 2 missing bytes was smaller than 5 required to make a line)

* Add unit test verifying if calculation was done properly

* Address @Ryzhehvost concern

* Handle empty newlines in the message properly

* Misc

No reason to even calculate utf8 bytes for empty lines

* Misc

* Add unit test verifying the reserved escape message bytes count

* Correct calculation of lines by taking into account \r

* Update ArchiSteamFarm/Steam/Bot.cs

Co-authored-by: Sebastian Göls <6608231+Abrynos@users.noreply.github.com>

* @Abrynos next time check if it compiles without warnings

* Update SteamChatMessage.cs

* Apply @Abrynos idea in a different way

* Rewrite bot part to remove unnecessary delegate

* Add @Ryzhehvost test

* Add debug output

* Extend @Ryzhehvost test for prefix

* Misc

* Misc refactor

* Misc

* Misc

* Add logic for limited accounts, correct for unlimited

Thanks @Ryzhehvost

* Misc

Co-authored-by: Sebastian Göls <6608231+Abrynos@users.noreply.github.com>
2021-06-18 19:50:14 +02:00
Archi
59ae27c0d0 Avoid even asking for login keys if it's not needed
ASF is already smart enough to not >use< a login key when it's not needed, but the sole fact of asking for it might screw up Valve's backend and in result cause issues for the client, totally for no reason, as we're not going to use it anyway.

The original idea was to keep it around "just in case" if the user removed his password or 2FA, but that is completely moot the moment we realize the alone fact of that bool property being set can cause the problems.

Login keys should only be used if both:
a) User left it enabled in the config
b) We can't guarantee all the details during login procedure, that is mainly a missing password in the config and/or lack of ASF 2FA. We're not going to enhance the logic for completely insecure accounts as they should opt into SteamGuard or 2FA ASAP, making the login key needed.

Also fix setter visibility for BotConfig while at it, if plugins want to set those properties themselves, they have Bot.SetUserInput() function instead.
2021-05-25 00:08:16 +02:00
Archi
bdf541b058 Implement --no-config-migrate option 2021-05-20 22:42:30 +02:00
JustArchi
e146db732c Misc 2021-05-09 00:05:40 +02:00
JustArchi
5edfaa9840 IPC: true is the new default 2021-05-08 23:44:36 +02:00
JustArchi
2d969758f6 Add auto-migration of global config, remove unnecessary delay 2021-05-08 23:23:34 +02:00
JustArchi
55cd466a1e Use simplified logic also for global config 2021-05-08 22:21:50 +02:00
JustArchi
bf89c005d7 Refactor a few bot config properties, add auto-migration 2021-05-08 22:00:25 +02:00
JustArchi
d21d2473fe RuntimeCompatibility -> Compatibility 2021-05-08 01:43:08 +02:00
JustArchi
e60b54e402 Refactor EVERYTHING
Directories structure + namespaces relevant to them
2021-05-08 01:37:22 +02:00