Skip to content

Commit

Permalink
Merge pull request #97 from jhunkeler/sanitize-docker-archive-name
Browse files Browse the repository at this point in the history
Sanitize docker archive name again
  • Loading branch information
jhunkeler authored Feb 15, 2025
2 parents fb520d8 + 8285e92 commit ff2ce71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/cli/stasis_indexer/readmes.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ int indexer_readmes(struct Delivery ctx[], const size_t nelem) {
fprintf(indexfp, "- Docker: \n");

char *pattern = NULL;
asprintf(&pattern, "*%s*", current->info.build_number);
asprintf(&pattern, "*%s*%s*",
current->info.build_number,
strstr(ctx->rules.release_fmt, "%p") ? current->meta.python_compact : "" );
if (!pattern) {
SYSERROR("%s", "Unable to allocate bytes for pattern");
return -1;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_docker.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void test_docker_exec() {
}

void test_docker_sanitize_tag() {
const char *data = " !\"#$%&'()*+,-;<=>?@[\\]^_`{|}~";
const char *data = " !\"#$%&'()+,-;<=>?@[\\]^_`{|}~";
char *input = strdup(data);
docker_sanitize_tag(input);
int result = 0;
Expand Down

0 comments on commit ff2ce71

Please sign in to comment.