Bwko
4ff0db0246
Catch os... errors
vor 7 Jahren
Bwko
6cde041080
Lint models/ssh_key.go
vor 7 Jahren
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
vor 7 Jahren
Lunny Xiao
30a37311f8
use in instead string join (#155)
vor 7 Jahren
Thibault Meyer
a4454f5d0f
Rewrite XORM queries
vor 7 Jahren
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
vor 7 Jahren
Sandro Santilli
aadd7dcdc3
And others
vor 7 Jahren
Sandro Santilli
f388661bda
ACCESS_MODE_* -> AccessMode*
vor 7 Jahren
Rémy Boulanouar
2d68bd1ef9
Change import reference to match gitea instead of gogs (#37)
vor 7 Jahren
Unknwon
2d76de2574
#3281 fix x.Iterate returns nothing inside session scope with SQLite3
vor 8 Jahren
Unknwon
4d8b905541
models/ssh_key: code cleaning
vor 8 Jahren
Unknwon
1f2e173a74
Refactor User.Id to User.ID
vor 8 Jahren
Unknwon
250be011c7
Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
vor 8 Jahren
Unknwon
ad513a20e9
#2302 Replace time.Time with Unix Timestamp (int64)
vor 8 Jahren
Unknwon
8055a0bdac
Post work for #2637
Improve test cases, config settings, also show SSH config settings on admin config panel.
vor 8 Jahren
Gibheer
2f27ee2232
variable should not use ALL_CAPS
vor 8 Jahren
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.
vor 8 Jahren
John Maguire
b3e0efc0c3
Trim whitespace when adding SSH keys (fixes #2447)
vor 8 Jahren
John Maguire
caa4ca46c0
Add debug log when SSH key for deletion isn't found
vor 8 Jahren
Unknwon
7ef9a05588
#2179 use Go sub-repo ssh to verify public key content
vor 8 Jahren
Unknwon
53eb37d529
fix #1436
vor 8 Jahren
Unknwon
bc17f2f759
#2147 fix rewrites authorized_keys when builtin SSH server is enabled
vor 8 Jahren
Unknwon
978dc00305
APIs: admin users
vor 8 Jahren
Unknwon
cc8f5add6e
fix #976
vor 8 Jahren
Unknwon
f455125d4d
fix #878
vor 8 Jahren
Unknwon
18c841050b
fix 1540 and experimental SSH server support
vor 8 Jahren
Unknwon
8eb4c3121a
work on #1880
vor 8 Jahren
Unknwon
75aab86a8d
fix problem with #1879
vor 8 Jahren
Gibheer
b90b0c1191
move minimum key sizes to config
This moves the minimum key sizes into the config file, so that anyone
can modify the restrictions.
vor 8 Jahren
Unknwon
d185f601d3
#1622 comment with whitespace
vor 8 Jahren
Unknwon
260301bf2e
#1535 Removing deploy key does not remove key
vor 8 Jahren
Yixin Hao
5f25553b0d
Modify minimumKeySize of RSA to 1024 for old keys.
vor 8 Jahren
Unknwon
062adbed8a
add confirmation to delete ssh key
vor 8 Jahren
Don Bowman
1d52793faf
remove empty line as per https://github.com/gogits/gogs/pull/1475
vor 8 Jahren
Don Bowman
ab0247b4dc
race condition on keydelete
vor 8 Jahren
Unknwon
0acf209e2a
fix UNIQUE
vor 8 Jahren
Unknwon
39a3b768bc
#334: Add Deployment Key Support
vor 8 Jahren
Unknwon
aae74c793a
#1133 add config option [service] DISABLE_MINIMUM_KEY_SIZE_CHECK
vor 9 Jahren
Unknwon
80b23854bc
#1050: Bad permissions on authorized_keys after rewrite
vor 9 Jahren
Unknwon
4aafeace23
fix HTTP/HTTPS push update func call panic #1037 and `http: multiple response.WriteHeader calls`
vor 9 Jahren
Unknwon
d446be9f5f
models: mirror fix on #964
vor 9 Jahren
Peter Smit
aa35be975f
Fix #922
vor 9 Jahren
Unknwon
f15fa9167a
cmd: code fix for #905
- routers/admin: add rewrite update hook operation
- conf/locale: update locale file due to ini behavior changes
- cmd/cert_stub.go: remove useless code
- cmd/fix.go: no longer need fix command(at least now)
vor 9 Jahren
Peter Smit
1ab09e4f1b
Add option to provide configuration file on command line
vor 9 Jahren
Unknwon
0a2068d7fb
models: code fix on #818
vor 9 Jahren
Peter Smit
6251626de4
Implement #798 Flexible ssh-key input
It is now possible to input ssh keys in a number of formats: openssh, SSH2 or just the base64 encoded key.
vor 9 Jahren
fzerorubigd
6643647687
add afunction to rewrite all public keys on admin request
refs #763
vor 9 Jahren
Unknwon
1b66600bd0
Fix #652
vor 9 Jahren
Unknwon
ce8d4cc80b
#634
vor 9 Jahren
Unknwon
1e47e2df85
quick fix
vor 9 Jahren