Skip to content

Commit 6b54ff1

Browse files
fix(container-pull): drop the dead redirect pin from fetch_tags
fetch_tags lost -L, so --proto-redir has nothing to act on. Leaving it there reads as though redirects were considered and handled on that call, which is misleading in a change about redirects. Measured with a pass-through curl wrapper over the real --list-tags path: the registry token request and the tags list both answer 200 in a single hop, as do the ccid and image-registry-credentials calls, so nothing on that path wants a redirect. That was against registry.crowdstrike.com; the gov registries were not reachable from the test environment. The convention is now uniform across all four scripts: --proto-redir appears on exactly the curl invocations that pass -L.
1 parent 0354785 commit 6b54ff1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

bash/containers/falcon-container-sensor-pull/falcon-container-sensor-pull.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,12 @@ curl_command() {
298298
}
299299

300300
fetch_tags() {
301+
# No -L, so no --proto-redir either: with nothing following a redirect, the
302+
# redirect protocol pin is dead and only makes it look as though redirects
303+
# were handled here. Measured on registry.crowdstrike.com: every call on this
304+
# path answers 200 in one hop, so there is no redirect to follow.
301305
bearer_result=$(echo "-u $ART_USERNAME:$ART_PASSWORD" |
302-
curl -s --proto '=https' --proto-redir '=https' \
306+
curl -s --proto '=https' \
303307
"https://$cs_registry/v2/token?account=$ART_USERNAME&scope=repository:$registry_opts/$repository_name:pull&service=$cs_registry" -K-)
304308
handle_curl_error $?
305309
registry_bearer=$(echo "$bearer_result" | json_value "token" | sed 's/ *$//g' | sed 's/^ *//g')

0 commit comments

Comments
 (0)