From 04ddb3e1b3e4648790b396dba148cfae24a5802c Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Wed, 14 Oct 2015 15:10:50 -0700 Subject: Properly handle missing session IDs regardless of case --- web/react/components/access_history_modal.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx index 58523feeb..909639859 100644 --- a/web/react/components/access_history_modal.jsx +++ b/web/react/components/access_history_modal.jsx @@ -330,11 +330,15 @@ export default class AccessHistoryModal extends React.Component { ); if (this.state.moreInfo[i]) { - if (!currentAudit.session_id && currentAudit.action.search('/users/login') !== -1) { - if (currentAudit.extra_info === 'attempt') { - currentAudit.session_id = 'N/A (Login attempt)'; - } else { - currentAudit.session_id = 'N/A (Login failure)'; + if (!currentAudit.session_id) { + currentAudit.session_id = 'N/A'; + + if (currentAudit.action.search('/users/login') >= 0) { + if (currentAudit.extra_info === 'attempt') { + currentAudit.session_id += ' (Login attempt)'; + } else { + currentAudit.session_id += ' (Login failure)'; + } } } -- cgit v1.2.3-1-g7c22