Skip to content

Commit ce846c8

Browse files
committed
Fix stored XSS in Calendar name (CVE-2023-24690)
Add strip_tags() sanitization when creating new calendars to prevent XSS payloads from being stored in the database. This is part of CVE-2023-24690 which covers multiple XSS vulnerabilities: - Calendar Name XSS (fixed here) - Group Name XSS (fixed in PR #7675) - Group Description XSS (fixed in PR #7675) Fixes #6444
1 parent eea41e5 commit ce846c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/routes/calendar/calendar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function NewCalendar(Request $request, Response $response, $args): Response
193193
{
194194
$input = $request->getParsedBody();
195195
$Calendar = new Calendar();
196-
$Calendar->setName($input['Name']);
196+
$Calendar->setName(strip_tags($input['Name']));
197197
$Calendar->setForegroundColor($input['ForegroundColor']);
198198
$Calendar->setBackgroundColor($input['BackgroundColor']);
199199
$Calendar->save();

0 commit comments

Comments
 (0)