Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch download decryption failure raises "Cannot find file" error. Should raise decryption error. #6

Open
rgacote opened this issue Oct 2, 2019 · 1 comment

Comments

@rgacote
Copy link

rgacote commented Oct 2, 2019

batch.py

Line 266 catches a general Exception which hides any decryption error and turns it into a "Cannot find file" error.

Download and decryption errors should be caught and reported separately so calling code can make decisions whether the file was not there OR it could not be decrypted.

@rgacote
Copy link
Author

rgacote commented Nov 1, 2019

A further update to this as the problem is recurring.
Updated to 12.8.0 after seeing error and retested. Still seeing problem.

I have a batch file which I've confirmed is encrypted on the Worldpay SFTP server.
Using this module to download generates the following errors on the console and a 'File not Found' response:

gpg: invalid radix64 character 3E skipped
gpg: invalid radix64 character 3C skipped
....
gpg: block_filter 0xdfaf30: read error (size=13459,a->size=13459)
gpg: problem reading source (1282395 bytes remaining)
gpg: handle plaintext failed: No such file or directory
gpg: mdc_packet with invalid encoding
gpg: decryption failed: Invalid packet
gpg: block_filter: pending bytes!
Decrypting the file has failed!

This also results in a partially decrypted file being written to the /tmp/vantiv_sdk_batch_response directory.
The error is generated after multiple download attempts.

Manually downloading and GPG decrypting the file works properly -- no errors.
I'll try and dig down a little further into this now that I have a better handle on what is occurring.

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

No branches or pull requests

1 participant