23 Commits (f686a32eac75460d5b1fcf16b6f6c2ed57f5b03e)

Author SHA1 Message Date
Bwko 4ff0db0246 Catch os... errors 8 years ago
Bwko 6cde041080 Lint models/ssh_key.go 8 years ago
stroucki 3a3782bb7f Handle ssh key import better (#224)
* Handle user ssh key input better

ssh_key: when user submitted keys had a newline at the end, strings.Split
would have created a slice with an empty last element, and the key type
check would be incorrect. Perhaps a better way is to look for 'ssh-rsa' or
'ssh-dsa' at the beginning of the string, but this is simple.

* ssh_key: correct indentation
8 years ago
Lunny Xiao 30a37311f8 use in instead string join (#155) 8 years ago
Thibault Meyer b0ddced2b5
Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
# Conflicts:
#	models/git_diff.go
#	models/issue.go
#	models/org.go
#	models/pull.go
#	models/repo.go
8 years ago
Thibault Meyer a4454f5d0f
Rewrite XORM queries 8 years ago
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
8 years ago
Sandro Santilli aadd7dcdc3 And others 8 years ago
Sandro Santilli f388661bda ACCESS_MODE_* -> AccessMode* 8 years ago
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 8 years ago
Unknwon 2d76de2574 #3281 fix x.Iterate returns nothing inside session scope with SQLite3 8 years ago
Unknwon 4d8b905541 models/ssh_key: code cleaning 8 years ago
Unknwon 1f2e173a74 Refactor User.Id to User.ID 8 years ago
Unknwon 250be011c7 Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
8 years ago
Unknwon ad513a20e9 #2302 Replace time.Time with Unix Timestamp (int64) 8 years ago
Unknwon 8055a0bdac Post work for #2637
Improve test cases, config settings, also show SSH config settings on admin config panel.
8 years ago
Gibheer 2f27ee2232 variable should not use ALL_CAPS 8 years ago
Gibheer 12403bdfb0 allow native and ssh-keygen public key check
This commit adds the possibibility to use either the native golang
libraries or ssh-keygen to check public keys. The check is adjusted
depending on the settings, so that only supported keys are let through.

This commit also brings back the blacklist feature, which was removed in
7ef9a05588. This allows to blacklist
algorythms or keys based on the key length. This works with the native
and the ssh-keygen way.

Because of #2179 it also includes a way to adjust the path to
ssh-keygen and the working directory for ssh-keygen. With this,
sysadmins should be able to adjust the settings in a way, that SELinux
is okay with it. In the worst case, they can switch to the native
implementation and only loose support for ed25519 keys at the moment.
There are some other places which need adjustment to utilize the
parameters and the native implementation, but this sets the ground work.
8 years ago
John Maguire b3e0efc0c3 Trim whitespace when adding SSH keys (fixes #2447) 9 years ago
John Maguire caa4ca46c0 Add debug log when SSH key for deletion isn't found 9 years ago
Unknwon 7ef9a05588 #2179 use Go sub-repo ssh to verify public key content 9 years ago
Unknwon 53eb37d529 fix #1436 9 years ago
Unknwon bc17f2f759 #2147 fix rewrites authorized_keys when builtin SSH server is enabled 9 years ago