SSL and external images

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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.
Solidjeuh
Registered User
Posts: 8
Joined: Sat Feb 25, 2017 6:42 pm

Re: SSL and external images

Post by Solidjeuh » Sat Feb 25, 2017 6:45 pm

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?

Solidjeuh
Registered User
Posts: 8
Joined: Sat Feb 25, 2017 6:42 pm

Re: SSL and external images

Post by Solidjeuh » Sun Feb 26, 2017 3:46 pm

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: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: SSL and external images

Post by DavidIQ » 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?
Image

Solidjeuh
Registered User
Posts: 8
Joined: Sat Feb 25, 2017 6:42 pm

Re: SSL and external images

Post by Solidjeuh » Mon Feb 27, 2017 10:21 pm

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: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: SSL and external images

Post by DavidIQ » 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.
Image

Solidjeuh
Registered User
Posts: 8
Joined: Sat Feb 25, 2017 6:42 pm

Re: SSL and external images

Post by Solidjeuh » Mon Feb 27, 2017 10:41 pm

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

Solidjeuh
Registered User
Posts: 8
Joined: Sat Feb 25, 2017 6:42 pm

Re: SSL and external images

Post by Solidjeuh » Mon Feb 27, 2017 11:09 pm

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