trento-project / agent

Trento Agent is a little process running in your OS, collecting metadata about SAP hosts.
Other
4 stars 10 forks source link

Fix verify_password gatherer for scenarios where there is not hash #305

Closed arbulu89 closed 9 months ago

arbulu89 commented 10 months ago

https://bugzilla.suse.com/show_bug.cgi?id=1217543

>  panic: runtime error: index out of range [2] with length 1
> 
> goroutine 264 [running]:
>  github.com/trento-project/agent/internal/factsengine/gatherers.(VerifyPasswordGatherer).getSalt(0xc000484030, {0xc0005ab5a0, 0x9})
>  github.com/trento-project/agent/internal/factsengine/gatherers/verifypassword.go:111 +0x21c
>  github.com/trento-project/agent/internal/factsengine/gatherers.(VerifyPasswordGatherer).Gather(0xc000484030?, {0xc00030f100, 0x1, 0x1?})
>  github.com/trento-project/agent/internal/factsengine/gatherers/verifypassword.go:68 +0x1e5
>  github.com/trento-project/agent/internal/factsengine.gatherFacts.func1()
>  github.com/trento-project/agent/internal/factsengine/gathering.go:44 +0xb9
>  golang.org/x/sync/errgroup.(Group).Go.func1()
>  golang.org/x/[sync@v0.2.0](mailto:sync@v0.2.0)/errgroup/errgroup.go:75 +0x64
>  created by golang.org/x/sync/errgroup.(Group).Go
>  golang.org/x/[sync@v0.2.0](mailto:sync@v0.2.0)/errgroup/errgroup.go:72 +0xa5