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

EKS and MQ query warning message: Use of uninitialized value in subroutine entry at Net/Amazon/Signature/V4.pm line 106 #325

Closed
beginga opened this issue Apr 19, 2019 · 7 comments

Comments

Projects
None yet
2 participants
@beginga
Copy link

commented Apr 19, 2019

Hello,

API query again MQ and EKS is working fine, except that I get this error message (the standard output is correct):

my $mq = Paws->service('MQ', region => $region) ;
my $result = $mq->ListBrokers ;
Use of uninitialized value in subroutine entry at /usr/local/share/perl5/Net/Amazon/Signature/V4.pm line 106.

my $eks = Paws->service('EKS', region => $region );
my $result = $eks->ListClusters ;
Use of uninitialized value in subroutine entry at /usr/local/share/perl5/Net/Amazon/Signature/V4.pm line 106.

Regards,

Gautier

@pplu

This comment has been minimized.

Copy link
Owner

commented Apr 26, 2019

Hi,
I suppose this has started happening once you have applied the patch to not send {} as the HTTP body, ¿right?

@beginga

This comment has been minimized.

Copy link
Author

commented Apr 26, 2019

Yes, you get it

@beginga

This comment has been minimized.

Copy link
Author

commented May 23, 2019

Hello,

I use the last version of the library and the error message is still present.

Regards

@pplu

This comment has been minimized.

Copy link
Owner

commented May 23, 2019

The warning should be solved when 0.41 is released

@pplu pplu changed the title EKS and MQ query error message EKS and MQ query warning message: Use of uninitialized value in subroutine entry at Net/Amazon/Signature/V4.pm line 106 Jul 10, 2019

@pplu

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2019

The Signature::V4 module doesn't like Paws passing undef as the HTTP content. It signs correctly, but perl spits out a warning about passing it undef.

Since the sha256 for undef and for '' is the same, we'll guarantee that the signer doesn't recieve undef
This script demonstrates this logic:

use strict;
use warnings;

use v5.10;
use Digest::SHA qw/sha256_hex/;
say sha256_hex('');
say sha256_hex(undef);

Output

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Use of uninitialized value in subroutine entry at test line 8.
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@pplu

This comment has been minimized.

Copy link
Owner

commented Jul 11, 2019

0.41 Just hit the CPAN with a fix for this issue. Thanks for your contribution.

@pplu pplu closed this Jul 11, 2019

@beginga

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

Many thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.