aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergo2020-04-06 01:23:00 +0200
committerM.Gergo2020-04-06 01:23:00 +0200
commit7fa39584ac0b7a750f6d17447bf2e8943cada139 (patch)
tree189fda53a0b589439408f16a22d71b0ca9055693
parentfd68dd15ba15f1935a71b4c5c5253166c52c42e3 (diff)
downloadmayor-7fa39584ac0b7a750f6d17447bf2e8943cada139.tar.gz
mayor-7fa39584ac0b7a750f6d17447bf2e8943cada139.zip
Mayor-Nextcloud script: Tankörmappák userek
-rw-r--r--egyéb/nextcloud/mayor-nextcloud.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/egyéb/nextcloud/mayor-nextcloud.php b/egyéb/nextcloud/mayor-nextcloud.php
index 9f054c98..936ed081 100644
--- a/egyéb/nextcloud/mayor-nextcloud.php
+++ b/egyéb/nextcloud/mayor-nextcloud.php
@@ -114,14 +114,20 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im
}
}
+ function rmnp($str){ //Remove non-printable
+ return preg_replace('/[\x00-\x1F\x7F-\xA0\xAD]/u', '', $str);
+ }
+
function escp($str){ //Escape strings
$str = str_replace(array("\\","`", "\'", "\"" ),array("\\\\", "\`", "\\\'", "\\\""), $str);
return escapeshellarg($str);
}
function rnescp($str){ //Escape strings
- str_replace(array("\\","`", "\'", "\"", "\ ", ), array("_", "", "", "", "_", ), $str);
- return substr(escapeshellarg($str), 1, -1);
+ $str = rmnp($str);
+ $str = escapeshellarg($str);
+ $str = str_replace(array("\\", "`", "'", "\"", "\ ", ), array("", "", "", "", "_", ), $str);
+ return $str;
}
function nxt_get_version(){