Gravatar connection timeout too long

Bug #1782062 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon

Bug Description

If you are using a site with gravatars enabled and they connection is not resolvable then on login the check is held open for 60 seconds until curl instance times out as per:

    curl_setopt($ch, CURLOPT_TIMEOUT, 60);

in mahara_http_request()

But the check goes thru is_valid_url() and this is because we don't want to fetch the result but check the url does exist/resolves

So we should pass a CURLOPT_CONNECTTIMEOUT value that is small so things timeout much quicker

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 18.10.0
status: New → In Progress
assignee: nobody → Robert Lyon (robertl-9)
importance: Undecided → High
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/9017

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9017
Committed: https://git.mahara.org/mahara/mahara/commit/38f762ffe4d5250c038c2644fe1c46694f7b1e7e
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 38f762ffe4d5250c038c2644fe1c46694f7b1e7e
Author: Robert Lyon <email address hidden>
Date: Tue Jul 17 16:38:12 2018 +1200

Bug 1782062: Make is_valid_url() timout faster if no connection

behatnotneeded

Change-Id: I2d8107d71f0bc08367081dc129d2bdb4ec31d68c
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.