6.0.0-git
2019-03-20

[#12615] Horde_Date: Limit recurrence interval to a sane value
Summary Horde_Date: Limit recurrence interval to a sane value
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 2013-08-25 (2033 days ago)
Due
Updated 2013-12-17 (1919 days ago)
Assigned 2013-09-02 (2025 days ago)
Resolved 2013-09-03 (2024 days ago)
Milestone
Patch No

History
2013-12-17 11:35:14 Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 21d63ac2bad450ec1c248ea8f4886bf418010d26
Author: Jan Schneider <jan@horde.org>
Date:   Tue Sep 3 17:49:34 2013 +0200

     [jan] Correct dates with very large days-of-month more 
efficiently (Bug #12615).

  framework/Date/lib/Horde/Date.php           |   11 +++++++++++
  framework/Date/package.xml                  |    2 ++
  framework/Date/test/Horde/Date/DateTest.php |    3 +++
  3 files changed, 16 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/21d63ac2bad450ec1c248ea8f4886bf418010d26
2013-09-03 15:50:55 Jan Schneider Deleted Original Message
 
2013-09-03 15:50:48 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Patch ⇒ No
 
2013-09-03 15:50:30 Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 51381ff61c45b500dd50add91317e543da2acaa0
Author: Jan Schneider <jan@horde.org>
Date:   Tue Sep 3 17:49:34 2013 +0200

     [jan] Correct dates with very large days-of-month more 
efficiently (Bug #12615).

  framework/Date/lib/Horde/Date.php           |   11 +++++++++++
  framework/Date/package.xml                  |    2 ++
  framework/Date/test/Horde/Date/DateTest.php |    3 +++
  3 files changed, 16 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/51381ff61c45b500dd50add91317e543da2acaa0
2013-09-02 23:08:08 Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
I'm not sure that silently (from the user's point of view) changing 
the interval to the arbitrarily chosen limit is the best way to go. 
The user will not know this has occured unless he examines the event 
after creating it.

Also, I'm not sure we want to enforce an arbitrary limit in the 
library itself. Next to impossible, but you never know, somebody may 
have a legitimate reason to use Horde_Date by itself to calculate this.

What about imposing the limit in the client code, and not allowing the 
event to be created if it exceeds some (configurable?) interval limit?
2013-08-25 12:34:29 Thomas Jarosch Summary ⇒ Horde_Date: Limit recurrence interval to a sane value
Patch ⇒ Yes
New Attachment: 0001-Limit-recurrence-interval-to-a-sane-value.patch
 
2013-08-25 12:30:03 Thomas Jarosch Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Horde_Date: Limit recurrence interval to sane values
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
Hi,

during productive testing I found one calendar kronolith was unable to load,
CPU and RAM usage grew quickly.

I've isolated the "offending" event and noticed a daily recurrence
with an insane recurrence interval was the root cause.

I'll attach a patch to limit the recurrence interval to sane values.
Without the patch I can easily generate recurrences
that consume 150mb memory and run for ages.

Note: Setting recurEnd() or recurCount() does not help,
therefore we have to limit the interval even if an recurEnd date is given.

Thomas

Saved Queries