Skip Menu |

This queue is for tickets about the Filter CPAN distribution.

Report information
The Basics
Id: 110921
Status: patched
Priority: 0/
Queue: Filter

People
Owner: Nobody in particular
Requestors: Bob_Bachman [...] Intercept.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Perl Decrypt Filter
Date: Tue, 5 Jan 2016 12:42:51 -0500
To: <bug-Filter [...] rt.cpan.org>
From: "Robert S. Bachman" <Bob_Bachman [...] Intercept.com>
We use the PERL Decrypt filter decrypt.xs that we found on the CPAN website to encrypt and decrypt our perl modules. We recently upgraded to a widgets toolkit (wxWidgets 3.0.2) that uses unicode and now our filter doesn't work. Does anyone know if there is a problem with this filter when using a Unicode toolkit. Thanks for any help you can provide. I've attached the original decrypt filter we got from CPAN. Thanks, Bob Bachman

Message body is not shown because sender requested not to inline it.

On Tue Jan 05 12:41:22 2016, Bob_Bachman@Intercept.com wrote: Show quoted text
> We use the PERL Decrypt filter decrypt.xs that we found on the CPAN website > to encrypt and decrypt our perl modules. > > We recently upgraded to a widgets toolkit (wxWidgets 3.0.2) that uses > unicode and now our filter doesn't work. > > Does anyone know if there is a problem with this filter when using a Unicode > toolkit.
Probably. I'll look into it. use bytes before loading your encrypted module should help. Show quoted text
> I've attached the original decrypt filter we got from CPAN.
There's one added line at the end of decrypt.xs with Status. This seems to be wrong. -- Reini Urban
On Tue Jan 05 12:41:22 2016, Bob_Bachman@Intercept.com wrote: Show quoted text
> I've attached the original decrypt filter we got from CPAN.
There's nothing with the decrypt module per se, but the 2 sample scripts which do the actual encrypt/decryption were wrong. They were missing a binmode. See my fix at https://github.com/rurban/Filter/commit/fd618bdb39a23ec89f06bd3d91b8c010d77d97c8 -- Reini Urban
Subject: RE: [rt.cpan.org #110921] Perl Decrypt Filter
Date: Tue, 5 Jan 2016 14:31:13 -0500
To: <bug-Filter [...] rt.cpan.org>
From: "Robert S. Bachman" <Bob_Bachman [...] Intercept.com>
Thanks, We were already using binmode so I know that's not it. I've attached the actual files we're using. Bob Show quoted text
-----Original Message----- From: Reini Urban via RT [mailto:bug-Filter@rt.cpan.org] Sent: Tuesday, January 05, 2016 1:20 PM To: Bob_Bachman@Intercept.com Subject: [rt.cpan.org #110921] Perl Decrypt Filter <URL: https://rt.cpan.org/Ticket/Display.html?id=110921 > On Tue Jan 05 12:41:22 2016, Bob_Bachman@Intercept.com wrote:
> I've attached the original decrypt filter we got from CPAN.
There's nothing with the decrypt module per se, but the 2 sample scripts which do the actual encrypt/decryption were wrong. They were missing a binmode. See my fix at https://github.com/rurban/Filter/commit/fd618bdb39a23ec89f06bd3d91b8c010d77d97c8 -- Reini Urban

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: RE: [rt.cpan.org #110921] Perl Decrypt Filter
Date: Wed, 24 Feb 2016 10:09:57 -0500
To: <bug-Filter [...] rt.cpan.org>
From: "Robert S. Bachman" <Bob_Bachman [...] Intercept.com>
Hi, We're still having problems with the PERL decrypt Filter, version 1.55 using a unicode Toolkit. We are setting the input and output streams to binmode. Some XOR lines work and some don't. Here's an example: static unsigned XOR [BLOCKSIZE] = {'#', '%', '5', 'f', '5', '5', '5', '5', '5', '5', '5', 'i', 'j', 'o' } ; /* OK */ /* static unsigned XOR [BLOCKSIZE] = {'#', '%', 'd', 'f', '5', '5', '5', '5', '5', '5', '5', 'i', 'j', 'o' } ; */ /* BAD */ Do you have idea why this wouldn't work? Thanks, Bob Bachman Show quoted text
-----Original Message----- From: Reini Urban via RT [mailto:bug-Filter@rt.cpan.org] Sent: Tuesday, January 05, 2016 1:20 PM To: Bob_Bachman@Intercept.com Subject: [rt.cpan.org #110921] Perl Decrypt Filter <URL: https://rt.cpan.org/Ticket/Display.html?id=110921 > On Tue Jan 05 12:41:22 2016, Bob_Bachman@Intercept.com wrote:
> I've attached the original decrypt filter we got from CPAN.
There's nothing with the decrypt module per se, but the 2 sample scripts which do the actual encrypt/decryption were wrong. They were missing a binmode. See my fix at https://github.com/rurban/Filter/commit/fd618bdb39a23ec89f06bd3d91b8c010d77d97c8 -- Reini Urban
Subject: Re: [rt.cpan.org #110921] Perl Decrypt Filter
Date: Wed, 24 Feb 2016 18:01:27 +0100
To: bug-Filter [...] rt.cpan.org
From: Reini Urban <reini.urban [...] gmail.com>
Show quoted text
> On Feb 24, 2016, at 4:08 PM, Bob_Bachman@Intercept.com via RT <bug-Filter@rt.cpan.org> wrote: > > Queue: Filter > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=110921 > > > Hi, We're still having problems with the PERL decrypt Filter, version 1.55 using a unicode > Toolkit. We are setting the input and output streams to binmode. > > Some XOR lines work and some don't. Here's an example: > > static unsigned XOR [BLOCKSIZE] = {'#', '%', '5', 'f', '5', '5', '5', '5', '5', '5', '5', 'i', 'j', 'o' } ; /* OK */ > /* static unsigned XOR [BLOCKSIZE] = {'#', '%', 'd', 'f', '5', '5', '5', '5', '5', '5', '5', 'i', 'j', 'o' } ; */ /* BAD */ > > Do you have idea why this wouldn't work?
Good case. This looks like it’s being passed through printf, even if I cannot find any printf/sprintf in the Filter code per se. Very interesting!
On Wed Feb 24 10:08:25 2016, Bob_Bachman@Intercept.com wrote: Show quoted text
> Hi, We're still having problems with the PERL decrypt Filter, version > 1.55 using a unicode > Toolkit. We are setting the input and output streams to binmode. > > Some XOR lines work and some don't. Here's an example: > > static unsigned XOR [BLOCKSIZE] = {'#', '%', '5', 'f', '5', '5', '5', > '5', '5', '5', '5', 'i', 'j', 'o' } ; /* OK */ > /* static unsigned XOR [BLOCKSIZE] = {'#', '%', 'd', 'f', '5', '5', > '5', '5', '5', '5', '5', 'i', 'j', 'o' } ; */ /* BAD */ > > Do you have idea why this wouldn't work?
So I've uploaded now 1.56. Give it a try. Regarding the %d getting expanded by the filter: I've looked through the Filter XS code and the core FILTER code in toke.c Nothing seems to go through sprintf or printf. So it could be your external decrypter, which does this.