File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11#CHANGELOG
22
3+ ## v2.4.2
4+
5+ Issue [ #48 ] ( https://github.com/qiniu/nodejs-sdk/pull/48 ) :
6+
7+ - 去除 auth.GetPolicy.scope 的默认值:"* /* "
8+
9+ Issue [ #46 ] ( https://github.com/qiniu/nodejs-sdk/pull/46 ) :
10+
11+ - 更新 v2.4.1 的文档(docs/README.md)
12+
13+
314## v2.4.1
415
5162013-02-09
Original file line number Diff line number Diff line change @@ -47,8 +47,7 @@ function PutPolicy(opts) {
4747
4848PutPolicy . prototype . token = function ( ) {
4949 var params = {
50- "deadline" : this . expires + Math . floor ( Date . now ( ) / 1000 ) ,
51- "escape" : this . excape ,
50+ "deadline" : this . expires + Math . floor ( Date . now ( ) / 1000 )
5251 } ;
5352 if ( this . scope !== null ) {
5453 params [ "scope" ] = this . scope ;
@@ -65,6 +64,9 @@ PutPolicy.prototype.token = function() {
6564 if ( this . asyncOps !== null ) {
6665 params [ "asyncOps" ] = this . asyncOps ;
6766 }
67+ if ( this . escape ) {
68+ params [ "escape" ] = this . excape ;
69+ }
6870 return generateToken ( params ) ;
6971} ;
7072
@@ -73,7 +75,7 @@ PutPolicy.prototype.token = function() {
7375
7476function GetPolicy ( opts ) {
7577 this . expires = opts . expires || 3600 ;
76- this . scope = opts . scope || "*/*" ;
78+ this . scope = opts . scope ; // GetPolicy.scope 没有默认值:用 "*/*" 访问权限太高!
7779}
7880
7981GetPolicy . prototype . token = function ( ) {
You can’t perform that action at this time.
0 commit comments