Skip to content

Skip appending authorized_keys file if asked not to#13368

Merged
techknowlogick merged 4 commits into
go-gitea:masterfrom
sapk-fork:force-create-auth-key
Nov 1, 2020
Merged

Skip appending authorized_keys file if asked not to#13368
techknowlogick merged 4 commits into
go-gitea:masterfrom
sapk-fork:force-create-auth-key

Conversation

@sapk
Copy link
Copy Markdown
Member

@sapk sapk commented Oct 31, 2020

I found a missing check before writing authorized_keys file.

Before appending to the file we should check that this function is not deactivated like here:

if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile {
and
if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile {

@techknowlogick techknowlogick added this to the 1.14.0 milestone Oct 31, 2020
@techknowlogick techknowlogick added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Oct 31, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 31, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 31, 2020
@lafriks
Copy link
Copy Markdown
Member

lafriks commented Oct 31, 2020

Please update branch with base

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #13368 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13368      +/-   ##
==========================================
- Coverage   42.13%   42.11%   -0.02%     
==========================================
  Files         691      691              
  Lines       75909    75909              
==========================================
- Hits        31983    31969      -14     
- Misses      38687    38700      +13     
- Partials     5239     5240       +1     
Impacted Files Coverage Δ
models/ssh_key.go 45.11% <100.00%> (ø)
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/indexer/stats/db.go 52.17% <0.00%> (-8.70%) ⬇️
modules/git/utils.go 73.77% <0.00%> (-3.28%) ⬇️
services/pull/temp_repo.go 26.59% <0.00%> (-3.20%) ⬇️
services/pull/check.go 49.63% <0.00%> (-2.19%) ⬇️
services/pull/patch.go 53.97% <0.00%> (-1.71%) ⬇️
modules/queue/workerpool.go 58.77% <0.00%> (-1.23%) ⬇️
modules/log/event.go 58.96% <0.00%> (-0.95%) ⬇️
modules/git/repo.go 46.19% <0.00%> (-0.51%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cb22d6...bee4440. Read the comment docs.

@techknowlogick
Copy link
Copy Markdown
Member

🚀

@techknowlogick techknowlogick merged commit f3bbd46 into go-gitea:master Nov 1, 2020
@sapk sapk deleted the force-create-auth-key branch November 1, 2020 01:10
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/miscellaneous

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants