2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

restapi, fix the issue that cannot set attribute which name is password

This commit is contained in:
WangXiaoPeng 2015-05-14 02:33:20 -04:00
parent 4b426bad0b
commit 47725c06ae

View File

@ -2908,12 +2908,13 @@ sub fetchParameters {
if (ref($phash) ne 'HASH') { error("put or post data must be a json object (hash/dict).", $STATUS_BAD_REQUEST); }
# if any general parms are in the put/post data, move them to genparms
foreach my $k (keys %$phash) {
if (grep(/^$k$/, @generalparamlist)) {
$genparms->{$k} = $phash->{$k};
delete($phash->{$k});
}
}
# Do not think this is neccessary and it caused the issue that set any 'password' key would fail.
# foreach my $k (keys %$phash) {
# if (grep(/^$k$/, @generalparamlist)) {
# $genparms->{$k} = $phash->{$k};
# delete($phash->{$k});
# }
# }
}
else { $phash = {}; }