Open
fix: validate check_user request credentials before use #21
super dog.Add on May 27
May 27 Added label: sig/sig-Migration
openeuler-ci-bot
May 27 Comments:
May 27 Comments:
Welcome To openEuler Community
Hey @papertager , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.
Contact Guide
If you have any questions, please contact the SIG: sig-Migration ,
and any of the maintainers: @blublue, @genedna, @stonefly128, @weidongkl, @xingwei-liu, @yeqinglong01 ,
and any of the committers: @blublue .


May 27 Associated pull request
Problem
func/check.py:check_user()directly indexesjson_data["user"]andjson_data["passwd"]. If the client sends an incomplete request, the handler raisesKeyError.Impact
Malformed credential validation requests can crash the handler instead of returning a normal error response.
Suggested Fix
Read
userandpasswdwith validation before writing the password file or starting SSH validation.