diff options
author | Ed Tanous <ed.tanous@intel.com> | 2018-10-05 01:54:21 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2018-10-22 19:04:03 +0300 |
commit | 820ce598b31a6f9bf4d3715d337b8e5ee47196c7 (patch) | |
tree | bf9999bac3c38e21b5841bf565a372ad79730831 /redfish-core/src/utils | |
parent | c85eb8b739db9b0d42d27bf79439508075bbb0eb (diff) | |
download | bmcweb-820ce598b31a6f9bf4d3715d337b8e5ee47196c7.tar.xz |
Clean up SessionService POST
Previously, SessionService would return a json decode error for all
errors, even if certain keys were incorrect. This updates the POST
handler to use a better method, and should reduce the binary size a
little, given that we're removing the possibly throwing get<> code.
This needs a very good review. This endpoint is available pre-auth, and
needs to be secure regardless of input.
Tested By:
curl --noproxy "*" -k -X POST -d '{"UserName": "root", "Password":
"0penBmc"}' https://10.243.48.30/redfish/v1/SessionService/Sessions/
Returns correct response.
Tested several variations, including extra parameters, missing username,
missing password, ect. Got correct error code in all cases.
Change-Id: Ic8e6edd9f7badc0d22aa8dafa9c0c260386712ac
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'redfish-core/src/utils')
0 files changed, 0 insertions, 0 deletions