فهرست منبع

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.
emericklaw 6 سال پیش
والد
کامیت
472a99ff00
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      data/web/mobileconfig.php

+ 1 - 1
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;