Skip to content

Commit

Permalink
2.1.26
Browse files Browse the repository at this point in the history
Fix for #1426
  • Loading branch information
nilsteampassnet committed Aug 13, 2016
1 parent 5b360eb commit 3d85c88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Last changes
2.1.26
#1426 Fixes for many critical issues with OTV
#1421 Item will not be automatically deleted when accessed through otv option enabled
#1414 Subfolders created into personal folders are presented in Folders and Roles management
#1409 Updated PDF library to fit 7.x PHP
Expand Down
4 changes: 2 additions & 2 deletions otv.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
// check session validity
$data = DB::queryfirstrow(
"SELECT id, timestamp, code, item_id FROM ".prefix_table("otv")."
WHERE code = %i",
intval($_GET['code'])
WHERE code = %s",
$_GET['code']
);
if (
$data['timestamp'] == intval($_GET['stamp'])
Expand Down
2 changes: 1 addition & 1 deletion sources/items.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -2703,7 +2703,7 @@
require_once $_SESSION['settings']['cpassman_dir'] . '/includes/libraries/Encryption/Encryption/ExceptionHandler.php';

// delete all existing old otv codes
$rows = DB::query("SELECT id FROM ".prefix_table("otv")." WHERE timestamp < ".(time() - $_SESSION['settings']['otv_expiration_period']));
$rows = DB::query("SELECT id FROM ".prefix_table("otv")." WHERE timestamp < ".(time() - $_SESSION['settings']['otv_expiration_period'] * 86400));
foreach ($rows as $record) {
DB::delete(prefix_table('otv'), "id=%i", $record['id']);
}
Expand Down

0 comments on commit 3d85c88

Please sign in to comment.