"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Locales.pm" between
Mail-SpamAssassin-3.4.4.tar.bz2 and Mail-SpamAssassin-3.4.5.tar.bz2

About: SpamAssassin is a mail filter that uses a wide range of heuristic tests on mail headers and body text to identify "spam" (also known as unsolicited commercial email) incl. Bayesian (statistical) spam filter and several internet-based realtime blacklists.

Locales.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):Locales.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 21 skipping to change at line 21
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# </@LICENSE> # </@LICENSE>
package Mail::SpamAssassin::Locales; package Mail::SpamAssassin::Locales;
use strict; use strict;
use Mail::SpamAssassin::Logger;
use warnings; use warnings;
# use bytes; # use bytes;
use re 'taint'; use re 'taint';
########################################################################### ###########################################################################
# A mapping of known country codes to frequent charsets used therein. # A mapping of known country codes to frequent charsets used therein.
# note that the ISO and CP charsets will already have been permitted, # note that the ISO and CP charsets will already have been permitted,
# so only "unusual" charsets should be listed here. # so only "unusual" charsets should be listed here.
# #
skipping to change at line 78 skipping to change at line 79
); );
########################################################################### ###########################################################################
sub is_charset_ok_for_locales { sub is_charset_ok_for_locales {
my ($cs, @locales) = @_; my ($cs, @locales) = @_;
$cs = uc $cs; $cs =~ s/[^A-Z0-9]//g; $cs = uc $cs; $cs =~ s/[^A-Z0-9]//g;
$cs =~ s/^3D//gs; # broken by quoted-printable $cs =~ s/^3D//gs; # broken by quoted-printable
$cs =~ s/:.*$//gs; # trim off multiple charsets, just use 1st $cs =~ s/:.*$//gs; # trim off multiple charsets, just use 1st
dbg ("locales: is $cs ok for @locales?");
study $cs; # study is a no-op since perl 5.16.0, eliminating related bugs study $cs; # study is a no-op since perl 5.16.0, eliminating related bugs
#warn "JMD $cs"; #warn "JMD $cs";
# always OK (the net speaks mostly roman charsets) # always OK (the net speaks mostly roman charsets)
return 1 if ($cs eq 'USASCII'); return 1 if ($cs eq 'USASCII');
return 1 if ($cs eq 'ASCII');
return 1 if ($cs =~ /^ISO8859/); return 1 if ($cs =~ /^ISO8859/);
return 1 if ($cs =~ /^ISO10646/); return 1 if ($cs =~ /^ISO10646/);
return 1 if ($cs =~ /^UTF/); return 1 if ($cs =~ /^UTF/);
return 1 if ($cs =~ /^UCS/); return 1 if ($cs =~ /^UCS/);
return 1 if ($cs =~ /^CP125/); return 1 if ($cs =~ /^CP125/);
return 1 if ($cs =~ /^WINDOWS/); # argh, Windows return 1 if ($cs =~ /^WINDOWS/); # argh, Windows
return 1 if ($cs eq 'IBM852'); return 1 if ($cs eq 'IBM852');
return 1 if ($cs =~ /^UNICODE11UTF[78]/); # wtf? never heard of it return 1 if ($cs =~ /^UNICODE11UTF[78]/); # wtf? never heard of it
return 1 if ($cs eq 'XUNKNOWN'); # added by sendmail when converting to 8bit return 1 if ($cs eq 'XUNKNOWN'); # added by sendmail when converting to 8bit
return 1 if ($cs eq 'ISO'); # Magellan, sending as 'charset=iso 8859-15'. grr return 1 if ($cs eq 'ISO'); # Magellan, sending as 'charset=iso 8859-15'. grr
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)