-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Only check at least one email gpg key #2266
Only check at least one email gpg key #2266
Conversation
1e53d2a
to
0492428
Compare
|
0492428
to
9e19506
Compare
the integration tests of pgsql failed because pgsql insert record start with ID 10001:
|
2292961
to
b3cc631
Compare
Rebase and I use the ID returned in the list of key to try to get one specific key. So the test are not failing anymore on pgsql that have index not starting at 1. |
Trusted LGTM, but I don't like those .git objects in the repository (any way to create those repositories from input files, with a script ?) |
LGTM |
@strk any better idea than put the .git directory on the repo? |
@strk Btw just saw that you allow adding gpg key even if no emails is validated/active. Why so why not force at least one activated email? |
@sapk and seems this PR caused all other PRs' tests failed since wrong protected branch settings. I have corrected wrong protected branch, but maybe you can send a PR to fix the tests. |
Should I backport these to 1.2.0 ? (with #2467) |
* Only require one email (possibly not yet validated) * Update message error and check validation of commit * Add integrations tests * Complete integration for import * Add pre-check/optimization * Add some test (not finished) * Finish * Fix fixtures * Fix typo * Don't guess key ID
* Only check at least one email gpg key (#2266) * Only require one email (possibly not yet validated) * Update message error and check validation of commit * Add integrations tests * Complete integration for import * Add pre-check/optimization * Add some test (not finished) * Finish * Fix fixtures * Fix typo * Don't guess key ID * Make repo private to no interfere with other tests (#2467) * GPG key email verification no longer case sensitive (#2661) (#2663) * GPG key email verification no longer case sensitive (#2661) * case insensitive GPG key email verification now cached (#2661) Signed-off-by: Julian Scholle <julian.scholle@googlemail.com>
…er has a linked account from a deactivated authentication source (go-gitea#2626) This should fix go-gitea#2266. This has apparently be fixed in `main` go-gitea#27798 (but quite a big PR, which was not backported). I should likely push the test to the main branch as well. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2626 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: oliverpool <git@olivier.pfad.fr> Co-committed-by: oliverpool <git@olivier.pfad.fr>
Fix #2213 & #2187 by relaxing the control on import by allowing any key with one key at least matching one email of the user.
Commit validation should stilll be good because I use GetUserByEmail to get the user from commiter email and this method need that the email is activated. And add an extra checkup and optimization by checking before checking sign if the emails attached to the key can validate this particular email of commiter.
Still to do :
Extra :
Command line to test this :go test -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite' && GITEA_ROOT="$GOPATH/src/code.gitea.io/gitea" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.v -test.run GPG