Skip to content

fix "Error: Extra data:" error#5

Open
justone wants to merge 1 commit into
georgebrock:masterfrom
justone:fix_extra_data_error
Open

fix "Error: Extra data:" error#5
justone wants to merge 1 commit into
georgebrock:masterfrom
justone:fix_extra_data_error

Conversation

@justone

@justone justone commented Dec 12, 2013

Copy link
Copy Markdown

When using 1Password 4, it seems that I get this error on some entries:

1pass: Error: Extra data: line 1 column 800 - line 1 column 816 (char 800 - 816)

I tracked it down to there be extra non-printing characters at the end of the decrypted json data. This change fixed it for me.

@georgebrock

Copy link
Copy Markdown
Owner

Thanks for the pull request. Is there any chance you could duplicate this problem in the test suite? There's a test vault you could add a similar kind of password to. It seems like this is probably an encryption padding bug, so just removing a single specific unprintable character won't necessarily fix all cases.

@justone

justone commented Dec 14, 2013

Copy link
Copy Markdown
Author

Sure thing. I'll add some test data next week.

jorgenpt added a commit to jorgenpt/1pass that referenced this pull request May 5, 2015
When plaintext is already aligned to a 16 byte boundary, 1Password
appends a full block of "0x10." There's an off by one error, where we do
not handle that case.

This should be a correct fix for georgebrock#5.
@fabianmenges

Copy link
Copy Markdown

I can confirm this issue and its still present after Jorgents fix, however I would use "strip" instead of "replace".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants