Skip Menu |

This queue is for tickets about the IO-Socket-SSL CPAN distribution.

Report information
The Basics
Id: 98258
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

People
Owner: Nobody in particular
Requestors: rjk [...] tamias.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.997
Fixed in: (no value)



Subject: IO::Socket::SSL::PublicSuffix does not ignore comments when reading default data
Socket::SSL::PublicSuffix::_default_data() reads in default data from the DATA at the end of the file. This data contains JavaScript-style comments. Instead of ignoring the comments, the module tries to process them, resulting in URI::_idna::_check_size() throwing an error: ERROR 500 Label too long at /usr/share/perl5/IO/Socket/SSL/PublicSuffix.pm line 187. A stack trace shows that PublicSuffix is treating the comments as data: $ = URI::_idna::ToASCII(' If a copy of the MPL was not distributed with this^J// file, You can obtain one at http://mozilla') called from file `/usr/share/perl5/URI/_idna.pm' line 25 $ = URI::_idna::encode('^J// License, v. 2.0. If a copy of the MPL was not distributed with this^J// file, You can obtain one at http://mozilla.org/MPL/2.0/.^J^J// ===BEGIN ICANN DOMAINS===^J^J// ac : http://en.wikipedia.org/wiki/.ac^Jac^Jcom.ac^Jedu.ac^Jgov.ac^Jnet.ac^Jmil.ac^Jorg.ac^J^J// ad : http://en.wikipedia.org/wiki/.ad^Jad^Jnom.ad^J^J// ae : http://en.wikipedia.org/wiki/.ae^J// see also: "Domain Name Eligib... called from file `/usr/share/perl5/IO/Socket/SSL/PublicSuffix.pm' line 187 $ = IO::Socket::SSL::PublicSuffix::from_file('IO::Socket::SSL::PublicSuffix', ref(GLOB), 'min_suffix', 1) called from file `/usr/share/perl5/IO/Socket/SSL/PublicSuffix.pm' line 166 $ = IO::Socket::SSL::PublicSuffix::from_string('IO::Socket::SSL::PublicSuffix', '// This Source Code Form is subject to the terms of the Mozilla Public^J// License, v. 2.0. If a copy of the MPL was not distributed with this^J// file, You can obtain one at http://mozilla.org/MPL/2.0/.^J^J// ===BEGIN ICANN DOMAINS===^J^J// ac : http://en.wikipedia.org/wiki/.ac^Jac^Jcom.ac^Jedu.ac^Jgov.ac^Jnet.ac^Jmil.ac^Jorg.ac^J^J// ad : http://en.wikipedia... called from file `/usr/share/perl5/IO/Socket/SSL/PublicSuffix.pm' line 157
From: rjk [...] tamias.net
I tracked this down to my script setting $/ to undef, which breaks the input loop in IO::Socket::SSL::PublicSuffix::from_file(): while ( my $line = <$fh>) { I can fix my script to not globally change $/, but IO::Socket::SSL::PublicSuffix should probably also guard against this case by setting $/ in from_file().
Am Fr 22. Aug 2014, 12:34:12, rjk-cpan@tamias.net schrieb: Show quoted text
> I tracked this down to my script setting $/ to undef, which breaks the > input loop in IO::Socket::SSL::PublicSuffix::from_file(): > > while ( my $line = <$fh>) { > > I can fix my script to not globally change $/, but > IO::Socket::SSL::PublicSuffix should probably also guard against this > case by setting $/ in from_file().
This is fixed in commit b6af7542, but I assume that you will run into lots of other problems if you set $/ globally to something else then "\n", because nobody will expect such non-standard behavior.