Solved

display image on secure https website from local computer gives security warning

Posted on 2007-11-30
6
240 Views
Last Modified: 2008-02-21
when uploading a photo ina form on a website, I let the user view the photo being uploaded, therefore it takes the image as c:/image.jpg which appears not to be secure, and I get a dialog box asking me if I want to continue with the unsecure items, once this happends my websit is no longer secure.... is there a way to fix this ?
0
Comment
Question by:bdipasquale
6 Comments
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 250 total points
ID: 20384304
No. A web page needs to fetch all it's contents using https to be secure. You can't use https to get an image from the local computer, so there is no way that you can do this and keep the page secure.

How about a popup window to show the image? You might get a warning that you are navigating to an unsecure location, but the main page would still be secure.
0
 

Author Comment

by:bdipasquale
ID: 20384520
ok in that case in php could I detect if im in a secure environment or not ?
0
 
LVL 12

Assisted Solution

by:Sinoj Sebastian
Sinoj Sebastian earned 250 total points
ID: 20384540
     if($_SERVER['HTTPS'] == on)
0
 
LVL 29

Expert Comment

by:Göran Andersson
ID: 20913707
Recommendation: Split between #20384304 and #20384540
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20953200
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question