aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_session.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-11-10 22:34:48 +0100
committerplegall <plg@piwigo.org>2015-11-10 22:34:48 +0100
commit034f689f8eebcd3fd2ea961cd8263760f23c4bff (patch)
tree3b87f70920cd2097fc01fbb16f38864c2efc421b /include/functions_session.inc.php
parentbfe4ff3e2fee4dabb2b459d2ce077ab7e92a2e39 (diff)
fixes #373 ask a longer random string
to openssl_random_pseudo_bytes, to avoid reaching the base64 trailing "=" signs
Diffstat (limited to '')
-rw-r--r--include/functions_session.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index aaa07fd07..533e34af3 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -71,7 +71,7 @@ function generate_key($size)
str_replace(
array('+', '/'),
'',
- base64_encode(openssl_random_pseudo_bytes($size))
+ base64_encode(openssl_random_pseudo_bytes($size+10))
),
0,
$size
@@ -260,4 +260,4 @@ function pwg_unset_session_var($var)
return true;
}
-?> \ No newline at end of file
+?>