Skip to content

fix(lenovo): send empty string for OldPassword in Bios.ChangePassword#1

Open
martinraumann wants to merge 1 commit into
mainfrom
fix/lenovo-uefi-password-empty-string
Open

fix(lenovo): send empty string for OldPassword in Bios.ChangePassword#1
martinraumann wants to merge 1 commit into
mainfrom
fix/lenovo-uefi-password-empty-string

Conversation

@martinraumann

Copy link
Copy Markdown
Owner

Bug

When change_uefi_password is called with an empty current_uefi_password on Lenovo hardware, the empty string was being serialized as null in the JSON body sent to Bios.ChangePassword. Lenovo BMC rejects null — it requires an explicit empty string "".

Fix

Override change_uefi_password in src/lenovo.rs to build the Redfish request directly using a HashMap<String, String> instead of delegating to the standard implementation. This ensures that empty strings are serialized as "" in the JSON body, not null.

The fix uses String values throughout, so serde preserves empty strings as empty strings instead of converting them to null values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant