Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a page with an HTTPS iframe appear secure

I have a page on a website that contains a secure form inside an iframe. Although the form data submitted is secure the page doesn't appear secure as the URL in the browser is just HTTP. Is there anything I can do to show the users that the form is secure?

like image 597
Kaskade Avatar asked Mar 27 '10 00:03

Kaskade


People also ask

Are iframes a security risk?

iframes are a great option to keep your users more engaged. But, when you use an iframe, you're handling content from a third-party source that you have no control over. As a result, iframes often pose security threats to the applications.

How do you prevent a website from being loaded in an iframe?

1.) Sending an X-Frame-Options HTTP response header that instructs the browser to disable framing from other domains. An example of using PHP to send the X-Frame-Options header.


1 Answers

Although the form data submitted is secure

It may or may not be encrypted. But it's not secure, and the browser is absolutely correct to deny you a padlock icon.

If the parent page is http, then that page could easily have been altered by a man-in-the-middle attack to point the usually-secure <iframe> to a completely different server to the expected one. Or, the parent page might have had JavaScript injected into it to log any keypresses you make into the form and send them to the attacker's server.

The user would have no way of checking whether this had happened, short of viewing the page source and reading and understanding every line of markup and script inside it. This is absolutely unrealistic.

If you aren't on a page where all content is secured by https, any submission from that page is insecure, regardless of where the form action is pointed.

like image 196
bobince Avatar answered Oct 23 '22 12:10

bobince