aboutsummaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix lint errors (#2547)Ethan Koenig2017-09-191-5/+1
|
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-28/+8
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* Fix key usage time update if the key is used in parallel for multiple ↵Lauris BH2017-07-201-4/+9
| | | | operations (#2185)
* Setting to disable authorized_keys backup (#1856)Dan Magnus Lindvall2017-06-281-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add setting to disable authorized_keys backup when rewriting public keys Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Update default value to comply with documentation Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Use tmp-file instead of bak-file for saving manually added keys. Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Change casing Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Change casing and build bakpath with sprintf only Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Only close file once Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Do not modify calcFingerprint Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Fix casing Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Change style from disable to enable Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Change name, just SSH_BACKUP_AUTHORIZED_KEYS Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Do not check for directory existence if backup is disabled Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-4/+4
|
* Delete Public SSH Key tmp file after calculating fingerprint (#1855)Dan Magnus Lindvall2017-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Delete public key tmp file after calculating fingerprint Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Move line Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Remove defer statement Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Readd defer statement and move remove Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Delete space Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>
* use writeTmpKeyFile in calcFingerprint (#1828)Timo Myyrä2017-05-291-10/+2
| | | this makes calcFingerprint use SSH.KeyTestpath instead of os temp dir.
* Add internal routes for ssh hook comands (#1471)Lunny Xiao2017-04-191-2/+4
| | | | | | | | | | | | | | | | * add internal routes for ssh hook comands * fix lint * add comment on why package named private not internal but the route name is internal * add comment above package private why package named private not internal but the route name is internal * remove exp time on internal access * move routes from /internal to /api/internal * add comment and defer on UpdatePublicKeyUpdated
* refactor update ssh key use time (#1466)Lunny Xiao2017-04-071-0/+14
|
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-1/+1
|
* Don't rewrite non-gitea public keys (#906)Lunny Xiao2017-03-031-4/+30
| | | | | | * don't rewrite non-gitea public keys * add comment for public key
* Use fingerprint to check instead content for public key (#911)Lunny Xiao2017-02-141-23/+42
| | | | | | * use fingerprint to check instead content for public key * add fingerprint field for ErrKeyAlreadyExist
* Cleanup log messagingGabriel Jackson2017-02-021-1/+1
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* refactor: Remove unnecessary type conversions (#772)Bo-Yi Wu2017-01-271-1/+1
|
* Refactor process package and introduce ProcessManager{} with tests (#75)Matthias Loibl2017-01-171-2/+2
| | | | | | | | | | * Add a process.Manager singleton with process.GetManager() * Use process.GetManager everywhere * Fix godoc comments for process module * Increment process counter id after locking the mutex
* Fix typos in models/ (#576)Ethan Koenig2017-01-051-2/+2
|
* Replace Gogs with Gitea (#520)Bwko2016-12-281-1/+1
|
* Catch os... errorsBwko2016-12-021-1/+6
|
* Lint models/ssh_key.goBwko2016-11-261-23/+32
|
* Handle ssh key import better (#224)stroucki2016-11-241-0/+2
| | | | | | | | | | | * 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
* use in instead string join (#155)Lunny Xiao2016-11-121-2/+1
|
* Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queriesThibault Meyer2016-11-101-4/+4
|\ | | | | | | | | | | | | | | | | # Conflicts: # models/git_diff.go # models/issue.go # models/org.go # models/pull.go # models/repo.go
| * Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-4/+4
| | | | | | | | | | | | | | - 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
* | Rewrite XORM queriesThibault Meyer2016-11-101-9/+27
|/
* And othersSandro Santilli2016-11-071-7/+7
|
* ACCESS_MODE_* -> AccessMode*Sandro Santilli2016-11-071-3/+3
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-4/+4
|
* #3281 fix x.Iterate returns nothing inside session scope with SQLite3Unknwon2016-07-261-86/+15
|
* models/ssh_key: code cleaningUnknwon2016-07-261-59/+57
|
* Refactor User.Id to User.IDUnknwon2016-07-241-3/+3
|
* Remove redundant Unix timestamp method callUnknwon2016-07-231-4/+4
| | | | Unix() already uses UTC as timezone
* #2302 Replace time.Time with Unix Timestamp (int64)Unknwon2016-03-091-23/+51
|
* Post work for #2637Unknwon2016-02-271-60/+54
| | | | Improve test cases, config settings, also show SSH config settings on admin config panel.
* variable should not use ALL_CAPSGibheer2016-02-231-4/+4
|
* allow native and ssh-keygen public key checkGibheer2016-02-161-12/+133
| | | | | | | | | | | | | | | | | | | 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 7ef9a055886574655d9f2be70c957bc16bf30500. 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.
* Trim whitespace when adding SSH keys (fixes #2447)John Maguire2016-01-311-0/+3
|
* Add debug log when SSH key for deletion isn't foundJohn Maguire2016-01-311-0/+5
|
* #2179 use Go sub-repo ssh to verify public key contentUnknwon2016-01-151-37/+10
|
* fix #1436Unknwon2015-12-191-23/+5
|
* #2147 fix rewrites authorized_keys when builtin SSH server is enabledUnknwon2015-12-111-0/+725