Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add long password ipmi error #183

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

FrenkenFlores
Copy link
Contributor

The given IPMI password can be longer than IPMI expect. In that case the _parse_output method in Ipmitool's will output the following error "invalid literal for int() with base 16: 'lanplus:'". While if we look at the line that was taken from IPMI we will see that its "lanplus: password is longer than 20 bytes.". So the issue is that there is no check for this error and the function skips it and tries to convert that string from a hex into an integer. I have added an execption, regex check and the match check.

@coveralls
Copy link

coveralls commented Jan 7, 2025

Coverage Status

coverage: 69.858% (+0.03%) from 69.833%
when pulling 3758266 on FrenkenFlores:long_password_error
into f0df31e on kontron:master.

@hthiery
Copy link
Contributor

hthiery commented Jan 7, 2025

please meld commit into one .. and add a testcase.

thanks

The given IPMI password can be longer than IPMI expect. In that case the _parse_output method in Ipmitool's
will output the following error "invalid literal for int() with base 16: 'lanplus:'". While if we look at
the line that was taken from IPMI we will see that its "lanplus: password is longer than 20 bytes.".
So the issue is that there is no check for this error and the function skips it and tries to convert
that string from a hex into an integer. I have added an execption, regex check, the match check and
a test function.

Signed-off-by: Evloev Sayfuddin <[email protected]>
@hthiery hthiery merged commit 0de802b into kontron:master Jan 7, 2025
16 checks passed
@hthiery
Copy link
Contributor

hthiery commented Jan 7, 2025

thank you!

@FrenkenFlores FrenkenFlores deleted the long_password_error branch January 7, 2025 14:47
@FrenkenFlores
Copy link
Contributor Author

I am very glad to contribute!

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.

3 participants