Images Hijacked by Photobucket?

Discussion of non-phpBB related topics with other phpBB.com users.
Forum rules
General Discussion is a bonus forum for discussion of non-phpBB related topics with other phpBB.com users. All site rules apply.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 4093
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Images Hijacked by Photobucket?

Post by HiFiKabin » Sat Jul 29, 2017 5:37 pm

The script is now running, so I assume its all OK now.

Thanks for the fix

mainevette
Registered User
Posts: 67
Joined: Thu Jul 30, 2009 1:30 am
Location: East Waterboro, Maine
Contact:

Re: Images Hijacked by Photobucket?

Post by mainevette » Sun Jul 30, 2017 2:51 am

paul_f wrote:
Fri Jul 28, 2017 5:18 am
mainevette wrote:
Fri Jul 28, 2017 1:48 am
I've also installed the extension and adjusted the settings per the readme file. I've tried running it both with and without the proxy server enabled. Any thoughts?
Have you extracted the links and downloaded the images that Mike has very kindly supplied?

The extension needs to have the images downloaded onto the server first
Yes, I ran both scripts and they worked like a charm (or at least it seems like they did).
v12mike wrote:
Fri Jul 28, 2017 5:33 am
mainevette wrote:
Fri Jul 28, 2017 1:48 am
Hello,

I've also installed the extension and adjusted the settings per the readme file. I've tried running it both with and without the proxy server enabled.

With the extension enabled the stock photobucket "speedometer" image is replaced with a simple icon only, it doesn't display the actual image. A screenshot is provided below. When I click the image link I'm redirected to photobucket's website where it displays the "speedometer" image.

Image
Here's a link to a thread on my forum that had a good number of photos if it helps. I have the extension running but with the proxy server disabled. http://www.forum.corvette-restoration.c ... &start=540

As a last-ditch effort I purged my cache but that didn't work (figured it wouldn't anyhow). Any thoughts?
Do not enable the proxy function unless you have a secure site (using https://) and have a known working secure image proxy server.

Looking at your forum page linked above with the inspect element function of my browser, it shows the new image link as:

Code: Select all

<img src="https://forum.corvette-restoration.com//744eb10dac795a078c9b85e340d669757a799ebc/687474703a2f2f6933342e70686f746f6275636b65742e636f6d2f616c62756d732f643133382f7669746f70617363616c652f436f6e736f6c652532306b69745f7a707365696e736f7768312e6a7067" class="postimage" alt="Image">
which is probably wrong, as it is looking for the image files in your domain root directory. In fact that looks like a camo link, which indicates that you have wrongly enabled the proxy function and that you have either not downloaded the images from photobucket (using the scripts I supplied earlier, or you have not configured the Local Image Path correctly. What is your 'Local Image Store Path' set to in the extension ACP? What is the relative (to forum root) path to the directory where the image files have been saved?

On one of my boards, a link modified by the extension now looks like:

Code: Select all

<img src="https://frenchcarforum.co.uk/forum/images/ext/d389166a50329df89686874142f3c83d" class="postimage" alt="Image">
, and if you take the url part

Code: Select all

https://frenchcarforum.co.uk/forum/images/ext/d389166a50329df89686874142f3c83d
and paste it into a browser, you should see the original image.
Thanks Mike. I wasn't sure which was the right setting so I had tried both settings when I was trying to get it work.

I inspected the link and can see what you mean about the image link. Interestingly, I've have "Proxy Mode" under "Proxy Settings" disabled since I posted my message.

I've messed around with it a bit tonight but can't seem to get the link to be unencrypted when the image redirect extension is running. I've tried playing with the settings (and hitting the save button each time), purging the cache of my board, and even clearing my cookies as well as trying a new internet browser. After those didn't work I went to the extensions tab, disabled the image redirect extension, clicked "delete data", and cleared my boards cache one more time. I then inspected an image link and confirmed it was pointing to photobucket.

With that straigthened out I re-enabled the extension and left all the settings as their default (including having the proxy server disabled). Once I hit the refresh button the links are all encrypted again. I checked the settings on the image redirect extension and, I wasn't sure if my forum web address should be typed into the "No Proxy Domains" field so I added it to see what happened. Unfortunately, nothing changed.

I have the board running with those same settings now which can be seen at this link. http://www.forum.corvette-restoration.c ... &start=570

I'm at a bit of a loss tonight. Going to sleep on it and give it another shot in the morning - I'm sure it's probably user error on my part. In the meantime I'm open to ideas and suggestions.

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Sun Jul 30, 2017 3:44 am

mainevette wrote:
Sun Jul 30, 2017 2:51 am
Thanks Mike. I wasn't sure which was the right setting so I had tried both settings when I was trying to get it work.

I inspected the link and can see what you mean about the image link. Interestingly, I've have "Proxy Mode" under "Proxy Settings" disabled since I posted my message.

I've messed around with it a bit tonight but can't seem to get the link to be unencrypted when the image redirect extension is running. I've tried playing with the settings (and hitting the save button each time), purging the cache of my board, and even clearing my cookies as well as trying a new internet browser. After those didn't work I went to the extensions tab, disabled the image redirect extension, clicked "delete data", and cleared my boards cache one more time. I then inspected an image link and confirmed it was pointing to photobucket.

With that straigthened out I re-enabled the extension and left all the settings as their default (including having the proxy server disabled). Once I hit the refresh button the links are all encrypted again. I checked the settings on the image redirect extension and, I wasn't sure if my forum web address should be typed into the "No Proxy Domains" field so I added it to see what happened. Unfortunately, nothing changed.

I have the board running with those same settings now which can be seen at this link. http://www.forum.corvette-restoration.c ... &start=570

I'm at a bit of a loss tonight. Going to sleep on it and give it another shot in the morning - I'm sure it's probably user error on my part. In the meantime I'm open to ideas and suggestions.
You should certainly have proxy mode disabled and local image store mode enabled.
I looked at your board a little while ago, and was seeing the photobucket icon of death, so it appears that the redirect extension was not working. Looking again now, I see a malformed camo link, so I presume that you have changed the configuration again.

If you disable the extension so that I can see the original image links, I will propose a couple of simple tests that you can do.

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Sun Jul 30, 2017 4:01 am

I just did a little digging on your forum and it seems that the extension and downloaded images are working, at least for some topics, e.g.:
http://www.forum.corvette-restoration.c ... p?f=8&t=50

I suspect that the non-working images are because you did not run one of the scripts enough times to extract and download all the images.

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Sun Jul 30, 2017 4:42 am

To explain slightly better what is going on: The extension first looks to see if a local copy of the image file exists. If it does, then the image link is rewritten to point to the local file. If a local copy of the file is not found, then if an image proxy is configured, then the link is rewritten to go via the proxy, otherwise the original link is left untouched.

In this case the first part of the logic is working, as images with local copies are working, but where (for whatever reason) the local copy is absent, it is dropping back to proxy mode, which indicates a configuration problem.

mainevette
Registered User
Posts: 67
Joined: Thu Jul 30, 2009 1:30 am
Location: East Waterboro, Maine
Contact:

Re: Images Hijacked by Photobucket?

Post by mainevette » Sun Jul 30, 2017 2:43 pm

Hi Mike,

Thanks for your continued efforts to help me out, greatly appreciated. I see exactly what you mean about some image links having been properly replaced. In the link you provided I see that the image link has been properly changed. I'm not sure if it's relevant but, when I turn off the image redirect extension, the actual image linked on photobucket still shows up (it's not photobucket's speedometer icon).

So here's what I've done:

1.) I disabled the image redirect extension and verified the image links were pointing back to photobucket.

2.) I reran the "Extract External Links" script. The script appeared to run properly. Here's the output:
Candidate posts to check=761, maximum number to check each run=50000, starting after post_id=0 ... All Done!!
3.) I re-ran the "Download External Images" script and waited for it to complete. The script ran for probably 20-30 seconds and then ended. I re-ran it again just to be sure and the end point appeared to be the same, although no confirmation was given that the script completed successfully. The output from that script is too long to post here so I copied it into both a MS Word and text file which can be downloaded at the following links:

Word: http://www.forum.corvette-restoration.c ... Images.doc
Text: http://www.forum.corvette-restoration.c ... Images.txt

4.) I went back to the ACP of my board, navigated to the "customize" tab, and clicked "delete data" for the image redirect extension to get a fresh start. I then clicked the "enable" link for the image redirect extension.

5.) I went to the extensions tab and clicked enable next to "Local Image Store Mode", and then clicked save settings. This is the only setting I changed in the extension. I left everything else as-is. I checked the proxy settings and confirmed proxy mode is disabled, simple mode is set to Simple Mode. Also, no text is entered into any of the text field under proxy settings.

6.) I went back to my site to check things out. The issue remains unchanged. For reference, I've been looking at this page during my tests: http://www.forum.corvette-restoration.c ... &start=490

For what it's worth, before I enabled the extension I did a screen shot when inspecting the first image link. Here's what it looked like:

Link for full size: http://www.forum.corvette-restoration.c ... sabled.PNG
Image

With the script enabled here's what it looks like when I inspect the same image:

Link for full size: http://www.forum.corvette-restoration.c ... nabled.PNG
Image

The link still appears as a bunch of nonsense.

7.) I went back to the original image and copied the original file name - 161126_151034_zpszvabya0p.jpg - and searched for that file name in the output generated by the "download external images" script. No results were found when I searched for the full file name, or when I searched for just a small portion of the file name.

So (from what I can tell) the image file is not being downloaded. I tried following the original link to photobucket to view the original photo but their website is useless, filled with redirects, and so bloated with ads it's virtually useless. I couldn't get to the original image and gave up after seeing that it appears they do a bunch of redirects.

Hopefully all of this made sense. The image redirect script on my site is currently disabled so folks can see what I'm starting with. Thanks again for the time and help.

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Sun Jul 30, 2017 3:01 pm

The file download script is not terminating correctly (and has not downloaded all of the files. I can't see the reason for this, maybe php has run short of resources or time.

New the beginning of download_external_images.php isthe definition

Code: Select all

$interval = 20000;
try reducing that to 1000, you should see the script terminate normally and ask to be re-run. Maybe that will fix it.

mainevette
Registered User
Posts: 67
Joined: Thu Jul 30, 2009 1:30 am
Location: East Waterboro, Maine
Contact:

Re: Images Hijacked by Photobucket?

Post by mainevette » Sun Jul 30, 2017 5:50 pm

v12mike wrote:
Sun Jul 30, 2017 3:01 pm
The file download script is not terminating correctly (and has not downloaded all of the files. I can't see the reason for this, maybe php has run short of resources or time.

New the beginning of download_external_images.php isthe definition

Code: Select all

$interval = 20000;
try reducing that to 1000, you should see the script terminate normally and ask to be re-run. Maybe that will fix it.
I adjusted the interval to 1000 and re-ran the script. This time it prompted me to re-run the script which I did. It ended at the same place it did last time - download 1428. I waited for quite some time for the script to finish but it just stayed at that same stopping point and there's no spinning icon indicating the page is still loading / script is running. I tried reducing the interval to 250 just to see what would happen but it was the same outcome - the script stops at that one image without explanation.

Have I mentioned how much I despise photobucket at the moment? :roll:

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Sun Jul 30, 2017 6:38 pm

If you have a tool that lets you examine database tables, browse the table phpbb_external_images, and find the first (lowest ID) row that has a 0 or NULL status. That is probably the url that is killing the script. You could try manually changing the status of that row to something distinctive (like 999) and see if the script carries on afterwards. You might also take a look at the url of that row and see if there is anything special about it.

mainevette
Registered User
Posts: 67
Joined: Thu Jul 30, 2009 1:30 am
Location: East Waterboro, Maine
Contact:

Re: Images Hijacked by Photobucket?

Post by mainevette » Sun Jul 30, 2017 7:54 pm

v12mike wrote:
Sun Jul 30, 2017 6:38 pm
If you have a tool that lets you examine database tables, browse the table phpbb_external_images, and find the first (lowest ID) row that has a 0 or NULL status. That is probably the url that is killing the script. You could try manually changing the status of that row to something distinctive (like 999) and see if the script carries on afterwards. You might also take a look at the url of that row and see if there is anything special about it.
Success - that did the trick! I went into my SQL database, found the offending link and checked it out. Turns out it was a 50 Mb+ high resolution photo that was actually linked from my website. I was able to temporarily remove photo from my website and re-run the script. Once complete I loaded the photo back to my site and manually redid the image link in the original forum post.

After the script finished successfully I reactivated image redirect and everything is now working perfectly. Can't thank you enough Mike - I REALLY appreciate it!!! :D

Tim

cincen
Registered User
Posts: 11
Joined: Tue Oct 24, 2006 8:57 am

Re: Images Hijacked by Photobucket?

Post by cincen » Tue Aug 01, 2017 10:46 am

Hello,

Is there a way thet when you enable the Image Redirection Extension, it only works for the images that are in the phpbb_external_images table?

When I enable the "Local Image Store Mode" , it breaks all my other images not hosted in photobucket.

I only downloaded the images from photobucket, not from other hosts .. I would like this only to work with photobucket.

Thanks.

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Tue Aug 01, 2017 11:30 am

That should already work. Are you sure that you have not enabled secure proxy mode?

Can you give a link to an affected page?

cincen
Registered User
Posts: 11
Joined: Tue Oct 24, 2006 8:57 am

Re: Images Hijacked by Photobucket?

Post by cincen » Tue Aug 01, 2017 2:38 pm

no.. I have proxy disabled. I have image redirection disabled now ... I have noticed that all my image urls were like this when enabled:

Code: Select all

https://07ca78113ce28c2ea062b32860d574f5bd8ada59/687474703a2f2f693135372e70686f746f6275636b65742e636f6d2f616c62756d732f7434332f6d61647269645f35372f53746172626f617264466f726d756c614c575232303130646550696c617250726965742e6a7067
Maybe is because my forum is on HTTPS ???

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

Re: Images Hijacked by Photobucket?

Post by v12mike » Tue Aug 01, 2017 2:59 pm

cincen wrote:
Tue Aug 01, 2017 2:38 pm
no.. I have proxy disabled. I have image redirection disabled now ... I have noticed that all my image urls were like this when enabled:

Code: Select all

https://07ca78113ce28c2ea062b32860d574f5bd8ada59/687474703a2f2f693135372e70686f746f6275636b65742e636f6d2f616c62756d732f7434332f6d61647269645f35372f53746172626f617264466f726d756c614c575232303130646550696c617250726965742e6a7067
Maybe is because my forum is on HTTPS ???
OK, I see that there is a bug in the extension, I will update it later today. It didn't show up on my forums because they https with camo proxies.

cincen
Registered User
Posts: 11
Joined: Tue Oct 24, 2006 8:57 am

Re: Images Hijacked by Photobucket?

Post by cincen » Tue Aug 01, 2017 3:05 pm

Thanks!!!!, your scripts and extension is a lifesaver !!!! ;)

Post Reply

Return to “General Discussion”