mirror of
https://github.com/gophish/gophish
synced 2024-11-14 00:07:19 +00:00
Checks for input password fields are now case insensitive. Fixes #613
This commit is contained in:
parent
1fafe4845f
commit
b6653d5c94
1 changed files with 5 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue