Skip to content

Commit b850256

Browse files
authored
Merge pull request #662 from cakephp/dev-tld
Don't treat "dev" as a safe TLD by default.
2 parents 6af90f1 + da5ca0a commit b850256

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ToolbarService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected function isSuspiciouslyProduction()
131131
}
132132

133133
$tld = end($host);
134-
$safeTopLevelDomains = ['localhost', 'dev', 'invalid', 'test', 'example', 'local'];
134+
$safeTopLevelDomains = ['localhost', 'invalid', 'test', 'example', 'local'];
135135
$safeTopLevelDomains = array_merge($safeTopLevelDomains, (array)$this->getConfig('safeTld'));
136136

137137
if (!in_array($tld, $safeTopLevelDomains, true) && !$this->getConfig('forceEnable')) {

tests/TestCase/ToolbarServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public function domainsProvider()
382382
['10.14.34.5:80', true],
383383
['myapp.localhost', true],
384384
['myapp.local', true],
385-
['myapp.dev', true],
385+
['myapp.dev', false],
386386
['myapp', true],
387387
['myapp.invalid', true],
388388
['myapp.test', true],

0 commit comments

Comments
 (0)