mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	#1474 logic fix
This commit is contained in:
		| @@ -45,7 +45,7 @@ func UpdateGravatarSource() { | |||||||
| 	gravatarSource = setting.GravatarSource | 	gravatarSource = setting.GravatarSource | ||||||
| 	if strings.HasPrefix(gravatarSource, "//") { | 	if strings.HasPrefix(gravatarSource, "//") { | ||||||
| 		gravatarSource = "http:" + gravatarSource | 		gravatarSource = "http:" + gravatarSource | ||||||
| 	} else if !strings.HasPrefix(gravatarSource, "http://") || | 	} else if !strings.HasPrefix(gravatarSource, "http://") && | ||||||
| 		!strings.HasPrefix(gravatarSource, "https://") { | 		!strings.HasPrefix(gravatarSource, "https://") { | ||||||
| 		gravatarSource = "http://" + gravatarSource | 		gravatarSource = "http://" + gravatarSource | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -119,7 +119,7 @@ func Toggle(options *ToggleOptions) macaron.Handler { | |||||||
| func ApiReqToken() macaron.Handler { | func ApiReqToken() macaron.Handler { | ||||||
| 	return func(ctx *Context) { | 	return func(ctx *Context) { | ||||||
| 		if !ctx.IsSigned { | 		if !ctx.IsSigned { | ||||||
| 			ctx.Error(403) | 			ctx.Error(401) | ||||||
| 			return | 			return | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| @@ -128,7 +128,7 @@ func ApiReqToken() macaron.Handler { | |||||||
| func ApiReqBasicAuth() macaron.Handler { | func ApiReqBasicAuth() macaron.Handler { | ||||||
| 	return func(ctx *Context) { | 	return func(ctx *Context) { | ||||||
| 		if !ctx.IsBasicAuth { | 		if !ctx.IsBasicAuth { | ||||||
| 			ctx.Error(403) | 			ctx.Error(401) | ||||||
| 			return | 			return | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user