We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adc7151 commit f184707Copy full SHA for f184707
src/Validator/Sha1.php
@@ -18,7 +18,12 @@ protected function check(?string $key, &$value): void {
18
if (is_array($value) || is_object($value))
19
throw new \ExceptionToResponse\InvalidParameterException('Invalid ' . $key, $this->getCnMsg());
20
$value = (string)$value;
21
+ $value = str_replace([
22
+ "\x08",
23
+ "\x7F"
24
+ ], '', $value); // x08为退格字符 x7f为DEL字符
25
+ $value = trim($value);
26
if (! preg_match("/[0-9a-fA-F]{40}$/", $value))
27
28
}
-}
29
+}
0 commit comments