mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 22:41:03 +00:00 
			
		
		
		
	Backport #28023 by @6543
there was no check in place if a user could see a other user, if you
append e.g. `.rss`
(cherry picked from commit 69ea554e23)
	
	
This commit is contained in:
		
					parent
					
						
							
								6dfe993913
							
						
					
				
			
			
				commit
				
					
						d7408d8b0b
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -821,6 +821,11 @@ func UsernameSubRoute(ctx *context.Context) { | |||
| 	reloadParam := func(suffix string) (success bool) { | ||||
| 		ctx.SetParams("username", strings.TrimSuffix(username, suffix)) | ||||
| 		context_service.UserAssignmentWeb()(ctx) | ||||
| 		// check view permissions | ||||
| 		if !user_model.IsUserVisibleToViewer(ctx, ctx.ContextUser, ctx.Doer) { | ||||
| 			ctx.NotFound("user", fmt.Errorf(ctx.ContextUser.Name)) | ||||
| 			return false | ||||
| 		} | ||||
| 		return !ctx.Written() | ||||
| 	} | ||||
| 	switch { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue