mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Fix panic when attempt login with non-exist user
This commit is contained in:
		| @@ -3,7 +3,7 @@ Gogs - Go Git Service [ |  | ||||||
|  |  | ||||||
| ##### Current tip version: 0.9.97 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) | ##### Current tip version: 0.9.98 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) | ||||||
|  |  | ||||||
| | Web | UI  | Preview  | | | Web | UI  | Preview  | | ||||||
| |:-------------:|:-------:|:-------:| | |:-------------:|:-------:|:-------:| | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ import ( | |||||||
| 	"github.com/gogits/gogs/modules/setting" | 	"github.com/gogits/gogs/modules/setting" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const APP_VER = "0.9.97.0901" | const APP_VER = "0.9.98.0901" | ||||||
|  |  | ||||||
| func init() { | func init() { | ||||||
| 	runtime.GOMAXPROCS(runtime.NumCPU()) | 	runtime.GOMAXPROCS(runtime.NumCPU()) | ||||||
|   | |||||||
| @@ -540,7 +540,7 @@ func UserSignIn(username, passowrd string) (*User, error) { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	sources := make([]*LoginSource, 3) | 	sources := make([]*LoginSource, 0, 3) | ||||||
| 	if err = x.UseBool().Find(&sources, &LoginSource{IsActived: true}); err != nil { | 	if err = x.UseBool().Find(&sources, &LoginSource{IsActived: true}); err != nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
|   | |||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -1 +1 @@ | |||||||
| 0.9.97.0901 | 0.9.98.0901 | ||||||
		Reference in New Issue
	
	Block a user