check for a few more bad inputs

master
h00die 2019-04-17 20:33:50 -04:00
parent dcc1a21251
commit 20934f114a
1 changed files with 21 additions and 0 deletions

View File

@ -245,5 +245,26 @@ RSpec.describe 'hashes/identify' do
end
end
describe 'identify_shadow_line' do
it 'returns empty string' do
hash = identify_hash('root:$1$TDQFedzX$.kv51AjM.FInu0lrH1dY30:15045:0:99999:7:::')
expect(hash).to match('')
end
end
describe 'identify_un_pass' do
it 'returns empty string' do
hash = identify_hash('root:$1$TDQFedzX$.kv51AjM.FInu0lrH1dY30')
expect(hash).to match('')
end
end
describe 'identify_ascii_as_nothing' do
it 'returns empty string' do
hash = identify_hash('This is just some words')
expect(hash).to match('')
end
end
end