From 621a83b075404f408dd025dfdc2cc55a43466536 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 2 Feb 2021 11:28:22 +0100 Subject: [PATCH] Long file name caused SQL error --- .../files/lib/data/user/avatar/UserAvatarAction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php b/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php index e63fac3b3b..9097c1a9c3 100644 --- a/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php +++ b/wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php @@ -160,7 +160,7 @@ class UserAvatarAction extends AbstractDatabaseObjectAction { } $data = [ - 'avatarName' => $tmp['basename'], + 'avatarName' => mb_substr($tmp['basename'], 0, 255), 'avatarExtension' => $tmp['extension'], 'width' => $imageData[0], 'height' => $imageData[1], -- 2.20.1