checkUserPushPermission is checking the wrong user's permission to push
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #1713 de @sankalpsthakur — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- git, typescript
Línea de trabajo
Lee src/proxy/processors/push-action/parsePush.ts alrededor de las líneas 93-96 y sigue cómo se rellenan user y userEmail de la acción. Confirma que los valores representan al usuario que realiza el proxy push, en lugar del committer del último commit, sin usar action.commitData. Reproduce el escenario de push descrito y verifica que checkUserPushPermission evalúa los detalles del usuario que realiza el push.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 263
- Forks
- 185
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 39
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de finos/git-proxy
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
finos/git-proxy#1878 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
scanDiff ignores commitConfig.diff.block rules from the --config filePosiblemente ocupada @goldensyntax la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
finos/git-proxy#1874 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
meeting
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
meeting
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de finos/git-proxy
Issues similares
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
anomalyco/opencode#62052 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
strapi/design-system#2084 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día