Closed ottoszika closed 3 years ago
Hello,
I found an issue in OpenPGP_Packet::read_byte method. This can lead to invalid issuer key in signatures.
OpenPGP_Packet::read_byte
0x30
0x00
30
00
This behaviour is because the 0x30 is (string) "0"which is evaluated as false in PHP when no strict checking is performed in read_byte method.
(string) "0"
false
read_byte
Keys are not affected by this bug.
My solution is to check if the byte obtained is NULL or not.
NULL
C25059FA8730BC38
3047D4A7B15467AB
6B799484725130FE
BD7BA7BC5547FD09
Regards, Otto
Merged as 871d38da8b1859db364056d451deec921c59b22e
Hello,
I found an issue in
OpenPGP_Packet::read_byte
method. This can lead to invalid issuer key in signatures.0x30
it's replaced by0x00
. For example:30
BC3800
BC3830
FE00
FEThis behaviour is because the
0x30
is(string) "0"
which is evaluated asfalse
in PHP when no strict checking is performed inread_byte
method.Keys are not affected by this bug.
My solution is to check if the byte obtained is
NULL
or not.C25059FA8730BC38
3047D4A7B15467AB
6B799484725130FE
BD7BA7BC5547FD09
BD7BA7BC5547FD09
Regards, Otto