validate_input() rejected the valid TOKEN_CODE_SIZE length and accepted
all others. Compare with != so only a wrong length is rejected.
Fixes: https://tracker.ceph.com/issues/77872
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
return -EINVAL;
}
}
- if (! tokenCode.empty() && tokenCode.size() == TOKEN_CODE_SIZE) {
+ if (! tokenCode.empty() && tokenCode.size() != TOKEN_CODE_SIZE) {
ldpp_dout(dpp, 0) << "Either token code is empty or token code size is invalid: " << tokenCode.size() << dendl;
return -EINVAL;
}