mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-20 03:40:49 +02:00
Fixed: (Cardigann) Ignore disabled or unchecked inputs in login
This commit is contained in:
parent
bdc0178e44
commit
450c6d7af5
1 changed files with 12 additions and 1 deletions
|
|
@ -5,8 +5,11 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using AngleSharp.Dom;
|
||||
using AngleSharp.Html;
|
||||
using AngleSharp.Html.Dom;
|
||||
using AngleSharp.Html.Parser;
|
||||
using AngleSharp.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
|
@ -281,7 +284,15 @@ public async Task DoLogin()
|
|||
foreach (var input in inputs)
|
||||
{
|
||||
var name = input.GetAttribute("name");
|
||||
if (name == null)
|
||||
|
||||
if (name == null || input.IsDisabled())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (input is IHtmlInputElement element &&
|
||||
element.Type.IsOneOf(InputTypeNames.Checkbox, InputTypeNames.Radio) &&
|
||||
!input.IsChecked())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue