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