aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-base/www/include
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-base/www/include')
-rw-r--r--mayor-orig/mayor-base/www/include/base/var.php4
-rw-r--r--mayor-orig/mayor-base/www/include/share/ssl/ssl.php8
2 files changed, 8 insertions, 4 deletions
diff --git a/mayor-orig/mayor-base/www/include/base/var.php b/mayor-orig/mayor-base/www/include/base/var.php
index 3068fbc6..fda47dd2 100644
--- a/mayor-orig/mayor-base/www/include/base/var.php
+++ b/mayor-orig/mayor-base/www/include/base/var.php
@@ -50,7 +50,7 @@
$return = (isset($IN)) ? preg_replace("/[^a-zA-Z0-9_\-]/i",'',$IN) : $default;
break;
case 'html':
- $return = (isset($IN)) ? preg_replace("/[^a-zA-Z0-9\ \.\,?_|:;űáéúőóüöíŰÁÉÚŐÓÜÖÍ\-]/i",'',$IN) : $default;
+ $return = (isset($IN)) ? preg_replace("/[^a-zA-Z0-9\ \.\,?_|:;űáäéúőóüöíŰÁÄÉÚŐÓÜÖÍ\-]/i",'',$IN) : $default;
break;
case 'hexa':
$return = preg_replace("/[^0-9a-fA-F]/i",'',$IN);
@@ -76,7 +76,7 @@
$return = filter_var($IN, FILTER_VALIDATE_EMAIL);
break;
case 'userAccount':
- $return = (preg_match("#([a-z]|[A-Z]|[0-9]| |\.|,|_|[űáéúőóüöíŰÁÉÚŐÓÜÖÍäÄ]|-|@)*$#", $IN) != false) ? $IN : $default;
+ $return = (preg_match("#([a-z]|[A-Z]|[0-9]| |\.|,|_|[űáäéúőóüöíŰÁÄÉÚŐÓÜÖÍäÄ]|-|@)*$#", $IN) != false) ? $IN : $default;
break;
default:
$return = $IN;
diff --git a/mayor-orig/mayor-base/www/include/share/ssl/ssl.php b/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
index 61b6ca1b..c8aaba2d 100644
--- a/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
+++ b/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
@@ -187,7 +187,9 @@ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzAB
if (function_exists('mcrypt_encrypt')) {
$return = mcrypt_encrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
} else {
- $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
+ $return = openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ // $return = openssl_decrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ //$_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
}
return base64_encode($return);
}
@@ -201,7 +203,9 @@ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzAB
if (function_exists('mcrypt_decrypt')) {
$return = mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
} else {
- $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
+ // $return = openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ $return = openssl_decrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ // $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
}
return trim(urldecode($return));
}