Bug #73655 [Com]: Spoofchecker::isSuspicious broken
| From: | me at kelunik dot com | Date: | Mon, 05 Dec 2016 16:22:50 +0000 |
| Subject: | Bug #73655 [Com]: Spoofchecker::isSuspicious broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205782@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73655&edit=1
ID: 73655
Comment by: me at kelunik dot com
Reported by: sjon at hortensius dot net
Summary: Spoofchecker::isSuspicious broken
Status: Open
Type: Bug
Package: I18N and L10N related
PHP Version: 7.1.0
Block user comment: N
Private report: N
New Comment:
Works for me with ICU 55, so it seems to be an ICU problem.
$ php -v
PHP 7.1.0 (cli) (built: Dec 5 2016 17:15:16) ( NTS DEBUG )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
$ cat bug73655.php
<?php
$checker = new Spoofchecker();
var_dump($checker->isSuspicious('google.com'));
var_dump($checker->isSuspicious('Ð aypal.com'));
$ php bug73655.php
bool(false)
bool(true)
$ apt-show-versions libicu-dev
libicu-dev:amd64/xenial 55.1-7 uptodate
libicu-dev:i386 not installed
Previous Comments:
------------------------------------------------------------------------
[2016-12-05 16:22:21] sjon at hortensius dot net
I have confirmed php-7.1.0 compiled with ICU 55 works fine. Compiled with ICU 57 also works. Can
anyone confirm if this is a bug with ICU itself; or with PHP's usage of ICU?
This is still a problem as distros such as ArchLinux will soon release with ICU-58 and experience
this issue
------------------------------------------------------------------------
[2016-12-05 15:51:11] sjon at hortensius dot net
This might also be related to the recently released ICU-58 (http://site.icu-project.org/download/58)
with which 7.1 was compiled. I'm sure distros will compile with the same ICU but this might be
the reason I didn't find a suspicious commit in php-src itself
------------------------------------------------------------------------
[2016-12-05 15:31:08] sjon at hortensius dot net
Description:
------------
It seems Spoofchecker::isSuspicious is broken; testing an example from the manual all PHP versions
work fine; except 7.1.0.
This seems related to an update which was done to the localization which was not present in any of
the RCs (insert rant about RCs being real RCs here)
Test script:
---------------
See https://3v4l.org/5HWQT, script was copied from http://php.net/manual/en/spoofchecker.issuspicious.php
<?php
$checker = new Spoofchecker();
var_dump($checker->isSuspicious('google.com'));
var_dump($checker->isSuspicious('Ð aypal.com'));
Expected result:
----------------
bool(false)
bool(true)
Actual result:
--------------
bool(false)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73655&edit=1