<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Formspree - Medium]]></title>
        <description><![CDATA[Easy HTML form without PHP or JavaScript - Medium]]></description>
        <link>https://medium.com/formspree?source=rss----ea40ed9b8b66---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Formspree - Medium</title>
            <link>https://medium.com/formspree?source=rss----ea40ed9b8b66---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:52:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/formspree" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tracking down an elusive protocol downgrade]]></title>
            <link>https://medium.com/formspree/tracking-down-an-elusive-protocol-downgrade-418a1e99a648?source=rss----ea40ed9b8b66---4</link>
            <guid isPermaLink="false">https://medium.com/p/418a1e99a648</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[formspree]]></category>
            <dc:creator><![CDATA[Rohit Datta]]></dc:creator>
            <pubDate>Fri, 26 May 2017 12:52:23 GMT</pubDate>
            <atom:updated>2017-05-26T12:52:23.114Z</atom:updated>
            <content:encoded><![CDATA[<p>Formspree has always taken the philosophy of maintaining backwards compatibility. Yet sometimes that can come back to harm us. In this case, it was a weird bug related to our introduction of reCAPTCHA pages. Our users were delighted about the introduction of reCAPTCHA, providing them with the most advanced protection on the web for forms.</p><p>However, a few weeks later, we got an email from a customer confused why they received a form confirmation from formspree.io/&lt;redacted&gt;. When we tried to reproduce the bug on their site we were unable to do so. After a while we decided it must have been a spam bot trying to trick the confirmation process. A few weeks later, we got yet another email from a customer complaining about the same problem. Again, we couldn’t reproduce the issue, and again we dismissed it as a spambot. However, as we received more reports of this happening it increased on our team’s priority list. We proceeded to do a massive search throughout our logs and database and discover all cases where this was happening.</p><p>Now initially, we believed that the cause came from a Redis timeout, resulting from an expiration of our dictionary mapping between nonce and hostname. However, after testing with various expirations, we discovered this was not the issue.</p><p>By a chance encounter, when debugging the problem on a site, we found out that when you refresh the CAPTCHA page it will lose all form data. Believing this to be the problem, I coded up a solution to the problem. Then when another one of our developers tried to replicate the problem, he was unable to. Now, when comparing the problem, we realized that the site posting to HTTP Formspree was having the problem, while the site posting to HTTPS Formspree had no problems on refresh.</p><p>Now, hundreds of thousands of Formspree forms still post to the insecure version of Formspree. While we try to encourage people to use our secure version of Formspree, we do maintain backwards compatibility to not break the site for users who are still using insecure HTTP. This makes it impossible for us to fix the problem simply by telling users to change the action URL.</p><p>We then were digging into a solution and came up with the following code using <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage">sessionStorage</a>. Instead of depending on the data to just be passed in from the server, we instead checked if the data from the server was valid, if so replace the local data with that from the server. If not, pull from local storage. Furthermore, once the submission went through, we would delete the data from sessionStorage. sessionStorage had the additional benefit of being local to each tab/window so a user could have multiple tabs open and not interfere with each other.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c97ff3b6c3bada1dcac498183f9a4d3/href">https://medium.com/media/0c97ff3b6c3bada1dcac498183f9a4d3/href</a></iframe><p>Now in the meantime, one of our engineers was unable to replicate the problem on the original HTTP site. Now very puzzled, we finally came to the realization, it wasn’t a problem with HTTP at all, rather a problem with HSTS. Having HSTS on the site meant that users would always be redirected to the HTTPS site. Now the HSTS flag gets set by a site and isn’t easily removed (in Chrome it is <strong>chrome</strong>://net-internals/#hsts). While you can go into your browser settings to remove it, the idea of Formspree being simple immediately removed the possibility of this being feasible. Instead, we realized that using sessionStorage, we could still handle the case when data got corrupted on refresh and handle it accordingly.</p><p>Quite a unique and niche bug, but our team is really proud to have found it. Now if someone goes to a site that is POSTing to the HTTP version of Formspree, the submitter’s site has the HSTS flag set, AND they refresh the reCAPTCHA page, you won’t have to worry about the data getting lost. While this problem accounted for significantly &lt;1% of all submissions we handled, we always aim to provide the most seamless experience for users.</p><p>We’re always looking to improve and welcome feedback you provide us, whether that’s on <a href="https://www.facebook.com/formspree">Facebook</a>, <a href="https://twitter.com/formspree">Twitter</a>, or <a href="https://help.formspree.io/contact">email</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=418a1e99a648" width="1" height="1" alt=""><hr><p><a href="https://medium.com/formspree/tracking-down-an-elusive-protocol-downgrade-418a1e99a648">Tracking down an elusive protocol downgrade</a> was originally published in <a href="https://medium.com/formspree">Formspree</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>