Check negative limit command parameter (#358) #359

Merged
6543 merged 3 commits from hamdouni/tea:fix-358 into master 2021-05-15 14:16:24 +00:00

View File

@ -39,6 +39,9 @@ type TeaContext struct {
func (ctx *TeaContext) GetListOptions() gitea.ListOptions {
page := ctx.Int("page")
limit := ctx.Int("limit")
if limit < 0 {
limit = 0
}
if limit != 0 && page == 0 {
page = 1
}