From 5678f84d60fd76ce417838b8a7a14bcd48cf3f91 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Mon, 19 Aug 2019 17:58:56 +0200 Subject: [PATCH] [Blazor] Adds a version to the Circuit ID purpose (#13250) * It prevents older payloads from being unprotected should we ever change the format. * Follows recommended practices when using data protection. --- src/Components/Server/src/Circuits/CircuitIdFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Server/src/Circuits/CircuitIdFactory.cs b/src/Components/Server/src/Circuits/CircuitIdFactory.cs index 3d47161fea..544a1b791c 100644 --- a/src/Components/Server/src/Circuits/CircuitIdFactory.cs +++ b/src/Components/Server/src/Circuits/CircuitIdFactory.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits // Generates strong cryptographic ids for circuits that are protected with authenticated encryption. internal class CircuitIdFactory { - private const string CircuitIdProtectorPurpose = "Microsoft.AspNetCore.Components.Server.CircuitIdFactory"; + private const string CircuitIdProtectorPurpose = "Microsoft.AspNetCore.Components.Server.CircuitIdFactory,V1"; // We use 64 bytes, where the last 32 are the public version of the id. // This way we can always recover the public id from the secret form.