Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16779

Trackable URLs in CiviMail with Memcache might have unpredictably http or https

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.9
    • Fix Version/s: 4.7
    • Component/s: CiviMail, Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      When sending mailings with CiviMail in a site, where both accesses: http and https are allowed, when CiviCRM is configured to use Memcache, then some emails might have https in trackable URLs and sometimes http. This behavior is random.

      Analysis:

      CRM_Core_Config is as whole stored in Memcache. It includes also variable 'userFrameworkResourceURL', which is used by CiviMail to create trackable URLs. Even though when Config object is read, userFrameworkBaseURL is recreated, so correct http or https protocol is used based on the request, userFrameworkResourceURL is not. This can lead that even though the page was called using http, it may still hold here URL with https.

      Moreover, CiviMail sends emais via cron.php, which is in most sites executed from cron via wget using http. If the mailing is big, lots of cron.php invocations are needed to send all bulks. When in the meantime users use CiviCRM and sometimes use http and sometimes https - and reset caches, one invocation of cron.php can have different http/https as other one, which leads to changing http/https in trackable URLs.

      This is specially inconvenient, if the https version uses self-signed certificate (if intended only for internal use). Recipients get then warnings for such links and some mailservers can this see as reason for SPAM.

      Solution:

      This issue is related to CRM-10250. I have added a patch, which patches CRM_Core_Config already patched with patch from CRM-10250.
      This patch reinitializes userFrameworkResourceURL, too.

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              dexter dexter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: