![]() |
IMG Cacher - SSL Keeper - Mixed Content Block Solution
1 Attachment(s)
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: Code:
$link_parsed = parse_url($link); 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 Code:
User-agent: * Code:
<FilesMatch "cache\.php$"> 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: https://vborg.vbsupport.ru/showthrea...75#post2411575 (Thanks to Kh99) |
Quote:
Is there a similar solution to loads adsense in SSL forum without any warning? |
Quote:
This is mine: Code:
<script type="text/javascript"><!-- Code:
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> |
The embedded image appears in the cache_img directory but it doesn't appear in the posted thread. How to make it appear there?
|
Quote:
Code:
Then you need to create a plugin (admincp -> plugins & products -> add new plugin) |
Quote:
|
Quote:
|
Please re-download the modification. I forgot to update a part of the code for it to actually work.
Once you've re-downloaded it, it will work. |
Ok, thanks!
Edited: It's working now, thanks again :up: ! |
Great work
product has been added successfully Thank you |
This is AWESOME! :)
|
Here is a version that just displays the image, and doesn't save it, to save server space :)
PHP Code:
|
|
Hiya, I installed the MOD. It's not working for me at the moment, the images are not saving in the cache directory do I need to CHMOD the folders to anything different from 755?
Regards Steve |
I made a silly error with the uploading the whole folder instead of the contents of the folder. Now working very well cheers.
Quote:
|
I'm bumping this topic, as Mozilla is now blocking all webpages that isn't pure HTTPS. ( https://developer.mozilla.org/en-US/...ked_by_default )
|
Quote:
It will not block "display content" like images, videos or audio. |
Quote:
|
I can't find the hook location "bbcode_img_match", its not listed in the Hook Locations. My vB version is 4.1.4.
However, when I open "class_bbcode.php" in Notepad++, I see this: Code:
Edit: I got it working by using this method: https://vborg.vbsupport.ru/showthrea...75#post2411575 (Thanks to Kh99), and I am on 4.1.4, it works great. *INSTALLED |
Has anyone worked out how to expand this mod to cover custom bbcode which embeds images?
|
Quote:
|
Looks great, but what's the difference to this mod?
https://vborg.vbsupport.ru/showthread.php?t=253309 Will there be a conflict when I use the Import External Images mod and yours at the same time? |
I see you are using getimagesize to verify mime type, that's great.
Are there any other security considerations when using this? |
Great mod. How would I alter the mod, to have a specific image from a website that does not support https to my site, so that I do not get mixed content? Does this mod handle ALL instances of images, including images in widgets, or just for posts? Thanks.
|
this is useful
|
Works perfect - just...I needed to set CHMOD to 777 for the cache_img folder. (755 when uploaded)
|
Is there a way to get this mod to ignore caching a forums own urls and to only cache external images?
|
Quote:
|
:confused:.
The cache is filled with forum album/gallery sourced images from older thread/posts where the bbcode is posted sans https, it also 404s them. .htaccess issue maybe? |
Sorted out the url problem. (SQL search and replace).
But, found a new issue. Whenever a poster edits a post in WYSIWYG mode all the image urls are saved with the cacher paths rather than the original image urls. ? |
Quote:
|
Quote:
|
Hi, any ideas?
Facebook images are not working https://www.turiver.com/foros/cache....Boe%3D58E2D4A8 |
I've made a little change, to avoid caching SSLs images.
---- $link_parsed = parse_url($link); if ($link_parsed['scheme'] != 'https') { $link = $this->registry->options['bburl'] . '/cache.php?img=' . urlencode($link); $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : ''); } ---- |
Quote:
|
Uninstalled, it has effect in domain upload center... [IMG] images with the forum domain. It would be nice if it had an option of whitelist.
Any way thanks |
Quote:
|
For the "[LINK_TO_YOUR_WEBSITE]" part, does it matter if I put www.terraforums.com or www.terraforums.com/forums ? I didn't do the suggested edits to .htaccess or .robots yet since my testing is showing that images are being removed (which shows the page secured) but not replaced by images saved to my server.
Thanks, Andrew |
Quote:
|
Thanks Dave! Any idea why I'm just getting all the images removed? The page is secure after, but no images so that doesn't help much. :p
|
All times are GMT. The time now is 10:30 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|