aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2025-01-29 11:39:04 +0100
committerGitHub <noreply@github.com>2025-01-29 11:39:04 +0100
commitf3b4fdccd0b538a161729a3dd990ffc0a2573561 (patch)
tree78185626f18b9b9d5b3e61061e7c7508769ac0c4
parenta606b66dfe6bf4b6c6ee57ab4144fc4172a2ceea (diff)
downloadnextcloud-server-checkValidEncoding.tar.gz
nextcloud-server-checkValidEncoding.zip
refactor(encoding): Check if strings are valid for the specified encodingcheckValidEncoding
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index 92e20cfb3df..d6d32aaaf7f 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -37,7 +37,7 @@ class Encoding extends Wrapper {
* Returns whether the given string is only made of ASCII characters
*/
private function isAscii(string $str): bool {
- return !preg_match('/[\\x80-\\xff]+/', $str);
+ return mb_check_encoding($str, 'ASCII');
}
/**