LWP::Protocol::https discards 0 value for SSL_VERIFY_mode [rt.cpan.org #111517]
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- perl
- Lĩnh vực
- networking, security
Hướng nghiên cứu
Bắt đầu bằng cách tìm https.pm và phương thức xử lý các tùy chọn SSL, sau đó kiểm tra cách _extra_sock_opts được hợp nhất. Xem xét cách xử lý đã được báo cáo đối với SSL_verify_mode, SSL_verifycn_scheme và thứ tự ưu tiên của các tùy chọn; được coi là hoàn tất khi các thiết lập xác minh có giá trị bằng 0 và các scheme do bên gọi cung cấp được giữ nguyên mà không bị ghi đè.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Migrated from rt.cpan.org#111517 (status was 'open')
Requestors:
From [email protected] on 2016-01-28 16:53:08:
Hello,
If you want to disable ssl cert verification, you need to use
SSL_VERIFY_NONE, which resolves to 0. LWP::Protocol::https transforms this
value to 1:
$ssl_opts{SSL_verify_mode} ||= 1;
Patch:
--- https_old.pm 2016-01-28 16:51:38.970331004 +0000
+++ https.pm 2016-01-28 16:42:22.410331004 +0000
@@ -17,7 +17,8 @@
my $self = shift;
my %ssl_opts = %{$self->{ua}{ssl_opts} || {}};
if (delete $ssl_opts{verify_hostname}) {
- $ssl_opts{SSL_verify_mode} ||= 1;
+ $ssl_opts{SSL_verify_mode} = defined $ssl_opts{SSL_verify_mode} ?
$ssl_opts{SSL_verify_mode} : 1;
+
$ssl_opts{SSL_verifycn_scheme} = 'www';
}
else {
--
Errietta Kostala
<[email protected]>
From [email protected] on 2016-01-28 16:54:36:
Versions:
LWP::Protocol::https 6.06
This is perl 5, version 22, subversion 1 (v5.22.1) built for
x86_64-linux-gnu-thread-multi
On Thu, Jan 28, 2016 at 4:53 PM Bugs in LWP-Protocol-https via RT <
[email protected]> wrote:
>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "LWP::Protocol::https discards 0 value for SSL_VERIFY_mode",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket has been
> assigned an ID of [rt.cpan.org #111517]. Your ticket is accessible
> on the web at:
>
> https://rt.cpan.org/Ticket/Display.html?id=111517
>
> Please include the string:
>
> [rt.cpan.org #111517]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
> Thank you,
> [email protected]
>
> -------------------------------------------------------------------------
> Hello,
>
> If you want to disable ssl cert verification, you need to use
> SSL_VERIFY_NONE, which resolves to 0. LWP::Protocol::https transforms this
> value to 1:
>
> $ssl_opts{SSL_verify_mode} ||= 1;
> Patch:
>
> --- https_old.pm 2016-01-28 16:51:38.970331004 +0000
> +++ https.pm 2016-01-28 16:42:22.410331004 +0000
> @@ -17,7 +17,8 @@
> my $self = shift;
> my %ssl_opts = %{$self->{ua}{ssl_opts} || {}};
> if (delete $ssl_opts{verify_hostname}) {
> - $ssl_opts{SSL_verify_mode} ||= 1;
> + $ssl_opts{SSL_verify_mode} = defined $ssl_opts{SSL_verify_mode} ?
> $ssl_opts{SSL_verify_mode} : 1;
> +
> $ssl_opts{SSL_verifycn_scheme} = 'www';
> }
> else {
> --
> Errietta Kostala
> <[email protected]>
>
--
Errietta Kostala
<[email protected]>
From [email protected] on 2016-05-15 21:25:35:
I can confirm this bug. In general it is of course not a good thing to turn off SSL verification but there are legitimate cases for this. This bug in combination with changed behavior in IO::Socket::SSL makes it impossible to turn off SSL verification (it used to be possible to pass a non-numerical value to IO::Socket::SSL and that would do the trick).
Fixing this would be highly appreciated!
/Sune
--
Sune Karlsson
Professor of Statistics
Handelshögskolan/Ãrebro University School of Business
Ãrebro University, SE-70182 Ãrebro, Sweden
Phone +46 19 301257
http://www.oru.se/hh/sune_karlsson
http://econpapers.repec.org/RAS/pka1.htm
From [email protected] on 2016-07-06 23:24:15:
Please also change
$ssl_opts{SSL_verifycn_scheme} = 'www';
to
$ssl_opts{SSL_verifycn_scheme} ||= 'www';
That way we can pass along our own verification scheme.
For example if we want to verify a portion of the hostname or something like:
LWP::UserAgent->new( ssl_opts => {
SSL_verifycn_scheme => {
callback => sub {
if ($_[1] =~ m/^$_[0]:.*/) {
return 1;
}
return 0;
}
}});
From [email protected] on 2016-07-06 23:38:07:
Also in the same method, shouldn't the return be
return ($self->SUPER::_extra_sock_opts, %ssl_opts);
not
return (%ssl_opts, $self->SUPER::_extra_sock_opts);
Otherwise your base class would be overriding your subclasses options.
On Wed Jul 06 19:24:15 2016, [email protected] wrote:
> Please also change
>
> $ssl_opts{SSL_verifycn_scheme} = 'www';
> to
> $ssl_opts{SSL_verifycn_scheme} ||= 'www';
>
> That way we can pass along our own verification scheme.
> For example if we want to verify a portion of the hostname or
> something like:
> LWP::UserAgent->new( ssl_opts => {
> SSL_verifycn_scheme => {
> callback => sub {
> if ($_[1] =~ m/^$_[0]:.*/) {
> return 1;
> }
> return 0;
> }
> }});
- Ngôn ngữ chính
- Perl
- Star
- 17
- Fork
- 35
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của libwww-perl/LWP-Protocol-https
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
libwww-perl/LWP-Protocol-https#80 · 11 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
libwww-perl/LWP-Protocol-https#62 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
libwww-perl/LWP-Protocol-https#102 · 2 bình luận ·
Tất cả issue của libwww-perl/LWP-Protocol-https
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
inverse-inc/packetfence#9387 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`-static-libstdc++` breaks buildĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linux-test-project/lcov#552 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
szTheory/exifcleaner#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
thrift: security issues < 0.25.0Đang mở1.severity: security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NixOS/nixpkgs#569828 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ESCOMP/CAM#1701 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày