mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	fix session API broken and SQL pretection
This commit is contained in:
		| @@ -581,7 +581,7 @@ func SearchUserByName(opt SearchOption) (us []*User, err error) { | ||||
| 	opt.Keyword = strings.ToLower(opt.Keyword) | ||||
|  | ||||
| 	us = make([]*User, 0, opt.Limit) | ||||
| 	err = x.Limit(opt.Limit).Where("type=0").And("lower_name like '%" + opt.Keyword + "%'").Find(&us) | ||||
| 	err = x.Limit(opt.Limit).Where("type=0").And("lower_name like ?", "%"+opt.Keyword+"%").Find(&us) | ||||
| 	return us, err | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user