Zen Cart Logo
Forums / General Questions / Help making images secure in ssl mode

Help making images secure in ssl mode

Locked

Views: 3,544

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
27 Sep 2009, 1:22 PM
#1
ben_harry avatar

ben_harry

Zen Follower

Join Date:
Mar 2007
Location:
Cornwall - uk
Posts:
462
Plugin Contributions:
0

Help making images secure in ssl mode

I have recently made changes to my site and is unfortunatly now throwing up a display secure and non-secure message at checkout or log in sections. I was just wondering how i can make images secure to stop this message from appearing.

The three main images that i need to edit is in the top right hand corner of the banner, - shopping basket / view basket / checkout

these can be viewed at www.bodykitsonline.co.uk any help would be greatly appreciated.

Thanks
Ben

27 Sep 2009, 3:55 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help making images secure in ssl mode

Make your links to them "relative"
change these & any others

<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/cart_top.jpg"
<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/button_view.jpg"
<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/button_checkout.jpg"

To:

<img src="includes/templates/custom/images/cart_top.jpg"
<img src="includes/templates/custom/images/button_view.jpg"
<img src="includes/templates/custom/images/button_checkout.jpg"
27 Sep 2009, 5:29 PM
#3
ben_harry avatar

ben_harry

Zen Follower

Join Date:
Mar 2007
Location:
Cornwall - uk
Posts:
462
Plugin Contributions:
0

Re: Help making images secure in ssl mode

Many Thanks for your reply. I have it working correctly now :smile:

28 Sep 2009, 6:56 AM
#4
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

Kobra,

I'm using a shared SSL and am currently using
<img src="https://***.***.com/*****/Store/images/shipping.jpg" align="baseline" />

"*** hidden for security"

Is this ok?

This method won't jeopardize my sites security will it?

The image is located in my define_main_page.php file.

I tried using your method but because I am using a shared SSL it would not work the way you suggested.

Thanks

28 Sep 2009, 8:41 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help making images secure in ssl mode

beasleybub:

The image is located in my define_main_page.php file.
As main_page.php ONLY shows up on your main page and not on any secure pages it will not have any affect

29 Sep 2009, 6:47 AM
#6
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

Kobra,

My define_main_page.php actually does show up as an https:// page. ( Let me explain )

I have the Contest System add on installed and when you click on the enter contest link and you are not logged in it asks you to login or create an account. ( I added that functionality to the contest add on. )

If you then log in it takes you back to the main page and it still shows as https:// thus no image in the define_main_page.php. Why it reverts my main page to https:// I can't tell you but in my case it does.

I also have the login box add on installed as well and if you log in from there it also takes you back to the main page as https://

Could you please answer my previous question?

Thank you :D

30 Sep 2009, 7:18 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help making images secure in ssl mode

beasleybub:

If you then log in it takes you back to the main page and it still shows as https:// thus no image in the define_main_page.php. Why it reverts my main page to https:// I can't tell you but in my case it does.

I also have the login box add on installed as well and if you log in from there it also takes you back to the main page as https://
A link to your site might speed things
What are your entries in your configure.php store side file for the first 20 or so lines??
Do not post any sensitive DB details

beasleybub:

Could you please answer my previous question?
What was it?

30 Sep 2009, 7:39 AM
#8
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

kobra:

What was it?

Kobra,

I'm using a shared SSL and am currently using
<img src="https://***.***.com/*****/Store/images/shipping.jpg" align="baseline" />

"*** hidden for security"

Is this ok?

This method won't jeopardize my sites security will it?

I am just curious if the image link above will somehow compromise my sites security because it shows some identification information about the name server and a username.

Example Not Actual:

*ttps://Name.Server.com/HostingUserName/Store/images/shipping.jpg

I will gladly PM you my store url but please do not post it in the forum.

I am going to ask my hosting provider the same question.
( What I should have done in the first place )

30 Sep 2009, 8:08 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help making images secure in ssl mode

Can't tell a thing from what you have provided??
Where are your 20 lines from your configure.php file??

You can post a link and break it with ONE space like this

http: //www.zen-cart.com/

30 Sep 2009, 5:01 PM
#10
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

You know what kobra? Don't worry about it.

I think I provided more than enough information to get an answer to this question.

There is nothing wrong with my configures file(s) I do not need to show it to you.

And what's up with the double?? Little bit rude don't you think.

30 Sep 2009, 5:21 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help making images secure in ssl mode

beasleybub:

I tried using your method but because I am using a shared SSL it would not work the way you suggested.
What do you mean by "it would not work the way you suggested"?
What do you mean by "it would not work"?

Using a relative path should work just fine, provided your settings in your configure.php file are correct (namely HTTP_SERVER, HTTPS_SERVER, DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG).
It's the same with product images: relative paths are used, because that way the SSL and non-SSL pages will still show them correctly.

30 Sep 2009, 5:46 PM
#12
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

DrByte:

What do you mean by "it would not work the way you suggested"?
What do you mean by "it would not work"?

kobra:

Make your links to them "relative"
change these & any others

<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/cart_top.jpg"
<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/button_view.jpg"
<img src="http://www.bodykitsonline.co.uk/includes/templates/custom/images/button_checkout.jpg"

> To:
> ```
<img src="includes/templates/custom/images/cart_top.jpg"
<img src="includes/templates/custom/images/button_view.jpg"
<img src="includes/templates/custom/images/button_checkout.jpg"

I made my image links relitave and they would not show up because of the SSL. My main page gets opened as (https:) after you either use the login box add on or the contest add on. I believe the problem arrises because I am using a shared SSL certificate which has a diferent URL than the store in the config file.

define('HTTP_SERVER', 'http://MyDomainName.com');
define('HTTPS_SERVER', 'https://Name.Server.com/NameServerUsername');

define('DIR_WS_CATALOG', '/CelebrityStore/');
define('DIR_WS_HTTPS_CATALOG', '/CelebrityStore/');

Sorry, But I do not want to post my servers information in a public forum.

30 Sep 2009, 6:07 PM
#14
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

DrByte:

And what happens if you put this in your browser:

https://Name.Server.com/NameServerUsername/CelebrityStore/path/to/your/image.jpg

I tried doing that yesterday and I do see the image using that url.

That's the way I am using it now.

My questions here weren't how to get the image link to work but to ask if I am compromising my websites security by doing it that way. I was not sure if showing the world my actual nameserver URL and username was a risk.

Thanks

30 Sep 2009, 7:13 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help making images secure in ssl mode

beasleybub:

I was not sure if showing the world my actual nameserver URL and username was a risk.
The information has to be disclosed in order for images and other content to be served. It's the same information as one would supply simply to draw the page, access an SSL URL, etc.
So, it's no more risk than providing a login link served on an SSL page.

1 Oct 2009, 6:06 AM
#16
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

Thank you drbyte.

I guessed as much but just wanted to be assured.

( I doubted myself a bit )

My apologies to kobra but I felt like he came off a bit abrasive earlier in the post. I know he was only trying to help.

On another note, kobra said that the main page was never opened via ssl. I am sure this is true with a bone stock zen-cart installation. For some reason both the login sidebox add on and the contest add on returns you to the main page after you login.

1 Oct 2009, 6:51 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help making images secure in ssl mode

It's normal to land on an ssl page after a login since the login action is an SSL activity.
But now we're way off topic again :)

23 Jan 2011, 4:19 AM
#18
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Help making images secure in ssl mode

I was reviewing some posts from months past and realized that I had been abrasive in some of my responses. To whom ever I may have offended. I would just like to apologize. Thanks everybody whom has helped me in the past. :wink: