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

Wrong visibility interaction when RequireLogin = true #280

Closed
thomiceli opened this issue May 12, 2024 · 2 comments · Fixed by #288
Closed

Wrong visibility interaction when RequireLogin = true #280

thomiceli opened this issue May 12, 2024 · 2 comments · Fixed by #288
Labels
bug Something isn't working

Comments

@thomiceli
Copy link
Owner

When RequireLogin is enabled in the admin panel, and when a user try to pull/clone a gist, the server obviously asks a user/password or check for an existing ssh key.
But the access is granted only when the credentials passed match the owner of the gist.

@thomiceli thomiceli added the bug Something isn't working label May 12, 2024
@thomiceli
Copy link
Owner Author

if ok, err := utils.Argon2id.Verify(authPassword, gist.User.Password); !ok || gist.User.Username != authUsername {

pubKey, err := db.SSHKeyExistsForUser(key, gist.UserID)

@thomiceli
Copy link
Owner Author

Currently it behaves like a pull/clone and a push are the same thing when RequireLogin is enabled; where it should not be the case: a login is required but if the user exists, it should pull/clone where as only the gist owner should push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant