Compare commits
23 Commits
hotfix/3.6
...
master
Author | SHA1 | Date |
---|---|---|
![]() |
49d79ce8c6 | |
![]() |
1fafd34f1f | |
![]() |
1d508dcdd9 | |
![]() |
626743d84e | |
![]() |
71dea9b3a7 | |
![]() |
2caf5eb02d | |
![]() |
5f1a3d0f25 | |
![]() |
a5ac65bf3f | |
![]() |
b269a1e392 | |
![]() |
20e5fac66f | |
![]() |
6e1fef7537 | |
![]() |
fb57fb7564 | |
![]() |
35f52000d2 | |
![]() |
e06463c0af | |
![]() |
898febc4c7 | |
![]() |
20affda749 | |
![]() |
a91abb3f02 | |
![]() |
76518ddbfb | |
![]() |
39d6b39920 | |
![]() |
3e78886dcf | |
![]() |
c26e255a6f | |
![]() |
1b762f71f3 | |
![]() |
a5335da207 |
|
@ -18,9 +18,7 @@ Teleport非常小巧且极易安装部署:**仅需一分钟,就可以安装
|
|||
Teleport支持部署到Linux系统中,目前支持的系统版本如下:
|
||||
|
||||
- Ubuntu 14.04 64位 及以上版本
|
||||
- CentOS 6.2 64位 及以上版本
|
||||
- Debian 6.0 64位 及以上版本
|
||||
- Redhat 6.2 64位 及以上版本
|
||||
- CentOS 7.2 64位 及以上版本
|
||||
|
||||
## 依赖环境
|
||||
|
||||
|
@ -28,7 +26,7 @@ Teleport支持部署到Linux系统中,目前支持的系统版本如下:
|
|||
|
||||
## 延伸阅读
|
||||
|
||||
[安装部署Teleport](https://github.com/eomsoft/teleport/wiki/deployment-install)
|
||||
[Telport在线文档](https://docs.tp4a.com/)
|
||||
|
||||
## 提供帮助
|
||||
|
||||
|
|
|
@ -679,11 +679,6 @@ class DoGetFileHandler(TPBaseHandler):
|
|||
self.set_status(400) # 400=错误请求
|
||||
return self.write('invalid param, `rid` and `f` must present.')
|
||||
|
||||
# 限制仅允许读取录像文件
|
||||
if not filename.startswith('tp-'):
|
||||
self.set_status(403) # 403=禁止
|
||||
return self.write('you have no such privilege.')
|
||||
|
||||
if act not in ['size', 'read']:
|
||||
self.set_status(400)
|
||||
return self.write('invalid param, `act` should be `size` or `read`.')
|
||||
|
|
|
@ -95,27 +95,22 @@ class DoLoginHandler(TPBaseJsonHandler):
|
|||
]:
|
||||
return self.write_json(TPE_PARAM, '未知的认证方式')
|
||||
|
||||
if len(username) == 0:
|
||||
return self.write_json(TPE_PARAM, '未提供登录用户名')
|
||||
|
||||
if login_type in [TP_LOGIN_AUTH_USERNAME_PASSWORD, TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA, TP_LOGIN_AUTH_USERNAME_PASSWORD_OATH]:
|
||||
if password is None or len(password) == 0:
|
||||
return self.write_json(TPE_PARAM, '未提供用户密码')
|
||||
|
||||
if login_type == TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA:
|
||||
oath = None
|
||||
code = self.get_session('captcha')
|
||||
if code is None or len(code) == 0:
|
||||
if code is None:
|
||||
return self.write_json(TPE_CAPTCHA_EXPIRED, '验证码已失效')
|
||||
if code.lower() != captcha.lower():
|
||||
return self.write_json(TPE_CAPTCHA_MISMATCH, '验证码错误')
|
||||
|
||||
if login_type in [TP_LOGIN_AUTH_USERNAME_OATH, TP_LOGIN_AUTH_USERNAME_PASSWORD_OATH]:
|
||||
if oath is None or len(oath) == 0:
|
||||
elif login_type in [TP_LOGIN_AUTH_USERNAME_OATH, TP_LOGIN_AUTH_USERNAME_PASSWORD_OATH]:
|
||||
if len(oath) == 0:
|
||||
return self.write_json(TPE_OATH_MISMATCH, '未提供身份验证器动态验证码')
|
||||
|
||||
self.del_session('captcha')
|
||||
|
||||
if len(username) == 0:
|
||||
return self.write_json(TPE_PARAM, '未提供登录用户名')
|
||||
|
||||
if login_type not in [TP_LOGIN_AUTH_USERNAME_PASSWORD,
|
||||
TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA,
|
||||
TP_LOGIN_AUTH_USERNAME_PASSWORD_OATH
|
||||
|
|
Loading…
Reference in New Issue