summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/session.c b/session.c
index b435c4d..3c40567 100644
--- a/session.c
+++ b/session.c
@@ -746,8 +746,8 @@ char *suhosin_generate_key(char *key, zend_bool ua, zend_bool dr, long raddr, ch
746 SDEBUG("(suhosin_generate_key) KEY: %s - UA: %s - DR: %s - RA: %s", key,_ua,_dr,_ra); 746 SDEBUG("(suhosin_generate_key) KEY: %s - UA: %s - DR: %s - RA: %s", key,_ua,_dr,_ra);
747 747
748 suhosin_SHA256Init(&ctx); 748 suhosin_SHA256Init(&ctx);
749 if (key == NULL) { 749 if (key == NULL || *key == 0) {
750 suhosin_SHA256Update(&ctx, (unsigned char*)"D3F4UL7", sizeof("D3F4UL7")); 750 suhosin_SHA256Update(&ctx, (unsigned char*)"D3F4UL7", strlen("D3F4UL7"));
751 } else { 751 } else {
752 suhosin_SHA256Update(&ctx, (unsigned char*)key, strlen(key)); 752 suhosin_SHA256Update(&ctx, (unsigned char*)key, strlen(key));
753 } 753 }