Skip to content
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

Consume hcaptcha and pwn deps #22610

Merged
merged 5 commits into from
Jan 29, 2023
Merged

Consume hcaptcha and pwn deps #22610

merged 5 commits into from
Jan 29, 2023

Conversation

jolheiser
Copy link
Member

This PR just consumes the hcaptcha and haveibeenpwned modules directly into Gitea.

Nothing else uses them, so I figured they would be better off in the main repo rather than sitting stale in another repo.

Bringing them into the main repo will help keep eyes on them and also notify us if any of the testing starts failing (as I noticed the hcaptcha testing has changed since I made the original module for secret keys).


Note that the modules were made to be libraries, so copying them here more than likely has some more code than is needed directly by Gitea.

I'm not opposed to trimming it down, but as a first pass I just wanted to get them in here.


Also let this serve as a notice that I'm fine with transferring my license (which was already MIT) from my own name to "The Gitea Authors".

Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser jolheiser added this to the 1.19.0 milestone Jan 26, 2023
Comment on lines +61 to +66
// Checking for a "good" password isn't going to be perfect, but we can give it a good try
// with hopefully minimal error. Try five times?
var good bool
var pw string
for idx := 0; idx <= 5; idx++ {
pw = testPassword()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't an ideal test then, and it isn't an ideal test now. Open to suggestions for this.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 26, 2023
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 27, 2023
@lunny
Copy link
Member

lunny commented Jan 27, 2023

I think we should clarify which modules we should merge into Gitea and which we should depends on third-party on documentation. My idea is depending on third-party moudules ASAP if it's mature and well mantained.

@jolheiser
Copy link
Member Author

I briefly looked, but admittedly not very hard, as these are fairly simple APIs.

That being said, these are largely equivalent to their module counterpart. I just wanted to increase bus factor, I'm not against swapping them in the future if we find a better library elsewhere.

@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 Jan 29, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 29, 2023
@jolheiser
Copy link
Member Author

🎺 🤖

@jolheiser jolheiser merged commit 2052a9e into go-gitea:main Jan 29, 2023
@jolheiser jolheiser deleted the hcaptcha-pwn branch January 29, 2023 15:49
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 30, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 30, 2023
* upstream/main:
  Add support for commit cross references (go-gitea#22645)
  Fix missing message in git hook when pull requests disabled on fork (go-gitea#22625)
  Check quota limits for container uploads (go-gitea#22450)
  Consume hcaptcha and pwn deps (go-gitea#22610)
  Issues: add Project filter to issues list and search (go-gitea#22544)
  Improve accessibility of navigation bar and footer (go-gitea#22635)
  Support system hook API (go-gitea#14537)
  Improve checkIfPRContentChanged (go-gitea#22611)
@delvh delvh added reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Feb 28, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants