From 472a99ff00da3e935564a4fb98ed3fc187c5421d Mon Sep 17 00:00:00 2001 From: emericklaw Date: Fri, 3 May 2019 13:31:10 +0100 Subject: [PATCH] Handle mobileconfig display names with special characters If the account display name contained special characters like & the mobileconfig would fail to import on the iOS device. --- data/web/mobileconfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/mobileconfig.php b/data/web/mobileconfig.php index ade4f6063..abdf2cb8a 100644 --- a/data/web/mobileconfig.php +++ b/data/web/mobileconfig.php @@ -22,7 +22,7 @@ try { $stmt = $pdo->prepare("SELECT `name` FROM `mailbox` WHERE `username`= :username"); $stmt->execute(array(':username' => $email)); $MailboxData = $stmt->fetch(PDO::FETCH_ASSOC); - $displayname = empty($MailboxData['name']) ? $email : $MailboxData['name']; + $displayname = htmlspecialchars(empty($MailboxData['name']) ? $email : $MailboxData['name']); } catch(PDOException $e) { $displayname = $email;