tobiasvl / 1password2pass

Script for importing 1Password passwords to pass
http://www.zx2c4.com/projects/password-store/
GNU General Public License v2.0
6 stars 4 forks source link

entries without usernames trigger fatal errors #5

Closed jlfranklin closed 6 years ago

jlfranklin commented 8 years ago

If an entry has no username field, then the script fails with the following error:

./1password2pass.rb:119:in `block in <main>': undefined method `[]' for nil:NilClass (NoMethodError)
from ./1password2pass.rb:111:in `each'
from ./1password2pass.rb:111:in `<main>'

An example entry with the password scrubbed:

{:uuid=>"E50538F9F11E49ADBDCA27EDBAB0ABFE", :updatedAt=>1291324379, :locationKey=>"pnc.com", :folderUuid=>"68D9B986A48C47139809383758A426A6", :securityLevel=>"SL5", :contentsHash=>"a466a498", :title=>"Pnc", :location=>"https://www-fsc.onlinebanking.pnc.com/alservlet/OnlineBankingServlet", :secureContents=>{:htmlName=>"passwordForm", :fields=>[{:value=>"redacted", :type=>"P", :designation=>"password", :name=>"password"}, {:value=>"Sign On", :type=>"B", :name=>""}], :htmlMethod=>"post", :htmlAction=>"/alservlet/VerifyPasswordServlet", :URLs=>[{:url=>"https://www-fsc.onlinebanking.pnc.com/alservlet/OnlineBankingServlet"}]}, :txTimestamp=>1396017713, :createdAt=>1248376138, :typeName=>"webforms.WebForm"}
tobiasvl commented 6 years ago

Closed by #6 in ff437b0