change header fauxapi pfsense

This commit is contained in:
garnier-quentin 2020-05-28 09:28:22 +02:00
parent 630fe11185
commit f7594031df

View File

@ -129,7 +129,7 @@ sub build_fauxapi_header {
my $timestamp = POSIX::strftime('%Y%m%dZ%H%M%S', gmtime()); my $timestamp = POSIX::strftime('%Y%m%dZ%H%M%S', gmtime());
my $nonce = sprintf('%08X', rand(0xFFFFFFFF)); my $nonce = sprintf('%08X', rand(0xFFFFFFFF));
my $hash = Digest::SHA::sha256_hex($self->{api_key} . $timestamp . $nonce); my $hash = Digest::SHA::sha256_hex($self->{api_secret} . $timestamp . $nonce);
return sprintf( return sprintf(
'%s:%s:%s:%s', '%s:%s:%s:%s',
$self->{api_key}, $self->{api_key},