Skip to content

Skip appending authorized_keys file if asked not to #13368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2020

Conversation

sapk
Copy link
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
Member

lafriks commented Oct 31, 2020

Please update branch with base

@codecov-io
Copy link

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
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