Skip to content

Instantly share code, notes, and snippets.

View sebilasse's full-sized avatar

Sebastian Lasse sebilasse

View GitHub Profile
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
This code won't run - just trying to get the idea across of how we might replace registerProtocolHandler, but only if register and registee both agree to use the replacement.
Page that wants to register:
<iframe class="hidden" src="http://you.github.io/registerProtocolHandler/" id="registerProtocolHandler"></iframe>
<script>
document.getElementById("registerProtocolHandler").contentWindow.postMessage({
operation: "setRegistration",
scheme: "web+action",
handler: "http://me.com/?url=%s"