Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
afi
zf
Commits
6333c15e
Commit
6333c15e
authored
Jan 03, 2018
by
Laurent
Browse files
hotline #65274 update tlds
parent
92fd58c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1570 additions
and
27 deletions
+1570
-27
library/Zend/Validate/Hostname.php
library/Zend/Validate/Hostname.php
+3
-27
library/Zend/Validate/Hostname/ValidTlds.php
library/Zend/Validate/Hostname/ValidTlds.php
+1567
-0
No files found.
library/Zend/Validate/Hostname.php
View file @
6333c15e
...
...
@@ -138,33 +138,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
* @var array
* @see ftp://data.iana.org/TLD/tlds-alpha-by-domain.txt List of all TLDs by domain
*/
protected
$_validTlds
=
array
(
'ac'
,
'ad'
,
'ae'
,
'aero'
,
'af'
,
'ag'
,
'ai'
,
'al'
,
'am'
,
'an'
,
'ao'
,
'aq'
,
'ar'
,
'arpa'
,
'as'
,
'asia'
,
'at'
,
'au'
,
'aw'
,
'ax'
,
'az'
,
'ba'
,
'bb'
,
'bd'
,
'be'
,
'bf'
,
'bg'
,
'bh'
,
'bi'
,
'biz'
,
'bj'
,
'bm'
,
'bn'
,
'bo'
,
'br'
,
'bs'
,
'bt'
,
'bv'
,
'bw'
,
'by'
,
'bz'
,
'ca'
,
'cat'
,
'cc'
,
'cd'
,
'cf'
,
'cg'
,
'ch'
,
'ci'
,
'ck'
,
'cl'
,
'cm'
,
'cn'
,
'co'
,
'com'
,
'coop'
,
'cr'
,
'cu'
,
'cv'
,
'cx'
,
'cy'
,
'cz'
,
'de'
,
'dj'
,
'dk'
,
'dm'
,
'do'
,
'dz'
,
'ec'
,
'edu'
,
'ee'
,
'eg'
,
'er'
,
'es'
,
'et'
,
'eu'
,
'fi'
,
'fj'
,
'fk'
,
'fm'
,
'fo'
,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'
,
'tf'
,
'tg'
,
'th'
,
'tj'
,
'tk'
,
'tl'
,
'tm'
,
'tn'
,
'to'
,
'tp'
,
'tr'
,
'travel'
,
'tt'
,
'tv'
,
'tw'
,
'tz'
,
'ua'
,
'ug'
,
'uk'
,
'um'
,
'us'
,
'uy'
,
'uz'
,
'va'
,
'vc'
,
've'
,
'vg'
,
'vi'
,
'vn'
,
'vu'
,
'wf'
,
'ws'
,
'ye'
,
'yt'
,
'yu'
,
'za'
,
'zm'
,
'zw'
);
protected
$_validTlds
=
[];
/**
* @var string
...
...
@@ -183,6 +157,8 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract
*/
public
function
__construct
(
$allow
=
self
::
ALLOW_DNS
,
$validateIdn
=
true
,
$validateTld
=
true
,
Zend_Validate_Ip
$ipValidator
=
null
)
{
$this
->
_validTlds
=
Zend_Validate_Hostname_ValidTlds
::
validTls
();
// Set allow options
$this
->
setAllow
(
$allow
);
...
...
library/Zend/Validate/Hostname/ValidTlds.php
0 → 100644
View file @
6333c15e
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* contributed by AFI
*/
class
Zend_Validate_Hostname_ValidTlds
{
protected
static
$VALID_TLDS
=
[
'aaa'
,
'aarp'
,
'abarth'
,
'abb'
,
'abbott'
,
'abbvie'
,
'abc'
,
'able'
,
'abogado'
,
'abudhabi'
,
'ac'
,
'academy'
,
'accenture'
,
'accountant'
,
'accountants'
,
'aco'
,
'active'
,
'actor'
,
'ad'
,
'adac'
,
'ads'
,
'adult'
,
'ae'
,
'aeg'
,
'aero'
,
'aetna'
,
'af'
,
'afamilycompany'
,
'afl'
,
'africa'
,
'ag'
,
'agakhan'
,
'agency'
,
'ai'
,
'aig'
,
'aigo'
,
'airbus'
,
'airforce'
,
'airtel'
,
'akdn'
,
'al'
,
'alfaromeo'
,
'alibaba'
,
'alipay'
,
'allfinanz'
,
'allstate'
,
'ally'
,
'alsace'
,
'alstom'
,
'am'
,
'americanexpress'
,
'americanfamily'
,
'amex'
,
'amfam'
,
'amica'
,
'amsterdam'
,
'analytics'
,
'android'
,
'anquan'
,
'anz'
,
'ao'
,
'aol'
,
'apartments'
,
'app'
,
'apple'
,
'aq'
,
'aquarelle'
,
'ar'
,
'arab'
,
'aramco'
,
'archi'
,
'army'
,
'arpa'
,
'art'
,
'arte'
,
'as'
,
'asda'
,
'asia'
,
'associates'
,
'at'
,
'athleta'
,
'attorney'
,
'au'
,
'auction'
,
'audi'
,
'audible'
,
'audio'
,
'auspost'
,
'author'
,
'auto'
,
'autos'
,
'avianca'
,
'aw'
,
'aws'
,
'ax'
,
'axa'
,
'az'
,
'azure'
,
'ba'
,
'baby'
,
'baidu'
,
'banamex'
,
'bananarepublic'
,
'band'
,
'bank'
,
'bar'
,
'barcelona'
,
'barclaycard'
,
'barclays'
,
'barefoot'
,
'bargains'
,
'baseball'
,
'basketball'
,
'bauhaus'
,
'bayern'
,
'bb'
,
'bbc'
,
'bbt'
,
'bbva'
,
'bcg'
,
'bcn'
,
'bd'
,
'be'
,
'beats'
,
'beauty'
,
'beer'
,
'bentley'
,
'berlin'
,
'best'
,
'bestbuy'
,
'bet'
,
'bf'
,
'bg'
,
'bh'
,
'bharti'
,
'bi'
,
'bible'
,
'bid'
,
'bike'
,
'bing'
,
'bingo'
,
'bio'
,
'biz'
,
'bj'
,
'black'
,
'blackfriday'
,
'blanco'
,
'blockbuster'
,
'blog'
,
'bloomberg'
,
'blue'
,
'bm'
,
'bms'
,
'bmw'
,
'bn'
,
'bnl'
,
'bnpparibas'
,
'bo'
,
'boats'
,
'boehringer'
,
'bofa'
,
'bom'
,
'bond'
,
'boo'
,
'book'
,
'booking'
,
'boots'
,
'bosch'
,
'bostik'
,
'boston'
,
'bot'
,
'boutique'
,
'box'
,
'br'
,
'bradesco'
,
'bridgestone'
,
'broadway'
,
'broker'
,
'brother'
,
'brussels'
,
'bs'
,
'bt'
,
'budapest'
,
'bugatti'
,
'build'
,
'builders'
,
'business'
,
'buy'
,
'buzz'
,
'bv'
,
'bw'
,
'by'
,
'bz'
,
'bzh'
,
'ca'
,
'cab'
,
'cafe'
,
'cal'
,
'call'
,
'calvinklein'
,
'cam'
,
'camera'
,
'camp'
,
'cancerresearch'
,
'canon'
,
'capetown'
,
'capital'
,
'capitalone'
,
'car'
,
'caravan'
,
'cards'
,
'care'
,
'career'
,
'careers'
,
'cars'
,
'cartier'
,
'casa'
,
'case'
,
'caseih'
,
'cash'
,
'casino'
,
'cat'
,
'catering'
,
'catholic'
,
'cba'
,
'cbn'
,
'cbre'
,
'cbs'
,
'cc'
,
'cd'
,
'ceb'
,
'center'
,
'ceo'
,
'cern'
,
'cf'
,
'cfa'
,
'cfd'
,
'cg'
,
'ch'
,
'chanel'
,
'channel'
,
'chase'
,
'chat'
,
'cheap'
,
'chintai'
,
'christmas'
,
'chrome'
,
'chrysler'
,
'church'
,
'ci'
,
'cipriani'
,
'circle'
,
'cisco'
,
'citadel'
,
'citi'
,
'citic'
,
'city'
,
'cityeats'
,
'ck'
,
'cl'
,
'claims'
,
'cleaning'
,
'click'
,
'clinic'
,
'clinique'
,
'clothing'
,
'cloud'
,
'club'
,
'clubmed'
,
'cm'
,
'cn'
,
'co'
,
'coach'
,
'codes'
,
'coffee'
,
'college'
,
'cologne'
,
'com'
,
'comcast'
,
'commbank'
,
'community'
,
'company'
,
'compare'
,
'computer'
,
'comsec'
,
'condos'
,
'construction'
,
'consulting'
,
'contact'
,
'contractors'
,
'cooking'
,
'cookingchannel'
,
'cool'
,
'coop'
,
'corsica'
,
'country'
,
'coupon'
,
'coupons'
,
'courses'
,
'cr'
,
'credit'
,
'creditcard'
,
'creditunion'
,
'cricket'
,
'crown'
,
'crs'
,
'cruise'
,
'cruises'
,
'csc'
,
'cu'
,
'cuisinella'
,
'cv'
,
'cw'
,
'cx'
,
'cy'
,
'cymru'
,
'cyou'
,
'cz'
,
'dabur'
,
'dad'
,
'dance'
,
'data'
,
'date'
,
'dating'
,
'datsun'
,
'day'
,
'dclk'
,
'dds'
,
'de'
,
'deal'
,
'dealer'
,
'deals'
,
'degree'
,
'delivery'
,
'dell'
,
'deloitte'
,
'delta'
,
'democrat'
,
'dental'
,
'dentist'
,
'desi'
,
'design'
,
'dev'
,
'dhl'
,
'diamonds'
,
'diet'
,
'digital'
,
'direct'
,
'directory'
,
'discount'
,
'discover'
,
'dish'
,
'diy'
,
'dj'
,
'dk'
,
'dm'
,
'dnp'
,
'do'
,
'docs'
,
'doctor'
,
'dodge'
,
'dog'
,
'doha'
,
'domains'
,
'dot'
,
'download'
,
'drive'
,
'dtv'
,
'dubai'
,
'duck'
,
'dunlop'
,
'duns'
,
'dupont'
,
'durban'
,
'dvag'
,
'dvr'
,
'dz'
,
'earth'
,
'eat'
,
'ec'
,
'eco'
,
'edeka'
,
'edu'
,
'education'
,
'ee'
,
'eg'
,
'email'
,
'emerck'
,
'energy'
,
'engineer'
,
'engineering'
,
'enterprises'
,
'epost'
,
'epson'
,
'equipment'
,
'er'
,
'ericsson'
,
'erni'
,
'es'
,
'esq'
,
'estate'
,
'esurance'
,
'et'
,
'etisalat'
,
'eu'
,
'eurovision'
,
'eus'
,
'events'
,
'everbank'
,
'exchange'
,
'expert'
,
'exposed'
,
'express'
,
'extraspace'
,
'fage'
,
'fail'
,
'fairwinds'
,
'faith'
,
'family'
,
'fan'
,
'fans'
,
'farm'
,
'farmers'
,
'fashion'
,
'fast'
,
'fedex'
,
'feedback'
,
'ferrari'
,
'ferrero'
,
'fi'
,
'fiat'
,
'fidelity'
,
'fido'
,
'film'
,
'final'
,
'finance'
,
'financial'
,
'fire'
,
'firestone'
,
'firmdale'
,
'fish'
,
'fishing'
,
'fit'
,
'fitness'
,
'fj'
,
'fk'
,
'flickr'
,
'flights'
,
'flir'
,
'florist'
,
'flowers'
,
'fly'
,
'fm'
,
'fo'
,
'foo'
,
'food'
,
'foodnetwork'
,
'football'
,
'ford'
,
'forex'
,
'forsale'
,
'forum'
,
'foundation'
,
'fox'
,
'fr'
,
'free'
,
'fresenius'
,
'frl'
,
'frogans'
,
'frontdoor'
,
'frontier'
,
'ftr'
,
'fujitsu'
,
'fujixerox'
,
'fun'
,
'fund'
,
'furniture'
,
'futbol'
,
'fyi'
,
'ga'
,
'gal'
,
'gallery'
,
'gallo'
,
'gallup'
,
'game'
,
'games'
,
'gap'
,
'garden'
,
'gb'
,
'gbiz'
,
'gd'
,
'gdn'
,
'ge'
,
'gea'
,
'gent'
,
'genting'
,
'george'
,
'gf'
,
'gg'
,
'ggee'
,
'gh'
,
'gi'
,
'gift'
,
'gifts'
,
'gives'
,
'giving'
,
'gl'
,
'glade'
,
'glass'
,
'gle'
,
'global'
,
'globo'
,
'gm'
,
'gmail'
,
'gmbh'
,
'gmo'
,
'gmx'
,
'gn'
,
'godaddy'
,
'gold'
,
'goldpoint'
,
'golf'
,
'goo'
,
'goodhands'
,
'goodyear'
,
'goog'
,
'google'
,
'gop'
,
'got'
,
'gov'
,
'gp'
,
'gq'
,
'gr'
,
'grainger'
,
'graphics'
,
'gratis'
,
'green'
,
'gripe'
,
'grocery'
,
'group'
,
'gs'
,
'gt'
,
'gu'
,
'guardian'
,
'gucci'
,
'guge'
,
'guide'
,
'guitars'
,