stmcginnis / gofish

Gofish is a Golang client library for DMTF Redfish and SNIA Swordfish interaction.
BSD 3-Clause "New" or "Revised" License
211 stars 112 forks source link

Unable to unset BIOS password using Bios.ChangePassword #272

Closed riethm closed 1 year ago

riethm commented 1 year ago

The validations that both the old and new password must be non-empty seem possibly excessive? How does one set a password where no password was previously set? Likewise, how does one unset a previously set Bios password?

https://github.com/stmcginnis/gofish/blob/4738a5dd94705718f76629d4d88f04176d9fba7f/redfish/bios.go#L158-L163

At least on our systems (Lenovo), redfish permits an empty current or new password. Does it seem reasonable to remove this restriction from the gofish library?

stmcginnis commented 1 year ago

Hmm, good catch @riethm. I don't think this use case has come up yet, but that seems totally reasonable to allow an empty string.

Feel free to put a PR, otherwise I can try to get to it soon.