Merge pull request #2574 from emericklaw/mobileconfig-specialcharacters

Handle mobileconfig display names with special characters
master
André Peters 2019-05-04 23:10:03 +02:00 committed by GitHub
commit 2d5e8a20ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ try {
$stmt = $pdo->prepare("SELECT `name` FROM `mailbox` WHERE `username`= :username"); $stmt = $pdo->prepare("SELECT `name` FROM `mailbox` WHERE `username`= :username");
$stmt->execute(array(':username' => $email)); $stmt->execute(array(':username' => $email));
$MailboxData = $stmt->fetch(PDO::FETCH_ASSOC); $MailboxData = $stmt->fetch(PDO::FETCH_ASSOC);
$displayname = empty($MailboxData['name']) ? $email : $MailboxData['name']; $displayname = htmlspecialchars(empty($MailboxData['name']) ? $email : $MailboxData['name'], ENT_NOQUOTES);
} }
catch(PDOException $e) { catch(PDOException $e) {
$displayname = $email; $displayname = $email;