chipbite/JiraToExcel

Fix for prompting for username and/or password, if not stored (unsafe) in the excel file.

Opened this issue · 1 comments

As we all know storing passwords in Excel isn't really the safest thing to do. Even if you delete the values, they may still exist inside the excel file.
This fix will prompt you for username and/or a password should it not be available on the con sheet.

This fix has only been tested with a 64 bit excel - together with my 64 bit fix for this script.

In the ImporterSetup Module I changed the following;

    Userid = ValueOfNameInSheetStartingWith("userName", "Con")
    Pwd = ValueOfNameInSheetStartingWith("password", "Con")

Into the following:

    Userid = m_connectionSettingsSheet.Range("userName").value
    If Userid = "" Then
        Userid = InputBox("Please provide a JIRA username (shortform)")
    End If
    
    Pwd = m_connectionSettingsSheet.Range("password").value
    If Pwd = "" Then
        Pwd = InputBox("Please provide the password for JIRA user '" + Userid + "'")
    End If
    
    If Userid = "" Or Pwd = "" Then
        ' We reach here if either of the popups were canceled.
        ResumeUpdating
        End
    End If
    

Yeah, password handling is a pragmatic shortcut, viewing this as a personal tool, but that might differ.

Appreciate the contribution.