Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed a critical security vulnerability with password resets.
  • Loading branch information
anuko committed Feb 27, 2021
1 parent 85823f4 commit 40f3d93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions WEB-INF/templates/report.tpl
Expand Up @@ -117,6 +117,7 @@
{if $bean->getAttribute('chtimesheet')}<td></td>{/if}
{if $bean->getAttribute('chfiles')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
{* <td></td>{* column for edit icons *}
</tr>
<tr><td>&nbsp;</td></tr>
{/if}
Expand Down Expand Up @@ -171,6 +172,7 @@
{if 1 == $item.type}<td bgcolor="white"><input type="checkbox" name="log_id_{$item.id}"></td>{/if}
{if 2 == $item.type}<td bgcolor="white"><input type="checkbox" name="item_id_{$item.id}"></td>{/if}
{/if}
{* <td><a href="time_edit.php?id={$item.id}"><img class="table_icon" alt="{$i18n.label.edit}" src="img/icon-edit.png"></a></td>{* column for edit icons *}
</tr>
{if $note_on_separate_row && $bean->getAttribute('chnote') && $item.note}
<tr>
Expand Down Expand Up @@ -220,6 +222,7 @@
{if $bean->getAttribute('chtimesheet')}<td></td>{/if}
{if $bean->getAttribute('chfiles')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
{* <td></td>{* column for edit icons *}
</tr>
{/if}
<!-- print totals -->
Expand Down Expand Up @@ -261,6 +264,7 @@
{if $bean->getAttribute('chtimesheet')}<td></td>{/if}
{if $bean->getAttribute('chfiles')}<td></td>{/if}
{if $use_checkboxes}<td></td>{/if}
{* <td></td>{* column for edit icons *}
</tr>
{/if}
</table>
Expand Down
2 changes: 1 addition & 1 deletion initialize.php
Expand Up @@ -13,7 +13,7 @@
ini_set('display_errors', 'Off');

// require_once('init_auth.php');
define("APP_VERSION", "1.19.23.5414");
define("APP_VERSION", "1.19.24.5415");
define("APP_DIR", dirname(__FILE__));
define("LIBRARY_DIR", APP_DIR."/WEB-INF/lib");
define("TEMPLATE_DIR", APP_DIR."/WEB-INF/templates");
Expand Down
5 changes: 4 additions & 1 deletion password_reset.php
Expand Up @@ -46,7 +46,10 @@

if ($err->no()) {
// Prepare and save a temporary reference for user.
$temp_ref = md5(uniqid());
$cryptographically_strong = true;
$random_bytes = openssl_random_pseudo_bytes(16, $cryptographically_strong);
if ($random_bytes === false) die ("openssl_random_pseudo_bytes function call failed...");
$temp_ref = bin2hex($random_bytes);
ttUserHelper::saveTmpRef($temp_ref, $user->id);

$user_i18n = null;
Expand Down

0 comments on commit 40f3d93

Please sign in to comment.