You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules
Leon Busch-George 7a8a4f5432
Prefer native parser for SSH public key parsing (#23798)
Without this patch, the setting SSH.StartBuiltinServer decides whether
the native (Go) implementation is used rather than calling 'ssh-keygen'.
It's possible for 'using ssh-keygen' and 'using the built-in server' to
be independent.
In fact, the gitea rootless container doesn't ship ssh-keygen and can be
configured to use the host's SSH server - which will cause the public
key parsing mechanism to break.

This commit changes the decision to be based on SSH.KeygenPath instead.
Any existing configurations with a custom KeygenPath set will continue
to function. The new default value of '' selects the native version. The
downside of this approach is that anyone who has relying on plain
'ssh-keygen' to have special properties will now be using the native
version instead.
I assume the exec-variant is only there because /x/crypto/ssh didn't
support ssh-ed25519 until 2016. I don't see any other reason for using
it so it might be an acceptable risk.

Fixes #23363

EDIT: this message was garbled when I tried to get the commit
description back in.. Trying to reconstruct it:

## ⚠️ BREAKING ⚠️ Users who don't have SSH.KeygenPath
explicitly set and rely on the ssh-keygen binary need to set
SSH.KeygenPath to 'ssh-keygen' in order to be able to continue using it
for public key parsing.

There was something else but I can't remember at the moment.

EDIT2: It was about `make test` and `make lint`. Can't get them to run.
To reproduce the issue, I installed `golang` in `docker.io/node:16` and
got:
```
...
go: mvdan.cc/xurls/v2@v2.4.0: unknown revision mvdan.cc/xurls/v2.4.0
go: gotest.tools/v3@v3.4.0: unknown revision gotest.tools/v3.4.0
...
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
...
go: error loading module requirements
```

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
1 year ago
..
actions Do not crash when parsing an invalid workflow file (#23972) 1 year ago
activitypub Add Chef package registry (#22554) 1 year ago
analyze Implement FSFE REUSE for golang files (#21840) 2 years ago
auth Fix various bugs for "install" page (#23194) 1 year ago
avatar Use minio/sha256-simd for accelerated SHA256 (#23052) 1 year ago
base Use a general Eval function for expressions in templates. (#23927) 1 year ago
cache Improve cache context (#23330) 1 year ago
charset Use data-tooltip-content for tippy tooltip (#23649) 1 year ago
container Implement FSFE REUSE for golang files (#21840) 2 years ago
context Group template helper functions, remove `Printf`, improve template error messages (#23982) 1 year ago
csv Add context when rendering labels or emojis (#23281) 1 year ago
doctor Check LFS/Packages settings in dump and doctor command (#23631) 1 year ago
emoji Fix unstable emoji sort (#22346) 2 years ago
eventsource Move `convert` package to services (#22264) 2 years ago
generate Implement FSFE REUSE for golang files (#21840) 2 years ago
git Remove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter (#23920) 1 year ago
gitgraph Add context cache as a request level cache (#22294) 1 year ago
graceful Implement FSFE REUSE for golang files (#21840) 2 years ago
hcaptcha Consume hcaptcha and pwn deps (#22610) 1 year ago
highlight test_env: hardcode major go version in use (#23464) 1 year ago
hostmatcher Implement FSFE REUSE for golang files (#21840) 2 years ago
html Implement FSFE REUSE for golang files (#21840) 2 years ago
httpcache Set `X-Gitea-Debug` header once (#23361) 1 year ago
httplib Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (#23687) 1 year ago
indexer Add meilisearch support (#23136) 1 year ago
issue/template Allow issue templates to not render title (#22589) 1 year ago
json Update gitea-vet to check FSFE REUSE (#22004) 2 years ago
label Make label templates have consistent behavior and priority (#23749) 1 year ago
lfs Make minio package support legacy MD5 checksum (#23768) 1 year ago
log Improve trace logging for pulls and processes (#22633) 1 year ago
markup Append `(comment)` when a link points at a comment rather than the whole issue (#23734) 1 year ago
mcaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
metrics include build info in Prometheus metrics (#22819) 1 year ago
migration Scoped labels (#22585) 1 year ago
mirror Implement FSFE REUSE for golang files (#21840) 2 years ago
nosql Implement FSFE REUSE for golang files (#21840) 2 years ago
notification Implement actions (#21937) 1 year ago
options Introduce path Clean/Join helper functions (#23495) 1 year ago
packages Display image size for multiarch container images (#23821) 1 year ago
paginator Update gitea-vet to check FSFE REUSE (#22004) 2 years ago
pprof Implement FSFE REUSE for golang files (#21840) 2 years ago
private Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (#23687) 1 year ago
process Improve trace logging for pulls and processes (#22633) 1 year ago
proxy Use proxy for pull mirror (#22771) 1 year ago
proxyprotocol Implement FSFE REUSE for golang files (#21840) 2 years ago
public Fix incorrect CORS failure detection logic (#23844) 1 year ago
queue Properly flush unique queues on startup (#23154) 1 year ago
recaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
references Use correct captured group range when parsing cross-reference (#22672) 1 year ago
regexplru Implement FSFE REUSE for golang files (#21840) 2 years ago
repository Make label templates have consistent behavior and priority (#23749) 1 year ago
secret Use minio/sha256-simd for accelerated SHA256 (#23052) 1 year ago
session Use Get/Set instead of Rename when Regenerate session id (#23975) 1 year ago
setting Prefer native parser for SSH public key parsing (#23798) 1 year ago
sitemap Fix sitemap (#22272) 2 years ago
ssh Implement FSFE REUSE for golang files (#21840) 2 years ago
storage Make minio package support legacy MD5 checksum (#23768) 1 year ago
structs Add activity feeds API (#23494) 1 year ago
svg Keep (add if not existing) xmlns attribute for generated SVG images (#23410) 1 year ago
sync Implement FSFE REUSE for golang files (#21840) 2 years ago
system Implement FSFE REUSE for golang files (#21840) 2 years ago
templates Use auto-updating, natively hoverable, localized time elements (#23988) 1 year ago
test Group template helper functions, remove `Printf`, improve template error messages (#23982) 1 year ago
timeutil Use auto-updating, natively hoverable, localized time elements (#23988) 1 year ago
translation Append `(comment)` when a link points at a comment rather than the whole issue (#23734) 1 year ago
turnstile Add new captcha: cloudflare turnstile (#22369) 1 year ago
typesniffer Do not recognize text files as audio (#23355) 1 year ago
updatechecker Implement FSFE REUSE for golang files (#21840) 2 years ago
upload Implement FSFE REUSE for golang files (#21840) 2 years ago
uri Implement FSFE REUSE for golang files (#21840) 2 years ago
user Implement FSFE REUSE for golang files (#21840) 2 years ago
util Merge template functions "dict/Dict/mergeinto" (#23932) 1 year ago
validation Map OIDC groups to Orgs/Teams (#21441) 1 year ago
watcher Implement FSFE REUSE for golang files (#21840) 2 years ago
web Map OIDC groups to Orgs/Teams (#21441) 1 year ago
webhook Restructure `webhook` module (#22256) 2 years ago