1pass icon indicating copy to clipboard operation
1pass copied to clipboard

Remove Unicode null before passing the file content to json.Unmarshal.

Open gaku opened this issue 10 years ago • 5 comments

Hi Robert, (Retrying after a clean up)

Thank you for sharing a nice 1pass project in golang. I've looked at a few 1password compatible implementations and I liked this one a lot.

I found an issue when I opened my 1password data and I've created a patch. It'd be great if it is merged.

The problem was that many of my 1password entires failed to be decrypted. It turned out that these entries contains \u0000 in the JSON strings.

My patch filters this string. I could eliminate errors for my 1password data files.

Thanks, -Gaku

gaku avatar Jan 11 '16 09:01 gaku

Hi @gaku - Thanks for investigating this. I'm happy to accept patches for this repository but most of the work has been moved to https://github.com/robertknight/passcards , which is a combined CLI/web app/browser extension for 1Password. If you're primarily looking for an open source tool to work with 1Password databases, rather than one which is specifically implemented in Go, I'd suggest looking at that.

robertknight avatar Jan 11 '16 10:01 robertknight

Hi Robert,

Ah, I didn't know that you are also the author of Passcards. I liked it too!

I am a go programmer and I like continue hacking your 1pass golang implementation, so it would be nice if you can merge the change!

Thanks, -Gaku

gaku avatar Jan 11 '16 22:01 gaku

Unfortunately the tests are currently failing. See https://travis-ci.org/robertknight/1pass/builds/101538086

robertknight avatar Jan 11 '16 22:01 robertknight

I've just looked at the Travis error and it looks like it is happening without the change.

I've checked out the master (without this pull request) and ran python client_test.py and got the same errors.

The issue seems like 1pass is asking for Master password when the test is adding a login item even though it is issued 1pass list command which supposed to unlock the vault.

Running ./1pass -low-security -vault /tmp/1pass-test-18784.agilekeychain new
Creating new vault in /tmp/1pass-test-18784.agilekeychain
Enter master password: test-pwd

Re-enter master password: test-pwd
Running ./1pass -low-security -vault /tmp/1pass-test-18784.agilekeychain list
Master password: test-pwd

Running ./1pass -low-security -vault /tmp/1pass-test-18784.agilekeychain add login mysite
Master password:  <=== This shouldn't happen.

I hope this has sufficient info to reproduce on your end.

gaku avatar Jan 18 '16 07:01 gaku

Thanks for taking a look @gaku . If it is a problem on the master branch then I'd really like to get that fixed first before merging any new changes. I will try to have a look at that later on in the week but you might get a chance before I do.

robertknight avatar Jan 18 '16 13:01 robertknight