···4242// Returns nil if header is empty or validation fails.
4343func (b *Basic) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) (*user_model.User, error) {
4444 // Basic authentication should only fire on API, Download or on Git or LFSPaths
4545- if !middleware.IsAPIPath(req) && !isContainerPath(req) && !isAttachmentDownload(req) && !isGitRawReleaseOrLFSPath(req) {
4545+ if !middleware.IsAPIPath(req) && !isContainerPath(req) && !isAttachmentDownload(req) && !isGitRawOrAttachOrLFSPath(req) {
4646 return nil, nil
4747 }
4848
+1-1
services/auth/oauth2.go
···127127func (o *OAuth2) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) (*user_model.User, error) {
128128 // These paths are not API paths, but we still want to check for tokens because they maybe in the API returned URLs
129129 if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isAuthenticatedTokenRequest(req) &&
130130- !gitRawReleasePathRe.MatchString(req.URL.Path) {
130130+ !isGitRawOrAttachPath(req) {
131131 return nil, nil
132132 }
133133
+1-1
services/auth/reverseproxy.go
···117117 }
118118119119 // Make sure requests to API paths, attachment downloads, git and LFS do not create a new session
120120- if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isGitRawReleaseOrLFSPath(req) {
120120+ if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isGitRawOrAttachOrLFSPath(req) {
121121 if sess != nil && (sess.Get("uid") == nil || sess.Get("uid").(int64) != user.ID) {
122122 handleSignIn(w, req, sess, user)
123123 }