diff options
author | psykose <alice@ayaya.dev> | 2023-05-23 13:10:36 +0000 |
---|---|---|
committer | psykose <alice@ayaya.dev> | 2023-05-23 15:10:37 +0200 |
commit | 0371bb10383aa1268e1d1ee5461f29a831cba29c (patch) | |
tree | 57445ed35a5ab4b7aaabefa0f5340fd858d55f73 | |
parent | 7e5adf36b411fd94f5bcbb89b6bcf7cfee930870 (diff) |
main/perl: update to working http-tiny patch
closes #14951
-rw-r--r-- | main/perl/APKBUILD | 4 | ||||
-rw-r--r-- | main/perl/default-https-perl-http-tiny.patch | 66 |
2 files changed, 63 insertions, 7 deletions
diff --git a/main/perl/APKBUILD b/main/perl/APKBUILD index a7234cfddc6..b281b223b59 100644 --- a/main/perl/APKBUILD +++ b/main/perl/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Valery Kartel <valery.kartel@gmail.com> pkgname=perl pkgver=5.36.1 -pkgrel=1 +pkgrel=2 pkgdesc="Larry Wall's Practical Extraction and Report Language" url="https://www.perl.org/" arch="all" @@ -188,6 +188,6 @@ a78b5fb1a2b6f60b401329cfd2d8349d4fdcc19628cde0e9b840b82e1a02e705f7d7413fe206aa13 3eaec691bc38e208ba4f34130ae45e50b6c339fa50093d0b0f6d7f24cb5b7c2a3734ca714a279c4b51173f82e46a8e7a3e70bfc7d7471a18c55a2102140e4186 musl-skip-dst-test.patch ba9cb1ff4a6e8e4c31bf4ef132c071ac919ffe45842cf5e98c8ca72d78ef4803883b57a0e7b8037da0079561a6ce9e6bd8d127892ac1bcb047638cb3ba3157f6 skip-test-due-to-busybox-ps.patch c004d6612ec754e5947255a2e2d15b5581f187c32495aeeec9f4fa286919bd9f40c72b63db61e3f4004b09288af2063a6a14b67e5c289e9a8b23ebd7c216e16f musl-stack-size.patch -b919fe8a49564f098bcb0e7502cc9ed865deb451cce7046cd664bb20a0d97b50b83cb1362ca0eb02d91812277a74ca78711140979b51d6e4994cfe3af29841e5 default-https-perl-http-tiny.patch +fc68c37db1bc6f8b2407ea3cd3179001046a0960943a165e5d3f855ab5317171be975d4e800657179ca3e362837b1dd31a95f7413228ac900900e29f0ffe2cfd default-https-perl-http-tiny.patch 4d7a4a199af08f08ef174c1117120a0ac8f7272bc981de2038dc4e1a429674e94c552e1af13326a837b0fe664dbf75d4528467e2a8c1b9d3f9bb2c61c112ae14 zlib-no-zsolo.patch " diff --git a/main/perl/default-https-perl-http-tiny.patch b/main/perl/default-https-perl-http-tiny.patch index 99a50a2c1c9..f2a19f0f6fa 100644 --- a/main/perl/default-https-perl-http-tiny.patch +++ b/main/perl/default-https-perl-http-tiny.patch @@ -1,12 +1,28 @@ -in current year, we should verify tls certs by default. -not doing so is as good as not using tls -https://www.openwall.com/lists/oss-security/2023/04/18/14 +Patch-Source: https://github.com/NixOS/nixpkgs/blob/d30264c2691128adc261d7c9388033645f0e742b/pkgs/development/interpreters/perl/http-tiny-verify-ssl-by-default.patch -- diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm -index 83ca06d..dc6217a 100644 +index 5803e4599..88ba51461 100644 --- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm +++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm -@@ -1055,7 +1055,7 @@ sub new { +@@ -40,7 +40,7 @@ sub _croak { require Carp; Carp::croak(@_) } + #pod * C<timeout> — Request timeout in seconds (default is 60) If a socket open, + #pod read or write takes longer than the timeout, an exception is thrown. + #pod * C<verify_SSL> — A boolean that indicates whether to validate the SSL +-#pod certificate of an C<https> — connection (default is false) ++#pod certificate of an C<https> — connection (default is true) + #pod * C<SSL_options> — A hashref of C<SSL_*> — options to pass through to + #pod L<IO::Socket::SSL> + #pod +@@ -112,7 +112,7 @@ sub new { + max_redirect => 5, + timeout => defined $args{timeout} ? $args{timeout} : 60, + keep_alive => 1, +- verify_SSL => $args{verify_SSL} || $args{verify_ssl} || 0, # no verification by default ++ verify_SSL => $args{verify_SSL} // $args{verify_ssl} // 1, # verification by default + no_proxy => $ENV{no_proxy}, + }; + +@@ -1038,7 +1038,7 @@ sub new { timeout => 60, max_line_size => 16384, max_header_lines => 64, @@ -15,3 +31,43 @@ index 83ca06d..dc6217a 100644 SSL_options => {}, %args }, $class; +@@ -1765,7 +1765,7 @@ C<timeout> — Request timeout in seconds (default is 60) If a socket open, read + + =item * + +-C<verify_SSL> — A boolean that indicates whether to validate the SSL certificate of an C<https> — connection (default is false) ++C<verify_SSL> — A boolean that indicates whether to validate the SSL certificate of an C<https> — connection (default is true) + + =item * + +@@ -2035,7 +2035,7 @@ Verification of server identity + + =back + +-B<By default, HTTP::Tiny does not verify server identity>. ++B<By default, HTTP::Tiny in Alpine verifies server identity>. + + Server identity verification is controversial and potentially tricky because it + depends on a (usually paid) third-party Certificate Authority (CA) trust model +@@ -2043,16 +2043,14 @@ to validate a certificate as legitimate. This discriminates against servers + with self-signed certificates or certificates signed by free, community-driven + CA's such as L<CAcert.org|http://cacert.org>. + +-By default, HTTP::Tiny does not make any assumptions about your trust model, +-threat level or risk tolerance. It just aims to give you an encrypted channel +-when you need one. +- + Setting the C<verify_SSL> attribute to a true value will make HTTP::Tiny verify + that an SSL connection has a valid SSL certificate corresponding to the host + name of the connection and that the SSL certificate has been verified by a CA. + Assuming you trust the CA, this will protect against a L<man-in-the-middle +-attack|http://en.wikipedia.org/wiki/Man-in-the-middle_attack>. If you are +-concerned about security, you should enable this option. ++attack|http://en.wikipedia.org/wiki/Man-in-the-middle_attack>. ++ ++If you are not concerned about security, and this default in Alpine causes ++problems, you should disable this option. + + Certificate verification requires a file containing trusted CA certificates. + +-- |