mirror of https://github.com/gophish/gophish
Checks for input password fields are now case insensitive. Fixes #613
parent
1fafe4845f
commit
b6653d5c94
|
@ -39,9 +39,11 @@ func (p *Page) parseHTML() error {
|
||||||
// If we don't want to capture passwords,
|
// If we don't want to capture passwords,
|
||||||
// find all the password fields and remove the "name" attribute.
|
// find all the password fields and remove the "name" attribute.
|
||||||
if !p.CapturePasswords {
|
if !p.CapturePasswords {
|
||||||
passwordFields := f.Find("input[type=\"password\"]")
|
inputs := f.Find("input")
|
||||||
passwordFields.Each(func(j int, pass *goquery.Selection) {
|
inputs.Each(func(j int, input *goquery.Selection) {
|
||||||
pass.RemoveAttr("name")
|
if t, _ := input.Attr("type"); strings.EqualFold(t, "password") {
|
||||||
|
input.RemoveAttr("name")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue