Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
IMG Cacher - SSL Keeper - Mixed Content Block Solution Details »
IMG Cacher - SSL Keeper - Mixed Content Block Solution
Mod Version: 2.2, by MegaManSec (Member) MegaManSec is offline
Developer Last Online: Dec 2016 I like it Show Printable Version Email this Page

vB Version: 4.1.x Rating: (10 votes - 5.00 average) Installs: 94
Released: 20 Sep 2012 Last Update: 30 Oct 2013 Downloads: 463
Not Supported Uses Plugins Template Edits Additional Files Re-usable Code Translations External Content  

Pretty much you use this when you want to keep the SSL certificete working on pages that people may use [IMG] tag's without https://.

When you use SSL on your forum, and somebody embeds an image from a non-ssl host, lots of browsers will give you a warning and say the website is unsafe ---this is a solution to that problem.

Specifically, Mozilla has a 'Mixed Content Blocker', which makes it so if you are on an https:// website, it won't load any content on the same domain, using http://.



NOTE: MAKE SURE THE .HTACCESS FILE IN cache-img/ IS WORKING!



Upload the files into your root directory, and that's it.

Then you need to create a plugin (admincp -> plugins & products -> add new plugin)
Hook location: bbcode_img_match
Title: SSL IMG Cacher
Execution order: 5
Plugin PHP Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Plugin is active: Yes


edit "[LINK_TO_YOUR_WEBSITE]" - Without http, example: www.dragonbyte-tech.com or www.internot.info etc. etc.

Then you are done.

It should be secure as the actual directory for the images is not available.(deny from all in htaccess)


I would also suggest adding this to robots.txt

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Also I suggest you add something like this to .htaccess:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

======
I only give support to people who have pressed 'installed' this.
======


Source&stuff can be found here: https://github.com/MegaManSec/IMG

For vB3.8 solution, go here: http://www.vbulletin.org/forum/showt...75#post2411575 (Thanks to Kh99)

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 19 Feb 2017, 22:21
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
This is my version of this plugin

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

it checks if image https => OK
if image http .. check for https version .. if the https version is OK => OK
if the https version not working .. use the script
__________________
Premium Vbulletin Modifications
Reply With Quote
  #47  
Old 23 Feb 2017, 17:16
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Great work bridge2heyday, do you maybe have better code for cache.php? I noticed that it slows down loading of pages and also that some images don't work with it, but work when I disable plugin (i.e. disable cache.php).

It would be great if there's faster and 100% compatible version of this mod. That all images on http that work (some don't work) can be transferred to https.
Reply With Quote
  #48  
Old 23 Feb 2017, 20:37
bridge2heyday's Avatar
bridge2heyday bridge2heyday is offline
 
Join Date: Aug 2014
Originally Posted by Alan_SP View Post
Great work bridge2heyday, do you maybe have better code for cache.php? I noticed that it slows down loading of pages and also that some images don't work with it, but work when I disable plugin (i.e. disable cache.php).

It would be great if there's faster and 100% compatible version of this mod. That all images on http that work (some don't work) can be transferred to https.
Thank you , I didn't look at cache.php file .. I just did this small modification for a client .. though , my code may be improved by checking if the file is previously cached or not before looking for validity of https image .. because connection overhead may slow down the site .
There may be alternative solution - I did for an other client - to add white-list for known image hosting websites which turned using SSL .. if the image is hosted on one of those sites .. the link will be changed to https .. if not , it will be displayed as plain text image URL
__________________
Premium Vbulletin Modifications
Reply With Quote
  #49  
Old 25 Feb 2017, 18:12
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
I checked, cache.php doesn't actually cache images in cache directory, it probably just create image there temporarily and delete it after it is sent to browser. At least I didn't found images in cache folder.

Anyway, it would be great if cache.php can work with all images, as some images don't work, not sure why. With your plugin modification and cache.php that work with all images (and hopefully faster), this would be great for making site completely https compatible.
Reply With Quote
  #50  
Old 26 Feb 2017, 22:06
Beor Beor is offline
 
Join Date: Dec 2007
Hello

This modification works for vb5?

Signatures of our forum not is on https

BR

Last edited by Beor; 26 Feb 2017 at 22:17.
Reply With Quote
  #51  
Old 11 Apr 2017, 22:24
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Thank you. I was having difficulty with the "mixed content" warning for one of my forums which exists as a subdomain.

I tried a competitive add-on which sadly did not work for me.

Your instructions for installing this add-on are a little ambiguous
  • files and folders to upload (cache-img and images folders, cache.html, cache.php) might be better packaged under the standard Upload folder
  • you need to add the instruction to change the properties of the cache-img folder to 777 after uploading
  • the instructions on replacing [LINK_TO_YOUR_WEBSITE] with the domain of the forum might explicitly state "including the square brackets"

but I am very happy to report that this completely resolved the mixed content issue for me.

Last edited by djbaxter; 11 Apr 2017 at 22:30.
Reply With Quote
  #52  
Old 07 Sep 2017, 17:38
weinstoc weinstoc is offline
 
Join Date: Apr 2007
Recache images

Hi,

I installed this and it looked like it was working fine...but I forgot that our forums are served out of three load balanced servers...so each had its own cache. I moved the location of cache-img to a shared device to solve this. What can I do to make the previously cached images show up properly? (There already so many cached files on each server that the mv * command gets an error.)
Reply With Quote
  #53  
Old 07 Sep 2017, 17:57
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
What do you mean by "What can I do to make the previously cached images show up properly?"?
Did you move all the images to the cache folder on the new server but it's not working? Are you sure the chown (group) and chmod permissions are properly setup?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #54  
Old 07 Sep 2017, 18:03
weinstoc weinstoc is offline
 
Join Date: Apr 2007
I am in the process of moving them now. When I could not get a simple mv * /shared_folder to work I was hoping things would be re-cached. But I am using tar to do the transfer now. Hopefully that will work.
Reply With Quote
  #55  
Old 07 Sep 2017, 18:21
weinstoc weinstoc is offline
 
Join Date: Apr 2007
Ok, everything has been moved...but this isn't showing up. It seems to be an aberration though as others are showing up fine.

https://forumserver.twoplustwo.com/s...&postcount=392
Reply With Quote
  #56  
Old 07 Sep 2017, 18:42
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
Does the file https%3A%2F%2Fimgur.com%2FMkp4JII.gif exist in the cache folder?
If it does exist, it might be a permission problem of the file or cache folder.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #57  
Old 13 Sep 2017, 02:36
Guinevere Guinevere is offline
 
Join Date: Aug 2015
Great mod and fixes the mixed content issue, thanks - unfortunately we run a pretty large forum and the saved images are adding about 300mb a day to our server... anyone know of an option that doesn't require the use of so much server space? That's going to be an extra GB every four days, so it's fine for a temporary solution but not in the long term.

edit: If anyone else has this issue, and wants an alternate solution I ended up adding a replacement variable in each skin which found instances of http: and changed them to https: , after giving the members warning that they would only be able to use image hosts that supported https from now on.

Last edited by Guinevere; 15 Sep 2017 at 07:47.
Reply With Quote
  #58  
Old 17 Sep 2017, 12:45
woodmj woodmj is offline
 
Join Date: Sep 2013
Brilliant mod! Goodbye mixed content issues.
Reply With Quote
  #59  
Old 16 Oct 2017, 22:57
Rob Graves Rob Graves is offline
 
Join Date: May 2011
Thanks man! You ever come to Negril, look me up! The first rounds are on me!
Reply With Quote
  #60  
Old 23 Oct 2017, 18:37
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
I've installed this but it has not resolved my mixed content flags at https://www.bgobsession.com

Yes - I've done the following:
1) All files uploaded to root directory
2) CHmodded the cache-img folder to 777
3) Created plug-in and added my website address to the [] field
4) Edited my robots.txt file and the .htaccess file as described

I've done a cache clear on vbulletin admincp, cleared my Sucuri firewall cache, and browser cache but still getting mixed content flagged.

Any ideas or suggestions would be greatly appreciated.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:31.

Layout Options | Width: Wide Color: