- Gitea version (or commit ref): d2bb8ef
- Git version: 2.9.1
- Operating system: Windows 10
- Database (use
[x]):
- Can you reproduce the bug at https://try.gitea.io:
- Log gist: n/a
Description
Using mssql results in every key after the first key being detected as already existing.
It appears the check for "does this key exists" is actually running "does any key exist"
models/ssh_key.go line 360 is the line.
This is most likely caused by go-xorm. It appears as if it is ignoring the text condition for mssql.
A workaround is
has, err := x.Where("content=?",content).Where("type=?",KeyTypeUser).Get(&PublicKey{})
...