mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 10:44:12 +01:00 
			
		
		
		
	Return 404 instead of 403 if user can not access the repo (#23155)
Fixes https://github.com/go-gitea/gitea/issues/23150 Before:  After:  Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							parent
							
								
									357042279b
								
							
						
					
					
						commit
						f1bde2fe00
					
				@ -228,7 +228,7 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if !p.CanAccess(accessMode, unitType) {
 | 
			
		||||
					ctx.PlainText(http.StatusForbidden, "User permission denied")
 | 
			
		||||
					ctx.PlainText(http.StatusNotFound, "Repository not found")
 | 
			
		||||
					return
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user