From: Tim Düsterhus Date: Mon, 22 Feb 2021 12:50:46 +0000 (+0100) Subject: Implement ISafeFormatAvatar in DefaultAvatar X-Git-Tag: 5.4.0_Alpha_1~238^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=947aeabe29f429b177606b78abbacf3eceddbb8e;p=GitHub%2FWoltLab%2FWCF.git Implement ISafeFormatAvatar in DefaultAvatar --- diff --git a/wcfsetup/install/files/images/avatars/avatar-default.png b/wcfsetup/install/files/images/avatars/avatar-default.png new file mode 100644 index 0000000000..2bd3f759c1 Binary files /dev/null and b/wcfsetup/install/files/images/avatars/avatar-default.png differ diff --git a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php index d69b8c9fd0..cc4beb05ca 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/DefaultAvatar.class.php @@ -13,7 +13,7 @@ use wcf\util\StringUtil; * @license GNU Lesser General Public License * @package WoltLabSuite\Core\Data\User\Avatar */ -class DefaultAvatar implements IUserAvatar +class DefaultAvatar implements IUserAvatar, ISafeFormatAvatar { /** * image size @@ -68,6 +68,22 @@ SVG; } } + /** + * @inheritDoc + */ + public function getSafeURL(?int $size = null): string + { + return WCF::getPath() . 'images/avatars/avatar-default.png'; + } + + /** + * @inheritDoc + */ + public function getSafeImageTag(?int $size = null): string + { + return ''; + } + /** * @inheritDoc */