forked from sabre-io/vobject
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Calendar][CALBE-2290][Feat] added whitelist for illegal values in pa…
…rameter
- Loading branch information
Christopher Szu
authored and
Christopher Szu
committed
Jun 16, 2023
1 parent
d7c313f
commit 893626e
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Sabre\VObject; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class InvalidValueParamTest extends TestCase | ||
{ | ||
public function testWorkaround() | ||
{ | ||
$event = <<<ICS | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
DTEND;TZID=Europe/Paris:20170530T220000 | ||
DTSTAMP:20230317T130521Z | ||
DTSTART;TZID=Europe/Paris:20170530T200000 | ||
LAST-MODIFIED:20230316T155811Z | ||
LOCATION;VALUE=ERROR:ERROR | ||
SEQUENCE:0 | ||
STATUS:CONFIRMED | ||
SUMMARY:AG MP3 | ||
UID:0171706E-00F4-4846-8B5F-7FBD474A90AC | ||
END:VEVENT | ||
END:VCALENDAR | ||
ICS; | ||
|
||
$doc = Reader::read($event); | ||
$this->assertEquals("LOCATION:ERROR\r\n", $doc->VEVENT->LOCATION->serialize()); | ||
} | ||
} |