Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/Service/ProvisioningService.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,13 @@ private function setUserAvatar(string $userId, string $avatarAttribute): void {
$this->logger->warning('Failed to decode base64 JPEG avatar for user ' . $userId, ['avatar_attribute' => $avatarAttribute]);
return;
}
} else {
// fallback if it's not a URL and does not have a base64 data prefix: try to decode it as base64
$avatarContent = base64_decode($avatarAttribute);
if ($avatarContent === false) {
$this->logger->warning('Failed to decode base64 unprefixed avatar for user ' . $userId, ['avatar_attribute' => $avatarAttribute]);
return;
}
}

if ($avatarContent === null || $avatarContent === '') {
Expand Down
Loading