temp.
parent
33a0c33663
commit
bc4a8f730b
|
@ -27,4 +27,5 @@ teleport项目用到的第三方库
|
||||||
https://github.com/ARMmbed/mbedtls
|
https://github.com/ARMmbed/mbedtls
|
||||||
mbedtls-mbedtls-2.2.1
|
mbedtls-mbedtls-2.2.1
|
||||||
注意:teleport项目使用源代码直接编译,因此解压缩源代码到此即可。
|
注意:teleport项目使用源代码直接编译,因此解压缩源代码到此即可。
|
||||||
|
- libssh
|
||||||
|
|
||||||
|
|
|
@ -340,10 +340,13 @@ void TsHttpRpc::_rpc_func_request_session(const Json::Value& json_param, ex_astr
|
||||||
int protocol = 0;
|
int protocol = 0;
|
||||||
int is_enc = 1;
|
int is_enc = 1;
|
||||||
|
|
||||||
// TODO: 如果authid为正整数,这是一个长期保留的认证ID,如果是负整数,这是一个临时的认证ID(用于连接测试),如果为0,则报错
|
// 如果authid为正整数,这是一个长期保留的认证ID,如果是负整数,这是一个临时的认证ID(用于连接测试),如果为0,则报错
|
||||||
if (!json_param["authid"].isNull())
|
|
||||||
|
if (json_param["authid"].isNull())
|
||||||
{
|
{
|
||||||
// 使用认证ID的方式申请SID
|
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!json_param["authid"].isInt())
|
if (!json_param["authid"].isInt())
|
||||||
{
|
{
|
||||||
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
|
_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();
|
authid = json_param["authid"].asInt();
|
||||||
|
if (0 == authid)
|
||||||
|
{
|
||||||
|
_create_json_ret(buf, TSR_INVALID_JSON_PARAM);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Json::Value jret;
|
Json::Value jret;
|
||||||
if (!ts_web_rpc_get_auth_info(authid, 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_auth = _jret["user_auth"].asString();
|
||||||
user_param = _jret["user_param"].asString();
|
user_param = _jret["user_param"].asString();
|
||||||
account_name = _jret["account_name"].asString();
|
account_name = _jret["account_name"].asString();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 进一步判断参数是否合法
|
// 进一步判断参数是否合法
|
||||||
|
|
Loading…
Reference in New Issue