checkUserPushPermission is checking the wrong user's permission to push
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #1713 di @sankalpsthakur — chiusa senza merge
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript
Direzione di ricerca
Leggi src/proxy/processors/push-action/parsePush.ts intorno alle righe 93-96 e segui come vengono valorizzati user e userEmail dell'azione. Conferma che i valori rappresentano l'utente che esegue il proxy push, anziché il committer dell'ultimo commit, senza usare action.commitData. Riproduci lo scenario di push descritto e verifica che checkUserPushPermission valuti i dettagli dell'utente che esegue il push.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
checkUserPushPermission is intended to check whether the user performing the push is allowed to do so. However, it is currently checking the permission of the committer of the last commit in the push in its current location, rather than the user pushing it into git proxy.
Commits in git are tagged with two users' details: the author (who created the commit and originally pushed it to a repo) and the committer (initially the same as the author, but changes whenever the commit is pushed to a different repository or branch but changes whenever a commit is created or modified (e.g., via git commit, git commit --amend, git rebase, git merge) - git push does NOT change the committer. When we process a push in git proxy, we do so using the original committer of the last commit rather than the user performing the push - which is not the intent of the check.
parsePush is extracting the committer and committerEmail from the last commit in the push and setting them as the user and userEmail in the action object:
This is not the correct user information and needs to be corrected in parsePush, without using action.commitData.
To Reproduce
- Setup a project in Git proxy where you are allowed to contribute but no other user is
- Have a different user push a commit to a branch of the respository.
- Clone that branch yourself.
- While that different user's commit is the last one on that branch, push the branch to git proxy.
checkUserPushPermissionwill reject the push as it will use the other user's information as the committer,
Expected behavior
parsePush should use the details of the user trying to push through the proxy as the user and userEmail values of the action (rather than the user that original pushed the last commit), ensuring that checkUserPushPermission checks the correct user's details.
- Lingua principale
- TypeScript
- Stelle
- 263
- Fork
- 185
- Merge medio
- 2g 15h
- PR unite (30g)
- 39
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di finos/git-proxy
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
finos/git-proxy#1878 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
scanDiff ignores commitConfig.diff.block rules from the --config fileForse già presa @goldensyntax l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
finos/git-proxy#1874 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
meeting
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
meeting
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di finos/git-proxy
Issue simili
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#62052 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strapi/design-system#2084 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno