Start looking for the ghost case of the empty signature

This commit is contained in:
ErickSkrauch 2021-08-16 15:16:46 +02:00
parent f69ebf8221
commit 5b8be60867
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -53,6 +53,24 @@ class Textures {
$profile['id'] = $uuid; $profile['id'] = $uuid;
} }
if ($signed) {
// This is a completely impossible case. But the most impossible things happen most of the time.
// We have received complaints that sometimes an empty value comes in the signature field.
// This code is an attempt at an investigation. If no such cases are reported for the foreseeable future,
// then this code can be removed
foreach ($profile['properties'] as &$property) {
if ($property['name'] === 'textures') {
if (!isset($property['signature'])) {
Yii::warning('Signature was required, but field was not returned from the skinsystem\'s server');
$property['signature'] = 'Cg==';
} elseif (empty($property['signature'])) {
Yii::warning('Signature was required, but contains an empty value from skinsystem\'s server');
$property['signature'] = 'Cg==';
}
}
}
}
return $profile; return $profile;
} }