authorisedList entries with * never match repository URLs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- git, github, nodejs, typescript
- Área
- authorization, backend
Línea de trabajo
Comienza en el punto de entrada getRepoByUrl y sigue la búsqueda en authorisedList y el acceso a db.getRepos. Reproduce el caso de comodín de una organización de GitHub a través del proxy y verifica después que tanto las entradas de URL con comodín como las exactas se resuelvan correctamente, incluidas las URL de repositorios con y sin .git.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
getRepoByUrl performs an exact URL lookup on authorisedList. Entries intended as org-level wildcards, e.g. https://github.com/example-org/*, do not match concrete repo URLs such as https://github.com/example-org/some-repo.git. There is no way to allowlist all repos under an org without enumerating every URL.
To Reproduce
Steps to reproduce the behavior:
- Run
@finos/[email protected]. - Add an authorised list entry:
{ "url": "https://github.com/example-org/*" } - Clone or pull
https://github.com/example-org/some-repothrough the proxy. - See error: repo not found on authorised list / request rejected as unauthorised.
Expected behavior
https://github.com/example-org/* should match any repo under that org, e.g. https://github.com/example-org/foo and https://github.com/example-org/foo.git. For github.com, repo URLs are always owner/repo. Exact URL entries should continue to work as today.
Screenshots
N/A
Desktop (please complete the following information):
- OS: Linux; macOS
- Browser: N/A (HTTP client /
gitCLI) - Version: Node 20+;
@finos/git-proxy2.0.0
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
Suggested fallback when exact lookup misses:
function wildcardToRegExp(pattern) {
const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
return new RegExp('^' + escaped.replace(/\*/g, '[^/]+') + '$');
}
const originalGetRepoByUrl = db.getRepoByUrl;
db.getRepoByUrl = async function (url) {
const exact = await originalGetRepoByUrl(url);
if (exact) return exact;
for (const repo of await db.getRepos()) {
if (repo.url?.includes('*') && wildcardToRegExp(repo.url).test(url)) {
return repo;
}
}
return null;
};
Happy to open a PR if useful.
- 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
-
Update the Git Proxy website homepage using flyer contentPosiblemente ocupada @Orcus01 la tomó hoy. Abiertodocumentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
finos/git-proxy#1878 · 2 comentarios ·
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
-
checkUserPushPermission is checking the wrong user's permission to pushQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
finos/git-proxy#1400 · 17 comentarios ·
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
Todos los issues de finos/git-proxy
Issues similares
-
Navbar avatar and name stay stale after saving profile changesPosiblemente ocupada @alexechoi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
marmelab/atomic-crm#416 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
epam/ai-dial-react-file-manager#99 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
canonical/craft-actions#146 ·
Los mantenedores suelen responder en 2 días
-
feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
bluesky-social/social-app#12343 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lucide-icons/lucide#5165 ·
Los mantenedores suelen responder en 1 día