mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Implement enhanced support for SteamParental
- Detect if SteamParental is active - Verify if the code supplied by user is valid - If the code is not valid or not supplied, generate it automatically (through local bruteforcing, pending further speed enhancements) It's really sad seeing how this is possible, Valve seriously, you couldn't dedicate one single request in the backend to verify that? You could easily implement rate-limiting on invalid attempts and make parental more secure, but with the current implementation it's a security joke.
This commit is contained in:
@@ -2417,16 +2417,24 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(BotConfig.SteamParentalCode) && (BotConfig.SteamParentalCode.Length != 4)) {
|
||||
string steamParentalCode = await Logging.GetUserInput(ASF.EUserInputType.SteamParentalCode, BotName).ConfigureAwait(false);
|
||||
(bool isSteamParentalEnabled, string steamParentalCode)? steamParental = await ArchiHandler.ValidateSteamParental(BotConfig.SteamParentalCode).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(steamParentalCode) || (steamParentalCode.Length != 4)) {
|
||||
Stop();
|
||||
if (steamParental?.isSteamParentalEnabled == true) {
|
||||
if (!string.IsNullOrEmpty(steamParental.Value.steamParentalCode)) {
|
||||
if (BotConfig.SteamParentalCode != steamParental.Value.steamParentalCode) {
|
||||
SetUserInput(ASF.EUserInputType.SteamParentalCode, steamParental.Value.steamParentalCode);
|
||||
}
|
||||
} else {
|
||||
string steamParentalCode = await Logging.GetUserInput(ASF.EUserInputType.SteamParentalCode, BotName).ConfigureAwait(false);
|
||||
|
||||
break;
|
||||
if (string.IsNullOrEmpty(steamParentalCode) || (steamParentalCode.Length != 4)) {
|
||||
Stop();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
SetUserInput(ASF.EUserInputType.SteamParentalCode, steamParentalCode);
|
||||
}
|
||||
|
||||
SetUserInput(ASF.EUserInputType.SteamParentalCode, steamParentalCode);
|
||||
}
|
||||
|
||||
ArchiWebHandler.OnVanityURLChanged(callback.VanityURL);
|
||||
|
||||
Reference in New Issue
Block a user