com php-src: With ICU 58+, set the default restriction level to high: ext/intl/spoofchecker/spoofchecker_class.h ext/intl/spoof
checker/spoofchecker_create.c

From: Date: Sat, 21 Oct 2017 15:21:41 +0000
Subject: com php-src: With ICU 58+, set the default restriction level to high: ext/intl/spoofchecker/spoofchecker_class.h ext/intl/spoof
checker/spoofchecker_create.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99833@lists.php.net to get a copy of this message
Commit: 1d781fbdb1204dec1d730b5ea3ef29306534c6e8 Author: Anatol Belski <ab@php.net> Sat, 21 Oct 2017 17:21:41 +0200 Parents: 44b3bc847b7b2d32724947484915ce51d8a60786 Branches: PHP-7.0 PHP-7.1 PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1d781fbdb1204dec1d730b5ea3ef29306534c6e8 Log: With ICU 58+, set the default restriction level to high Further experiments show, that CJK scripts should be ok. If there are any issues, the moderate level can still be set later. Changed paths: M ext/intl/spoofchecker/spoofchecker_class.h M ext/intl/spoofchecker/spoofchecker_create.c Diff: diff --git a/ext/intl/spoofchecker/spoofchecker_class.h b/ext/intl/spoofchecker/spoofchecker_class.h index 7a95f31..d6f2c2d 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.h +++ b/ext/intl/spoofchecker/spoofchecker_class.h @@ -78,6 +78,6 @@ extern zend_class_entry *Spoofchecker_ce_ptr; RETURN_FALSE; \ } \ -#define SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL USPOOF_MODERATELY_RESTRICTIVE +#define SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL USPOOF_HIGHLY_RESTRICTIVE #endif // #ifndef SPOOFCHECKER_CLASS_H diff --git a/ext/intl/spoofchecker/spoofchecker_create.c b/ext/intl/spoofchecker/spoofchecker_create.c index 1333a0f..8108caf 100644 --- a/ext/intl/spoofchecker/spoofchecker_create.c +++ b/ext/intl/spoofchecker/spoofchecker_create.c @@ -48,11 +48,9 @@ PHP_METHOD(Spoofchecker, __construct) /* ICU 58 removes WSC and MSC handling. However there are restriction levels as defined in http://www.unicode.org/reports/tr39/tr39-15.html#Restriction_Level_Detection - and the default is high restrictive. However the moderately restrictive - level is what seems to correspond to the setting below applicable to - ICU < 58. In further, we might want to utilize uspoof_check2 APIs when - it became stable, to use extended check result APIs. Subsequent changes - in the unicode security algos are to be watched.*/ + and the default is high restrictive. In further, we might want to utilize + uspoof_check2 APIs when it became stable, to use extended check result APIs. + Subsequent changes in the unicode security algos are to be watched.*/ uspoof_setRestrictionLevel(co->uspoof, SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL); #else /* Single-script enforcement is on by default. This fails for languages

« previous php.cvs (#99833) next »