SSL and external images

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Solidjeuh
Registered User
Posts: 45
Joined: Sat Feb 25, 2017 6:42 pm
Location: Aalst, Belgium
Contact:

Re: SSL and external images

Post by Solidjeuh »

I need some help with this please.
I installed that extension + Camo on my server.
But I see I need to add some things in lister.php

Tried some things, but SLL still breaks with external http images.
This is what I use:

Code: Select all

define('CAMO_KEY', 'here_my_key');
define('ASSETS_DOMAIN', 'core-server.be:8081');
define('SITE_DOMAIN', 'froddelpower.be');
Is this correct or not?

User avatar
Solidjeuh
Registered User
Posts: 45
Joined: Sat Feb 25, 2017 6:42 pm
Location: Aalst, Belgium
Contact:

Re: SSL and external images

Post by Solidjeuh »

Replaced

Code: Select all

if (preg_match_all('#<img[^/]* src="(http://[^"]+)"[^/]*>#', $object[$key], $matches))
with

Code: Select all

(preg_match_all('#src="(http://[^"]+)"#', $object[$key], $matches))
It works now!

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: SSL and external images

Post by DavidIQ »

That's kind of weird. Are your img tags being correctly rendered or are they getting modified before rendering?
Image

User avatar
Solidjeuh
Registered User
Posts: 45
Joined: Sat Feb 25, 2017 6:42 pm
Location: Aalst, Belgium
Contact:

Re: SSL and external images

Post by Solidjeuh »

DavidIQ wrote: Mon Feb 27, 2017 3:18 pm That's kind of weird. Are your img tags being correctly rendered or are they getting modified before rendering?
Not that I know. I updated today to phpBB 3.2, all standard files
And had the same problem. Changed that code again, and it worked..
And I don't think any of my extension are touching img tags.. except "Posting Buttons"

Code: Select all

24 hour activity stats
Add User
Advanced Active Topics
AJAX Registration check
Application Form
Autologin
Background Image in Text Area
Board3 Portal
Board Announcements
Board Rules
Contact Admin
Copyright in footer
Css magic
Download System
Error pages
External Links Open in New Window
Favicon Notifications
Genders
Information Site Extension
Insert Template Code
JV Add System Bot
JV Custom Language
JV Footer Chat
JV Points System
JV Random No Avatar
JV Shoutbox
Knowledge Base
Knuffel
Lightbox
Link menu
Logout Redirect
Member Profile Views
Member time counter
Newest members
News Scroll
No Notice Delete PM
Normal and Special Ranks
Notify Admin on Registration
OneAll Social Login 
Online Status
Pages
Paypal Donation
phpBB Arcade
phpBB Arcade - Board3 Portal Modules
phpBB Camo SSL Image Proxy Extension
phpBB Display Age Users
PhpBB Xmas
PM Name Suggestions
Poster IP in Viewtopic
Posting Buttons
Pretty Topic
Profilefield Image URL
Quick Login
Quick Style
Referrals
Responsive banners
s9e/mediaembed
Share On
Site logo (3.2)
smilies scroll box
Statistics on Index
Stop Forum Spam
Support Ticket 
System Info
Template Events
Topic Author
Topic Preview
Topic Solved
Unique Visits Counter
Upcoming Birthdays
VigLink
Was This Topic Useful?
Who Posted In This Topic
Who Visited This Topic
Youtube Board3
Youtube Videos Gallery

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: SSL and external images

Post by DavidIQ »

You would have to see what actually renders in your posts for img tags. I can't imagine why something would be changing your img tags but I imagine your code change is needed because the original matching of <img class="postimage" alt="image" src="image URL" />, which would be a standard default image, isn't matching what is being produced for posts on your forum.
Image

User avatar
Solidjeuh
Registered User
Posts: 45
Joined: Sat Feb 25, 2017 6:42 pm
Location: Aalst, Belgium
Contact:

Re: SSL and external images

Post by Solidjeuh »

DavidIQ wrote: Mon Feb 27, 2017 10:28 pm You would have to see what actually renders in your posts for img tags. I can't imagine why something would be changing your img tags but I imagine your code change is needed because the original matching of <img class="postimage" alt="image" src="image URL" />, which would be a standard default image, isn't matching what is being produced for posts on your forum.
It works, so no need to look into those things I guess..
There are no errors, and http images are successfully being replaced by the camo script.
As long as everything works I see no problem :D

User avatar
Solidjeuh
Registered User
Posts: 45
Joined: Sat Feb 25, 2017 6:42 pm
Location: Aalst, Belgium
Contact:

Re: SSL and external images

Post by Solidjeuh »

Just quick thinking, but maybe its this ext "s9e/mediaembed".
Don't want to try now, been working for a few hours on my forum today. I need rest :D

Post Reply