teiiddes-2245: Corrected security check
teiiddes-2245: Refined logic for password check during preview.
Merge pull request #387 from tejones/teiiddes-2245

teiiddes-2245