WordPress.org

Forums

Hyper Cache
[resolved] HTTPS bug fix (6 posts)

  1. FolioVision
    Member
    Posted 2 years ago #

    Hello Stefano,

    I found a bug in Hyper Cache - it affects https enabled pages on a site. We have few of these and in the hyper_cache_invalidate_post() function, the protocol type is stripped incorreclty (just substr()), so we get a wrong md5.

    cache.php constructs the md5 differently.

    So the cached file is never cleared when the page is saved.

    As a quick fix, I changed hyper_cache_invalidate_post() to strip the protocol part of URI with a regex, rather than a set number of chars - https:// is longer than http://

    $link = substr($link, 7);

    was replaced with

    $link = preg_replace( '~^.*?://~', '', $link );

    Thanks,
    Martin

    http://wordpress.org/extend/plugins/hyper-cache/

  2. FolioVision
    Member
    Posted 2 years ago #

    Hello Stefano,

    also - could you please include this or similar fix for the issue in next version? We don't want to be fixing this by hand on each site.

    Thanks,
    Martin

  3. FolioVision
    Member
    Posted 2 years ago #

    Hello Stefano,

    thanks for including this fix!

    Thanks,
    Martin

  4. mbrsolution
    Member
    Posted 2 years ago #

    Hello FolioVision if the issue has been resolved would it be ok if you could close this thread as resolved.

    Kind regards

  5. FolioVision
    Member
    Posted 2 years ago #

    Hello mbrsolution,

    sure, I'm closing it now. I'm glad if we helped to improve the plugin.

    Thanks,
    Martin

  6. mbrsolution
    Member
    Posted 2 years ago #

    Hello FolioVision,

    It is a pleasure to have someone like yourself helping out and improving the plugin.

    We all appreciate it very much.

    Kind regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Hyper Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags