From e6cfccdd40397b95dcf3de0ea9b484feea954fc2 Mon Sep 17 00:00:00 2001 From: "Kim \"BKC\" Carlbäcker" Date: Fri, 7 Oct 2016 19:17:27 +0200 Subject: GitHub API Compliance (& linting) --- modules/auth/auth.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/auth/auth.go b/modules/auth/auth.go index ed94d0a698..811f890746 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -35,6 +35,9 @@ 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 { + tokenSHA = ctx.Query("access_token") + } if len(tokenSHA) == 0 { // Well, check with header again. auHead := ctx.Req.Header.Get("Authorization") -- cgit v1.2.3