[ABD] Camo SSL Image Proxy

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Tue Dec 06, 2016 12:19 pm

I've checked everything ten times or so, but all settings are okay.

It's that the extension does nothing. No URL's are changed at all.

If it works on a vanilla phpBB 3.2 install it should work on my board too. It's just that I use nginx+apache as a configuration and thought it might have something to do with this.

I'll keep looking, maybe try another server. I'll let you know if I find the problem (and if it's related to your extension).

Edit: It also doesn't work on a fresh phpBB 3.2.0-RC2 install on my own PC (wamp). It's not my proxyaddress, because when i manually add it to the URL of an image and use img tags, the image shows via cloudinary.

So posting [ img] http://s21.postimg.org/g21720t9j/image.jpg [ /img] => shows the insecure image (URL not changed)

Posting [ img] https://res.cloudinary.com/XXX/image/fe ... /image.jpg [ /img] => shows the secure image via cloudinary

So manually adding the proxyaddress works. Is it possible that your extension just isnt compatible with 3.2-RC2?

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Tue Dec 06, 2016 6:23 pm

Cin- wrote:I've checked everything ten times or so, but all settings are okay.

It's that the extension does nothing. No URL's are changed at all.
Sorry, but I have to ask if you have set the mode of the extension to "enabled" in the ACP configuration page.
Cin- wrote: If it works on a vanilla phpBB 3.2 install it should work on my board too. It's just that I use nginx+apache as a configuration and thought it might have something to do with this.

I'll keep looking, maybe try another server. I'll let you know if I find the problem (and if it's related to your extension).

Edit: It also doesn't work on a fresh phpBB 3.2.0-RC2 install on my own PC (wamp). It's not my proxyaddress, because when i manually add it to the URL of an image and use img tags, the image shows via cloudinary.

So posting [ img] http://s21.postimg.org/g21720t9j/image.jpg [ /img] => shows the insecure image (URL not changed)

Posting [ img] https://res.cloudinary.com/XXX/image/fe ... /image.jpg [ /img] => shows the secure image via cloudinary

So manually adding the proxyaddress works. Is it possible that your extension just isnt compatible with 3.2-RC2?
It does work on vanilla 3.2.0-RC1.

You could (as a test) try installing the original v1.0.1 phpbb team version, to see if that does something (even if you don't mod the code for your configuration, it should at least be rewriting the links).

If that (by some chance) works, then I think I know where the problem is.

I will set up an RC2 forum to check, but probably not for a few days.
Last edited by v12mike on Tue Dec 06, 2016 7:36 pm, edited 1 time in total.

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Tue Dec 06, 2016 6:56 pm

Can you post here the actual html image link that is being generated by your forum for an image?

Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Tue Dec 06, 2016 10:32 pm

Okay, now it works for avatars (I have the last post avatar extension installed) and those URLs are being rewritten (3.2-RC2). I never looked at the avatars because I don't enable external linking so all avatars are uploaded anyway. Both modes (camo + simple) work.

The images in my posts aren't rewritten though. I thought the locations you included should make that happen, no?

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Tue Dec 06, 2016 10:59 pm

Cin- wrote:Okay, now it works for avatars (I have the last post avatar extension installed) and those URLs are being rewritten (3.2-RC2). I never looked at the avatars because I don't enable external linking so all avatars are uploaded anyway. Both modes (camo + simple) work.

The images in my posts aren't rewritten though. I thought the locations you included should make that happen, no?
OK, if the avatars are being re-written, then the extension is basically configured and working, but something might have changed in RC2 to break compatibility. Can you examine the output html code and post an example of an image tag that should be rewritten but isn't? (in case the html has changed).

Did you try the 'training mode', in case the template variable name has changed?

Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Tue Dec 06, 2016 11:11 pm

Edit:

I looked into the template locations and now I'm starting to think I misunderstood what this extension does. I thought it would rewrite the URLs of images when people post these on my forum. Because I recently switched to SSL-only and get the mixed secure/not-secure warning in chrome when viewing posts that contain images from an http site.

I thought the location postrow - message would identify unsecure URLs present in posts, but now I'm starting to think i'm wrong?

//Original message:

I tried the training mode, it doesn't appear to do anything.

This is the HTML output:

Code: Select all

<div id="post_content593450">
	<h3 ><a href="#p593450">Fotografie...</a></h3>
		<p class="author">
			<a class="unread" href="./viewtopic.php?p=593450#p593450" title="Bericht">
				<i class="icon fa-envelope fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Bericht</span>
			</a>
			<span class="responsive-hide">door <strong><a href="./memberlist.php?mode=viewprofile&u=2" style="color: #0099CC;" class="username-coloured">Cin</a></strong> &raquo; </span>54 minuten geleden 
		</p>
		
	<div class="content"><img src="http://i997.photobucket.com/albums/af93/tcfcfphotos/be1d7160.jpg" class="postimage" alt="Afbeelding"></div>
	
</div>

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Wed Dec 07, 2016 12:57 am

I can't see anything changed in the html, so no clue at present. I will see if I can get a -RC2 board running to test.

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Wed Dec 07, 2016 2:39 am

Cin- wrote:Edit:

I looked into the template locations and now I'm starting to think I misunderstood what this extension does. I thought it would rewrite the URLs of images when people post these on my forum. Because I recently switched to SSL-only and get the mixed secure/not-secure warning in chrome when viewing posts that contain images from an http site.

I thought the location postrow - message would identify unsecure URLs present in posts, but now I'm starting to think i'm wrong?

//Original message:

I tried the training mode, it doesn't appear to do anything.
I think that what you want is what the extension does.

Try deleting all of the directly mapped domains (in case you configured any with wrong syntax).
If avatar urls are being correctly rewritten, try using one of those urls as an image link in a post.

Do you have a phpBB 3.1 forum you can test the extension on, to see if it behaves any differently?

Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Wed Dec 07, 2016 8:01 am

Thanks, no hurry though :)

I just tested a 3.1 board on my pc (wamp) and it works as it should. When I disable the location "postrow - message" on the 3.1 board, it indeed removes the proxy from the tagged URLs inside a post.

On my 3.2-RC2 server deleting all of the directly mapped domains or posting an avatar url doesn't help (avatars are rewritten but images inside posts not).

When I do a clean install of 3.2 RC1 or RC2 on my local pc (wamp) the extension doesn't work either. When I install 3.1 (extension works), then upgrade to 3.2 (RC 1 or 2) the extension doesn't work anymore (avatars are rewritten but images inside posts not).
Last edited by Cin- on Wed Dec 07, 2016 3:00 pm, edited 9 times in total.

kaspir
Registered User
Posts: 203
Joined: Sun Jul 27, 2008 5:05 am
Name: Greg
Contact:

Re: [BETA] Camo SSL Image Proxy

Post by kaspir » Wed Dec 07, 2016 11:18 am

Anyone know how to add the template for 'phpbb pages' ext?
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads. :P

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Wed Dec 07, 2016 6:11 pm

Cin- wrote:Thanks, no hurry though :)

I just tested a 3.1 board on my pc (wamp) and it works as it should. When I disable the location "postrow - message" on the 3.1 board, it indeed removes the proxy from the tagged URLs inside a post.

On my 3.2-RC2 server deleting all of the directly mapped domains or posting an avatar url doesn't help (avatars are rewritten but images inside posts not).

When I do a clean install of 3.2 RC1 or RC2 on my local pc (wamp) the extension doesn't work either. When I install 3.1 (extension works), then upgrade to 3.2 (RC 1 or 2) the extension doesn't work anymore (avatars are rewritten but images inside posts not).
Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?
[edit] I have reproduced the problem on 3.2.0, I have found a change in the format of img tags in 3.2.0 which is upsetting this extension. I have raised a bug report against phpbb for this, if it turns out to be intentional, I will patch the extension to handle it.[/edit]
kaspir wrote:Anyone know how to add the template for 'phpbb pages' ext?
Have you tried using the training mode? it should find it for you.

Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Thu Dec 08, 2016 9:24 am

v12mike wrote: Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?
[edit] I have reproduced the problem on 3.2.0, I have found a change in the format of img tags in 3.2.0 which is upsetting this extension. I have raised a bug report against phpbb for this, if it turns out to be intentional, I will patch the extension to handle it.[/edit]
I think you misunderstood me: the board doesn't behave differently between a fresh install or upgrade of 3.2, the extension behaves the same: avatar URLs (with last post avatar ext) are rewritten, but image URLs inside posts are not rewritten whereas in 3.1 everything works.

But I see you found the problem so great! Thanks for your work!

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Thu Dec 08, 2016 5:55 pm

Cin- wrote:
v12mike wrote: Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?
[edit] I have reproduced the problem on 3.2.0, I have found a change in the format of img tags in 3.2.0 which is upsetting this extension. I have raised a bug report against phpbb for this, if it turns out to be intentional, I will patch the extension to handle it.[/edit]
I think you misunderstood me: the board doesn't behave differently between a fresh install or upgrade of 3.2, the extension behaves the same: avatar URLs (with last post avatar ext) are rewritten, but image URLs inside posts are not rewritten whereas in 3.1 everything works.

But I see you found the problem so great! Thanks for your work!
To clarify what I found: The difference in behaviour is that when an image link is encountered in a post, the [img]...[/img] BBCode is converted into an html <img ...> tag. In 3.2.0, the html tag is missing a / character that was present in 3.1.x. I think that this is probably a bug, as it is still present in other img tags generated by 3.2.0.

Cin-
Registered User
Posts: 55
Joined: Fri Feb 06, 2015 2:06 pm

Re: [BETA] Camo SSL Image Proxy

Post by Cin- » Fri Dec 09, 2016 2:00 pm

I tried the fix proposed by JoshyPHP on tracker.phpbb.com and it works.

However, I have one gif that is being rewritten but google/firefox console still tag it as an insecure link (very weird because in the source code it shows as https)

Code: Select all

http://img12.deviantart.net/f11c/i/2012/253/9/2/smb3dx_grass_land__mockup__by_dogmansp-d5ea0zf.gif
I thought you might use Joshy's fix, and since I lack the knowledge to see what exactly is wrong with this URL I thought I post it for you to find out :)

v12mike
Registered User
Posts: 373
Joined: Thu Jul 09, 2015 5:03 pm

Re: [BETA] Camo SSL Image Proxy

Post by v12mike » Fri Dec 09, 2016 6:38 pm

Cin- wrote:I tried the fix proposed by JoshyPHP on tracker.phpbb.com and it works.

However, I have one gif that is being rewritten but google/firefox console still tag it as an insecure link (very weird because in the source code it shows as https)

Code: Select all

http://img12.deviantart.net/f11c/i/2012/253/9/2/smb3dx_grass_land__mockup__by_dogmansp-d5ea0zf.gif
I thought you might use Joshy's fix, and since I lack the knowledge to see what exactly is wrong with this URL I thought I post it for you to find out :)
Joshy's fix does not have quite the right behaviour for some of the html tags generated by the forum (and other extensions).

try:

Code: Select all

'#<img [^>]*src="(http://[^"]+)"[^>]*>#'
at lines 36 and 190 of listener.php.

I tried your .gif, and it works OK on my test boards. Check again with the security checker in your browser to see that it is actually that url that is causing the problem.

Locked

Return to “Abandoned Extensions”