kopia lustrzana https://github.com/friendica/friendica
Fix critical bug in Crypto::unencapsulate
- The direction of the sub-function has been correctedpull/8879/head
rodzic
acb9e8d356
commit
291f11a8bb
|
@ -461,11 +461,12 @@ class Crypto
|
|||
return;
|
||||
}
|
||||
|
||||
$alg = ((array_key_exists('alg', $data)) ? $data['alg'] : 'aes256cbc');
|
||||
$alg = $data['alg'] ?? 'aes256cbc';
|
||||
if ($alg === 'aes256cbc') {
|
||||
return self::encapsulateAes($data['data'], $prvkey);
|
||||
return self::unencapsulateAes($data['data'], $prvkey);
|
||||
}
|
||||
return self::encapsulateOther($data['data'], $prvkey, $alg);
|
||||
|
||||
return self::unencapsulateOther($data, $prvkey, $alg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Ładowanie…
Reference in New Issue