From b6653d5c94bf5c196dd3ecfb028b45efa4f1a2f4 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Fri, 26 May 2017 20:18:19 -0500 Subject: [PATCH] Checks for input password fields are now case insensitive. Fixes #613 --- models/page.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/models/page.go b/models/page.go index 29ee4c3b..33277584 100644 --- a/models/page.go +++ b/models/page.go @@ -39,9 +39,11 @@ func (p *Page) parseHTML() error { // If we don't want to capture passwords, // find all the password fields and remove the "name" attribute. if !p.CapturePasswords { - passwordFields := f.Find("input[type=\"password\"]") - passwordFields.Each(func(j int, pass *goquery.Selection) { - pass.RemoveAttr("name") + inputs := f.Find("input") + inputs.Each(func(j int, input *goquery.Selection) { + if t, _ := input.Attr("type"); strings.EqualFold(t, "password") { + input.RemoveAttr("name") + } }) } } else {