pull/32/merge
apexliu 2017-03-07 01:54:45 +08:00
parent 33a0c33663
commit bc4a8f730b
2 changed files with 40 additions and 32 deletions

1
external/readme.md vendored
View File

@ -27,4 +27,5 @@ teleport项目用到的第三方库
https://github.com/ARMmbed/mbedtls
mbedtls-mbedtls-2.2.1
注意teleport项目使用源代码直接编译因此解压缩源代码到此即可。
- libssh

View File

@ -340,10 +340,13 @@ void TsHttpRpc::_rpc_func_request_session(const Json::Value& json_param, ex_astr
int protocol = 0;
int is_enc = 1;
// TODO: 如果authid为正整数这是一个长期保留的认证ID如果是负整数这是一个临时的认证ID用于连接测试如果为0则报错
if (!json_param["authid"].isNull())
// 如果authid为正整数这是一个长期保留的认证ID如果是负整数这是一个临时的认证ID用于连接测试如果为0则报错
if (json_param["authid"].isNull())
{
// 使用认证ID的方式申请SID
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
return;
}
if (!json_param["authid"].isInt())
{
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
@ -351,6 +354,11 @@ void TsHttpRpc::_rpc_func_request_session(const Json::Value& json_param, ex_astr
}
authid = json_param["authid"].asInt();
if (0 == authid)
{
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
return;
}
Json::Value jret;
if (!ts_web_rpc_get_auth_info(authid, jret))
@ -373,7 +381,6 @@ void TsHttpRpc::_rpc_func_request_session(const Json::Value& json_param, ex_astr
user_auth = _jret["user_auth"].asString();
user_param = _jret["user_param"].asString();
account_name = _jret["account_name"].asString();
}
// 进一步判断参数是否合法