commit 4fd3ab65db81313a54815adef56b05709e08fce6 from: Stefan Sperling via: Thomas Adam date: Fri Mar 21 13:22:46 2025 UTC cache our local repository name, not the name sent by the client commit - a88930cc79d815481e4845c0f90b6cde777e228e commit + 4fd3ab65db81313a54815adef56b05709e08fce6 blob - c80ad832621e5ed43a6e3ba784c8db0b99ff1ce4 blob + dfaea693e455367a6ee8fea158b8dbdfa779fed7 --- gotd/gotd.c +++ gotd/gotd.c @@ -593,7 +593,7 @@ start_client_authentication(struct gotd_client *client repo = gotd_find_repo_by_name(ireq.repo_name, &gotd.repos); if (repo == NULL) return got_error(GOT_ERR_NOT_GIT_REPO); - if (strlcpy(client->repo_name, ireq.repo_name, + if (strlcpy(client->repo_name, repo->name, sizeof(client->repo_name)) >= sizeof(client->repo_name)) { return got_error_msg(GOT_ERR_NO_SPACE, "repository name too long"); @@ -610,7 +610,7 @@ start_client_authentication(struct gotd_client *client repo = gotd_find_repo_by_name(ireq.repo_name, &gotd.repos); if (repo == NULL) return got_error(GOT_ERR_NOT_GIT_REPO); - if (strlcpy(client->repo_name, ireq.repo_name, + if (strlcpy(client->repo_name, repo->name, sizeof(client->repo_name)) >= sizeof(client->repo_name)) { return got_error_msg(GOT_ERR_NO_SPACE, "repository name too long");