diff --git a/lib/Punycode.php b/lib/Punycode.php index 46b95e7..eb2bc63 100644 --- a/lib/Punycode.php +++ b/lib/Punycode.php @@ -87,7 +87,7 @@ class Punycode { $length = strlen($output); if ($length > 255) { $this->errFlag = true; - $this->errMsg = 'A full domain name is limited to 255 octets (including the separators), ' . $length . 'given.'; + $this->errMsg = 'A full domain name is limited to 255 octets (including the separators), ' . $length . ' given.'; } return $output; diff --git a/models/punycode.php b/models/punycode.php index a831a89..c5eb65f 100644 --- a/models/punycode.php +++ b/models/punycode.php @@ -29,7 +29,7 @@ class punycodeEntry { public function query($rawParam) { // Punycode转换查询入口 $encode = $this->encode($rawParam); $decode = $this->decode($rawParam); - if ($decode['data'] === $rawParam) { // 输入为明文 + if ($decode['data'] === strtolower($rawParam)) { // 输入为明文 $msg = '`' . $encode['data'] . '`' . PHP_EOL; if ($encode['status'] !== 'ok') { $errMsg = $encode['message'];