Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CVE-2024-45321] generate: hotpatch bin/cpanm to use HTTPS endpoints #167

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion generate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ sub die_with_sample {
url => "https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7047.tar.gz",
# sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
sha256 => "963e63c6e1a8725ff2f624e9086396ae150db51dd0a337c3781d09a994af05a5",
patch => q[perl -pi -E 's{http://(www\.cpan\.org|backpan\.perl\.org|cpan\.metacpan\.org|fastapi\.metacpan\.org|cpanmetadb\.plackperl\.org)}{https://$1}g' bin/cpanm],
zakame marked this conversation as resolved.
Show resolved Hide resolved
},
iosocketssl => {
name => "IO-Socket-SSL-2.085",
Expand Down Expand Up @@ -325,7 +326,9 @@ =head1 DESCRIPTION
&& cd /usr/src \
&& curl -fLO {{cpanm_dist_url}} \
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum --strict --check - \
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} && perl bin/cpanm . && cd /root \
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} \
&& {{cpanm_dist_patch}} \
&& perl bin/cpanm . && cd /root \
&& curl -fLO '{{netssleay_dist_url}}' \
&& echo '{{netssleay_dist_sha256}} *{{netssleay_dist_name}}.tar.gz' | sha256sum --strict --check - \
&& cpanm --from $PWD {{netssleay_dist_name}}.tar.gz \
Expand Down