Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18779302
D16748.id40338.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
973 B
Referenced Files
None
Subscribers
None
D16748.id40338.diff
View Options
diff --git a/src/parser/calendar/data/PhutilCalendarRecurrenceRule.php b/src/parser/calendar/data/PhutilCalendarRecurrenceRule.php
--- a/src/parser/calendar/data/PhutilCalendarRecurrenceRule.php
+++ b/src/parser/calendar/data/PhutilCalendarRecurrenceRule.php
@@ -267,7 +267,26 @@
'BYSETPOS',
));
+ $int_values = array_fuse(
+ array(
+ 'COUNT',
+ 'INTERVAL',
+ ));
+
foreach ($dict as $key => $value) {
+ if (isset($int_values[$key])) {
+ // None of these values may be negative.
+ if (!preg_match('/^\d+\z/', $value)) {
+ throw new Exception(
+ pht(
+ 'Unexpected value "%s" in "%s" RULE property: expected an '.
+ 'integer.',
+ $value,
+ $key));
+ }
+ $dict[$key] = (int)$value;
+ }
+
if (isset($int_lists[$key])) {
foreach ($value as $k => $v) {
if (!preg_match('/^-?\d+\z/', $v)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 12 2025, 1:19 PM (26 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8286417
Default Alt Text
D16748.id40338.diff (973 B)
Attached To
Mode
D16748: Fix import casts for RRULE "INTERVAL" and "COUNT" properties
Attached
Detach File
Event Timeline
Log In to Comment