web/event_list.php
changeset 996 f40a6a61d224
parent 994 053de9a4e738
child 998 bf99ad0ba5ff
--- a/web/event_list.php	Mon Nov 25 19:07:05 2013 +0100
+++ b/web/event_list.php	Mon Nov 25 19:14:10 2013 +0100
@@ -7,7 +7,7 @@
 if(isset($_REQUEST['delete']) && !empty($_REQUEST['delete'])) {
 	$delete_enc = base64_decode($_REQUEST['delete']);
 	$iv = substr($delete_enc, 0, $C_openssl_cipher_iv_length);
-	$delete_dec = openssl_decrypt(substr($delete_enc, $C_openssl_cipher_iv_length), 'aes256', hash('sha256', SECRET, true), 0, $iv);
+	$delete_dec = substr(openssl_decrypt($delete_enc, 'aes256', hash('sha256', SECRET, true), 0), $C_openssl_cipher_iv_length);
 	if(is_file($dir."/".$delete_dec)) {
 		unlink($dir."/".$delete_dec);
 	}
@@ -103,11 +103,10 @@
 				$token = base64_encode(
 					$iv .
 					openssl_encrypt(
-						$ind_file,
+						$iv.$ind_file,
 						'aes256',
 						hash('sha256', SECRET, true),
-						0,
-						$iv
+						0
 					)
 				);
 		?>