6.0.0-beta1
8/13/25

[#13454] Timeout for external calendar only in Portal
Summary Timeout for external calendar only in Portal
Queue Kronolith
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester Jasper.Olbrich (at) students (dot) uni-marburg (dot) de
Created 08/19/2014 (4012 days ago)
Due
Updated 09/18/2014 (3982 days ago)
Assigned 08/20/2014 (4011 days ago)
Resolved 09/18/2014 (3982 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/18/2014 03:57:31 PM Jan Schneider State ⇒ Not A Bug
 
08/22/2014 10:07:20 AM Jan Schneider Comment #4 Reply to this comment
No, this is a bad idea, since this allows users to easily run a DoS 
attack against Kronolith.
08/21/2014 03:58:34 PM Jasper (dot) Olbrich (at) students (dot) uni-marburg (dot) de Comment #3
New Attachment: 0001-Include-timeout-for-HTTP-requests-in-preferences.patch Download
Reply to this comment
I see that it does make sense to use a shorter timeout for non-AJAX requests.
Would it be feasible to make the timeout configurable for the users 
via prefs like I did in the attached patch?


08/20/2014 11:31:09 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This is intentional, see 
https://github.com/horde/horde/commit/1d271b4c55ae04fee314c28a798b88ceb6572d1a
In portal and basic views, all events are retrieved at once. We cannot 
use a higher timeout there, otherwise the user may have to wait too 
long for the whole page to return. The timeout has been relaxed in 
Ajax view only because loading happens asynchronously there and the 
interface is still usable while the events load.
08/19/2014 01:39:55 PM Jasper (dot) Olbrich (at) students (dot) uni-marburg (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Timeout for external calendar only in Portal
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
When an external calendar takes between 5 and 15 seconds to respond, 
it will work in the dynamic kronolith view, but not on the Portal page 
if a calendar block is used

This is because in _getDriver() in 
kronolith/lib/Ajax/Application/Handler.php, we have

         if ($driver == 'remote') {
             $kronolith_driver->setParam('timeout', 15);
         }

But for the function listEvents() in kronolith/lib/Kronolith.php, we have
        $driver = self::getDriver('Ical', $url);
        $events = $driver->listEvents(...);

which uses the default (hard coded) timeout value of 5 seconds. This 
could be fixed by inserting $driver->setParam('timeout', 15); in the 
above snippet, or (better?) improve the method getDriver (which 
already includes a branch for $instance instanceof 
Kronolith_Driver_Ical).

Would it also be good to have those timeout values configurable?

Saved Queries