diff --git a/handler/paste/paste_test.go b/handler/paste/paste_test.go index 3901e74..4bc80f8 100644 --- a/handler/paste/paste_test.go +++ b/handler/paste/paste_test.go @@ -137,7 +137,7 @@ func creatTestCaseGenerator() map[string]testCase { "lang": "python", "password": password, "self_destruct": pasteType != "permanent", - "expire_second": 1, + "expire_second": 60, "expire_count": 1, }, map[string]string{}, diff --git a/handler/paste/util.go b/handler/paste/util.go index b720f0f..1a2587f 100644 --- a/handler/paste/util.go +++ b/handler/paste/util.go @@ -76,7 +76,7 @@ func authenticator(body CreateRequest) *common.ErrorResponse { if body.ExpireCount > 1 { return common.ErrUnauthorized } - if body.ExpireSecond > 5 { + if body.ExpireSecond > 5 * 60 { return common.ErrUnauthorized } }