Skip to content

Commit fdf85a8

Browse files
authored
Merge pull request #265 from jemygraw/master
publish version 7.1.3
2 parents fccfbb0 + 1bb4cd7 commit fdf85a8

File tree

5 files changed

+9
-74
lines changed

5 files changed

+9
-74
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
#Changelog
1+
# Changelog
2+
3+
## 7.1.3 (2017-06-05)
4+
### 修正
5+
* cdn功能中获取域名日志列表的参数错误
26

37
## 7.1.2 (2017-03-24)
48
### 增加

examples/pfop_ vframe.py

-29
This file was deleted.

examples/pfop_ watermark.py

-32
This file was deleted.

qiniu/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# flake8: noqa
1111

12-
__version__ = '7.1.2'
12+
__version__ = '7.1.3'
1313

1414
from .auth import Auth, QiniuMacAuth
1515

qiniu/auth.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
# 上传策略,参数规格详见
14-
# http://developer.qiniu.com/docs/v6/api/reference/security/put-policy.html
14+
# https://developer.qiniu.com/kodo/manual/1206/put-policy
1515
_policy_fields = set([
1616
'callbackUrl', # 回调URL
1717
'callbackBody', # 回调Body
@@ -37,19 +37,14 @@
3737
'deleteAfterDays', # 文件多少天后自动删除
3838
])
3939

40-
_deprecated_policy_fields = set([
41-
'asyncOps'
42-
])
43-
44-
4540
class Auth(object):
4641
"""七牛安全机制类
4742
4843
该类主要内容是七牛上传凭证、下载凭证、管理凭证三种凭证的签名接口的实现,以及回调验证。
4944
5045
Attributes:
51-
__access_key: 账号密钥对中的accessKey,详见 https://portal.qiniu.com/setting/key
52-
__secret_key: 账号密钥对重的secretKey,详见 https://portal.qiniu.com/setting/key
46+
__access_key: 账号密钥对中的accessKey,详见 https://portal.qiniu.com/user/key
47+
__secret_key: 账号密钥对重的secretKey,详见 https://portal.qiniu.com/user/key
5348
"""
5449

5550
def __init__(self, access_key, secret_key):
@@ -178,8 +173,6 @@ def verify_callback(self, origin_authorization, url, body, content_type='applica
178173
@staticmethod
179174
def __copy_policy(policy, to, strict_policy):
180175
for k, v in policy.items():
181-
if k in _deprecated_policy_fields:
182-
raise ValueError(k + ' has deprecated')
183176
if (not strict_policy) or k in _policy_fields:
184177
to[k] = v
185178

@@ -189,7 +182,6 @@ def __init__(self, auth):
189182
self.auth = auth
190183

191184
def __call__(self, r):
192-
token = None
193185
if r.body is not None and r.headers['Content-Type'] == 'application/x-www-form-urlencoded':
194186
token = self.auth.token_of_request(r.url, r.body, 'application/x-www-form-urlencoded')
195187
else:

0 commit comments

Comments
 (0)