From 5a4648cdd697be92d33be55cd85069365cce2588 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Sat, 20 Oct 2018 23:25:14 +0200 Subject: Remove check for negative length (#5120) --- modules/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/auth') diff --git a/modules/auth/auth.go b/modules/auth/auth.go index 8391e7de8f..0d703084da 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -36,7 +36,7 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 { // Check access token. if IsAPIPath(ctx.Req.URL.Path) { tokenSHA := ctx.Query("token") - if len(tokenSHA) <= 0 { + if len(tokenSHA) == 0 { tokenSHA = ctx.Query("access_token") } if len(tokenSHA) == 0 { -- cgit v1.2.3