<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: are http forms posted thru https secure?</title>
	<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure/</link>
	<description>Comments on Ask MetaFilter post are http forms posted thru https secure?</description>
	<pubDate>Fri, 13 Oct 2006 12:14:16 -0800</pubDate>
	<lastBuildDate>Fri, 13 Oct 2006 12:14:16 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: are http forms posted thru https secure?</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure</link>	
		<description>Can I deliver a form thru http, post it back to the server thru https and be secure? &lt;br /&gt;&lt;br /&gt; A friend says that if a form is delivered thru http and the form posts back to an https location it will be transmitted back unencrypted to the https port 443. For the form to post back encrypted, the original form must be delivered thru https.&lt;br&gt;
&lt;br&gt;
Is this correct? Can you referr me to an authoritative doc that spells this out (rfc, w3c or browser developer doc)&lt;br&gt;
&lt;br&gt;
(Tried using sniffers but on FF they showed unencrytped form info and on IE they showed encrypted.)</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.48531</guid>
		<pubDate>Fri, 13 Oct 2006 12:07:23 -0800</pubDate>
		<dc:creator>Pasa la bola chetu</dc:creator>
		
			<category>html</category>
		
			<category>http</category>
		
			<category>form</category>
		
	</item> <item>
		<title>By: zeoslap</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738631</link>	
		<description>It will be transmitted securely</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738631</guid>
		<pubDate>Fri, 13 Oct 2006 12:14:16 -0800</pubDate>
		<dc:creator>zeoslap</dc:creator>
	</item><item>
		<title>By: zeoslap</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738633</link>	
		<description>The caveat is that if you redirect back to your http form say to display errors and what not then that info won&apos;t be encrypted.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738633</guid>
		<pubDate>Fri, 13 Oct 2006 12:19:17 -0800</pubDate>
		<dc:creator>zeoslap</dc:creator>
	</item><item>
		<title>By: kamelhoecker</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738635</link>	
		<description>I don&apos;t see how posting to a secure URL (action=&quot;https://...&quot;) would ever be unencrypted.&lt;br&gt;
&lt;br&gt;
Perhaps you can describe your test setup in more detail?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738635</guid>
		<pubDate>Fri, 13 Oct 2006 12:22:25 -0800</pubDate>
		<dc:creator>kamelhoecker</dc:creator>
	</item><item>
		<title>By: Khalad</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738637</link>	
		<description>Your friend is wrong.&lt;br&gt;
&lt;br&gt;
The method used to request the form has no bearing on the method used to post the form. It is simply not possible to submit plaintext to an encrypted port--it will look like garbage to the web server and it would reject the form submission if a browser tried to submit the form unencrypted to that port.&lt;br&gt;
&lt;br&gt;
The only problem with submitting from an unencrypted form to an encrypted URL is that the web browser won&apos;t show the padlock icon on the page (as most browsers do nowadays) to show that the form is secure, even though it will in fact be submitted securely.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738637</guid>
		<pubDate>Fri, 13 Oct 2006 12:24:54 -0800</pubDate>
		<dc:creator>Khalad</dc:creator>
	</item><item>
		<title>By: Khalad</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738641</link>	
		<description>To provide more detail on my second paragraph: when a web browser connects to port 443 it must establish an SSL connection before it can transmit the form data. That involves exchanging certificates and such--i.e., an SSL handshake. If the browser doesn&apos;t do a proper handshake the web server will simply close the socket in error. With that understanding it simply does not make sense that a browser would submit in plaintext.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738641</guid>
		<pubDate>Fri, 13 Oct 2006 12:28:06 -0800</pubDate>
		<dc:creator>Khalad</dc:creator>
	</item><item>
		<title>By: moift</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738753</link>	
		<description>It&apos;ll be encrypted, but it&apos;s best to serve the form itself over SSL as well so the user gets the lock and they know they&apos;ll be warned when they press submit if it&apos;s going to drop the SSL layer.  For proof your friend is wrong, telnet to your server on the SSL port and act like you&apos;re going to go about your unencrypted business:&lt;br&gt;
&lt;pre&gt;&lt;br&gt;
Trying 127.0.0.1...&lt;br /&gt;Connected to localhost.&lt;br /&gt;Escape character is &apos;^]&apos;.&lt;br /&gt;GET /&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;400 Bad Request&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Bad Request&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Your browser sent a request that this server could not understand.&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;b&gt;Reason: You&apos;re speaking plain HTTP to an SSL-enabled server port.&amp;lt;br /&amp;gt;&lt;br /&gt;Instead use the HTTPS scheme to access this URL, &lt;/b&gt;please.&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
On preview: what Khalad said</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738753</guid>
		<pubDate>Fri, 13 Oct 2006 13:52:53 -0800</pubDate>
		<dc:creator>moift</dc:creator>
	</item><item>
		<title>By: mkultra</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738775</link>	
		<description>The key fact everyone&apos;s missing is that HTTP is &lt;a href=&quot;http://en.wikipedia.org/wiki/Stateless_server&quot;&gt;STATELESS&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
When you submit to a web server, your browser has no knowledge of where it originally came from- a secure request, an unsecure request, local file, memory cache.&lt;br&gt;
&lt;br&gt;
Every web page you see is the end of a request-response sequence. Using your example:&lt;br&gt;
&lt;br&gt;
1) The browser requests a form, and receives a blank one as a response.&lt;br&gt;
2) Your browser requests a processing confirmation, with the enclosed data, and receives a relevant response.&lt;br&gt;
&lt;br&gt;
1 &amp;amp; 2 are, as far as the web server is concerned, totally unrelated. It&apos;s &lt;i&gt;the browser&lt;/i&gt;, in its request, that is saying, &quot;this sequence is encrypted&quot;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738775</guid>
		<pubDate>Fri, 13 Oct 2006 14:09:35 -0800</pubDate>
		<dc:creator>mkultra</dc:creator>
	</item><item>
		<title>By: bitdamaged</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738796</link>	
		<description>&lt;i&gt;The key fact everyone&apos;s missing is that HTTP is STATELESS.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
methinks those in this thread understand this, it&apos;s the friend that does not.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738796</guid>
		<pubDate>Fri, 13 Oct 2006 14:23:39 -0800</pubDate>
		<dc:creator>bitdamaged</dc:creator>
	</item><item>
		<title>By: willnot</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738821</link>	
		<description>If the form isn&apos;t secure though, you won&apos;t get the padlock indication in the browser which may create some concern about security with your users.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738821</guid>
		<pubDate>Fri, 13 Oct 2006 14:47:27 -0800</pubDate>
		<dc:creator>willnot</dc:creator>
	</item><item>
		<title>By: Rhomboid</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738842</link>	
		<description>The thing your friend was trying to articulate is that if you deliver the FORM itself over plain http then it is not secure against MITM attacks, and so someone could conceivably intercept it and change the submit location of the FORM to be their own site, thus receiving every user&apos;s login credentials (and then sending a fake error message or whatever) and you&apos;d never know.  By both delivering the FORM and receiving its POST over https you mitigate this type of attack.&lt;br&gt;
&lt;br&gt;
So yes technically the data submitted only happens on the POST and so you can just use https for that, but this assumes that the evildoer has not altered the destination of that POST.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738842</guid>
		<pubDate>Fri, 13 Oct 2006 15:00:56 -0800</pubDate>
		<dc:creator>Rhomboid</dc:creator>
	</item><item>
		<title>By: Rhomboid</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738843</link>	
		<description>I should have said &quot;the thing your friend was probably trying to articulate but was completely wrong about&quot;, i.e. the description given is completely bogus, but there is a grain of truth in the sentiment.&lt;br&gt;
&lt;br&gt;
Incidently, many banking sites get this wrong.  &lt;a href=&quot;https://www.securewebbank.com/loginssluse.html&quot;&gt;Here is a survey.&lt;/a&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738843</guid>
		<pubDate>Fri, 13 Oct 2006 15:05:12 -0800</pubDate>
		<dc:creator>Rhomboid</dc:creator>
	</item><item>
		<title>By: helios</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738844</link>	
		<description>It doesn&apos;t matter if it&apos;s secure or not, because &lt;b&gt;no one&lt;/b&gt; should ever be doing this.   &lt;br&gt;
&lt;br&gt;
It&apos;s becoming a somewhat common practice for web developers to place a form on an insecure http:// page and submitting it to a https:// URL.    This method usually requires them to write a paragraph next to the login form that explains &quot;why this is secure.&quot; &lt;br&gt;
&lt;br&gt;
Please don&apos;t do this.   It&apos;s really dumb.   Yes, the form data will be submitted securely.  However, novice users are already really confused about what is and isn&apos;t secure on web sites, and people who use this method are making it even more difficult to understand.    The more you confuse these users, the more susceptible they are to phishing and other scams (and the more likely they are to avoid web forms altogether).&lt;br&gt;
&lt;br&gt;
There are other security-related reasons not to do this, but the above reason should be convincing enough.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738844</guid>
		<pubDate>Fri, 13 Oct 2006 15:05:17 -0800</pubDate>
		<dc:creator>helios</dc:creator>
	</item><item>
		<title>By: tkolar</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738857</link>	
		<description>Taking this a slightly different direction, what do you mean by secure?&lt;br&gt;
&lt;br&gt;
If you serve your page unencrypted, you&apos;re open to a fairly simple attack whereby your page is intercepted in transit and the POST action replaced with a redirect to www.badguys.com.   The user fills in their details, hits submit, and everything is delivered directly to the bad guys.&lt;br&gt;
&lt;br&gt;
So, while the particular phenomenon your friend is talking about is non-existant (Khalad nails why &lt;a href=&quot;http://ask.metafilter.com/mefi/48531#738641&quot;&gt;here&lt;/a&gt;), the answer to your title question is &quot;No, you can not deliver a form via http and expect your overall transaction to be secure&quot;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738857</guid>
		<pubDate>Fri, 13 Oct 2006 15:15:03 -0800</pubDate>
		<dc:creator>tkolar</dc:creator>
	</item><item>
		<title>By: tkolar</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738858</link>	
		<description>On non-preview, what Rhomboid said.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738858</guid>
		<pubDate>Fri, 13 Oct 2006 15:16:18 -0800</pubDate>
		<dc:creator>tkolar</dc:creator>
	</item><item>
		<title>By: aubilenon</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738935</link>	
		<description>Helios:  In general I agree with you that it&apos;s clearer to get the form via https, for a number of reasons.  One reason  reason not to, however, is so you can have a login section on the top of lots of pages of your site for unlogged in users.  The whole site doesn&apos;t need to be https, but the &quot;log me in&quot; button&apos;s action can be.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738935</guid>
		<pubDate>Fri, 13 Oct 2006 16:55:56 -0800</pubDate>
		<dc:creator>aubilenon</dc:creator>
	</item><item>
		<title>By: Rhomboid</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#738954</link>	
		<description>&lt;i&gt;One reason reason not to, however, is so you can have a login section on the top of lots of pages of your site for unlogged in users.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Convient - yes&lt;br&gt;
Widespread and common in practise - yes&lt;br&gt;
Secure - not at all</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-738954</guid>
		<pubDate>Fri, 13 Oct 2006 17:34:12 -0800</pubDate>
		<dc:creator>Rhomboid</dc:creator>
	</item><item>
		<title>By: Pasa la bola chetu</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#739056</link>	
		<description>all of these answers echo my argument to my friend, but he demonstrated what he meant.&lt;br&gt;
&lt;br&gt;
how many of you are familiar with &lt;a href=&quot;http://www.ietf.org/rfc/rfc2817.txt&quot;&gt;rfc 2817&lt;/a&gt;?&lt;br&gt;
&lt;br&gt;
Apparently the problem he was discussing is that not all installations of mod_ssl support the &quot;Upgrade&quot; header described in the rfc.&lt;br&gt;
&lt;br&gt;
I just confirmed with a traffic sniffer that using https to POST a form delivered thru http will start out in cleartext. The server  replies back with the &apos;Upgrade&apos; header using the same TCP connection and the browser reposts using TLS. If the server&apos;s outgoing headers are rewritten to remove the &quot;Upgrade&quot; header the POSTing continues thru in cleartext.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-739056</guid>
		<pubDate>Fri, 13 Oct 2006 20:09:27 -0800</pubDate>
		<dc:creator>Pasa la bola chetu</dc:creator>
	</item><item>
		<title>By: RustyBrooks</title>
		<link>http://ask.metafilter.com/48531/are-http-forms-posted-thru-https-secure#739060</link>	
		<description>The salient point here seems to be not that the form is delivered via http, but that you are using port 80 to do both encrypted and non-encrypted.  Quoting from the rfc:&lt;br&gt;
&lt;br&gt;
&lt;quote&gt;&lt;br&gt;
This memo explains how to use the Upgrade mechanism in HTTP/1.1 to&lt;br&gt;
   initiate Transport Layer Security (TLS) over an existing TCP&lt;br&gt;
   connection. This allows unsecured and secured HTTP traffic to share&lt;br&gt;
   the same well known port (in this case, http: at 80 rather than&lt;br&gt;
   https: at 443)&lt;br&gt;
&lt;/quote&gt;&lt;br&gt;
&lt;br&gt;
I&apos;d be interested to know what you did to demonstrate this...  what server you&apos;re using etc.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.48531-739060</guid>
		<pubDate>Fri, 13 Oct 2006 20:33:21 -0800</pubDate>
		<dc:creator>RustyBrooks</dc:creator>
	</item>
	</channel>
</rss>
