Sentora Support Forums

Full Version: Remove Gravatar or replace its URL with https:// (SSL issue)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all. This is my first post, I apologise in advance for any inappropriate move. 

I have SSL on my Sentora server. It all loads fine with https://... url pattern. But it gives me a message (or ruins the green SSL symbol to yellow) as the Gravatar image on the top right loads as an insecure/non-ssl image. 

So I am trying to get a fix either by completely removing the Gravatar image or if any kind friend has a suggestion to share that could properly deliver the Gravatar image with https://... - will be just great!

I should mention that it's a Zentora theme I am using.

I have looked into the core files but could not locate from where the Gravatar gets a call in the code.

Any help will be greatly appreciated. Thanks in advance.

[Image: VR5pHX7.jpg]

[Image: 1eLtuBs.jpg]

[Image: O0ymbxH.png]
Greetings,
Checking on both of my servers (using SSL) they have the correct HTTPS:// Gravatar URL and the Control Panel is 100% Green SSL.

Are you using CloudFlare SSL?
(09-04-2015, 07:55 PM)apinto Wrote: [ -> ]Greetings,
Checking on both of my servers (using SSL) they have the correct HTTPS:// Gravatar URL and the Control Panel is 100% Green SSL.

Are you using CloudFlare SSL?

Thank you for the reply.

Exactly, yes! CloudFlare flexible SSL. However the page rule (*domain.com/*) in CF dashboard should force https://...

But I am assuming as it pulls the file from external host so the rule becomes redundant. 

Is there any suggestions please that could solve the issue? Thank you.
I do not use CloudFlare SSL for my control panel, I use a regular certificate (you can get a free one at https://www.startssl.com/), however I do use CloudFlare Flexible SSL on some websites (that dynamically load content based on the protocol used (http or https)) and I do not have any issues.

Try not to use page rules, they are made for less tech savvy users and not ideal in my opinion, use htaccess to control the redirects and ensure your server knows it is delivering https content.

Other possibility is that the theme in question is the cause of the issue, but I do not think it is the case...
(09-04-2015, 11:51 PM)apinto Wrote: [ -> ]I do not use CloudFlare SSL for my control panel, I use a regular certificate (you can get a free one at https://www.startssl.com/), however I do use CloudFlare Flexible SSL on some websites (that dynamically load content based on the protocol used (http or https)) and I do not have any issues.

Try not to use page rules, they are made for less tech savvy users and not ideal in my opinion, use htaccess to control the redirects and ensure your server knows it is delivering https content.

Other possibility is that the theme in question is the cause of the issue, but I do not think it is the case...

hi apinto 

Thank you for the reply. In that case is there a way to avoid / remove loading the Gravatar? Or can I load it locally?

Your reply will be greatly appreciated.  Wink
Thank you for greatly appreciating my reply (sorry couldn't resist Tongue )

I've never tried to remove or edit the avatar. But I might try checking it.

Can you please switch the theme to the default sentora and see what happens?
To edit the Avatar you can look into
https://github.com/sentora/sentora-core/....class.php

Around line 57 and the function is on line 107.

Actually it checks for https like I thought:
PHP Code:
/**
     * Detects the correct protocol to use when building the Gravatar image URL, this prevents SSL errors if the panel is being hosted over SSL.
     * @return string The protocol prefix.
     */
    
private static function getCurrentProtocol()
    {
        if (!empty(
$_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
            return 
'https://';
        } else {
            return 
'http://';
        }
    } 
(09-05-2015, 03:29 AM)apinto Wrote: [ -> ]To edit the Avatar you can look into
https://github.com/sentora/sentora-core/....class.php

Around line 57 and the function is on line 107.

Actually it checks for https like I thought:
PHP Code:
   /**
     * Detects the correct protocol to use when building the Gravatar image URL, this prevents SSL errors if the panel is being hosted over SSL.
     * @return string The protocol prefix.
     */
 
   private static function getCurrentProtocol()
 
   {
 
       if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
 
           return 'https://';
 
       } else {
 
           return 'http://';
 
       }
 
   

I greatly appreciate your this reply too  Tongue But really, you are a great helpful person I must admit  Big Grin

I tried defaulting the theme, didn't really help as it also loads the gravatar in http protocol.

I will look into that core file you have suggested and will give a feedback here.

Thank you so much.
Edited to force https:// the gravatar, and it's all fixed!

} else {
return 'https://';


Great help! God bless! Thank you!