Skip to content

Commit 716bfef

Browse files
authored
Tidy up aka.ms links in data protection error messages (#50465)
1 parent 564a94d commit 716bfef

File tree

4 files changed

+34
-32
lines changed

4 files changed

+34
-32
lines changed

src/DataProtection/Abstractions/src/Resources.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -118,15 +118,15 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="CryptCommon_PayloadInvalid" xml:space="preserve">
121-
<value>The payload was invalid.</value>
121+
<value>The payload was invalid. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
122122
</data>
123123
<data name="DataProtectionExtensions_NullPurposesCollection" xml:space="preserve">
124124
<value>The purposes collection cannot be null or empty and cannot contain null elements.</value>
125125
</data>
126126
<data name="CryptCommon_GenericError" xml:space="preserve">
127-
<value>An error occurred during a cryptographic operation.</value>
127+
<value>An error occurred during a cryptographic operation. Refer to the inner exception for more information.</value>
128128
</data>
129129
<data name="DataProtectionExtensions_NoService" xml:space="preserve">
130130
<value>No service for type '{0}' has been registered.</value>
131131
</data>
132-
</root>
132+
</root>

src/DataProtection/DataProtection/src/LoggingExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private static bool IsLogLevelEnabledCore([NotNullWhen(true)] ILogger? logger, L
184184
[LoggerMessage(48, LogLevel.Error, "An error occurred while reading the key ring.", EventName = "ErrorOccurredWhileReadingKeyRing")]
185185
public static partial void ErrorOccurredWhileReadingKeyRing(this ILogger logger, Exception exception);
186186

187-
[LoggerMessage(49, LogLevel.Error, "The key ring does not contain a valid default key, and the key manager is configured with auto-generation of keys disabled.", EventName = "KeyRingDoesNotContainValidDefaultKey")]
187+
[LoggerMessage(49, LogLevel.Error, "The key ring does not contain a valid default protection key. The data protection system cannot create a new key because auto-generation of keys is disabled. For more information go to http://aka.ms/dataprotectionwarning", EventName = "KeyRingDoesNotContainValidDefaultKey")]
188188
public static partial void KeyRingDoesNotContainValidDefaultKey(this ILogger logger);
189189

190190
[LoggerMessage(50, LogLevel.Warning, "Using an in-memory repository. Keys will not be persisted to storage.", EventName = "UsingInMemoryRepository")]
@@ -235,6 +235,6 @@ private static bool IsLogLevelEnabledCore([NotNullWhen(true)] ILogger? logger, L
235235
[LoggerMessage(66, LogLevel.Information, "Key ring failed to load during application startup.", EventName = "KeyRingFailedToLoadOnStartup")]
236236
public static partial void KeyRingFailedToLoadOnStartup(this ILogger logger, Exception innerException);
237237

238-
[LoggerMessage(60, LogLevel.Warning, "Storing keys in a directory '{path}' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.", EventName = "UsingEphemeralFileSystemLocationInContainer")]
238+
[LoggerMessage(60, LogLevel.Warning, "Storing keys in a directory '{path}' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning", EventName = "UsingEphemeralFileSystemLocationInContainer")]
239239
public static partial void UsingEphemeralFileSystemLocationInContainer(this ILogger logger, string path);
240240
}

src/DataProtection/DataProtection/src/Resources.resx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -118,34 +118,34 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="CryptCommon_GenericError" xml:space="preserve">
121-
<value>An error occurred during a cryptographic operation. For more information go to http://aka.ms/dataprotectionwarning</value>
121+
<value>An error occurred during a cryptographic operation. Refer to the inner exception for more information.</value>
122122
</data>
123123
<data name="Common_BufferIncorrectlySized" xml:space="preserve">
124-
<value>The provided buffer is of length {0} byte(s). It must instead be exactly {1} byte(s) in length. For more information go to http://aka.ms/dataprotectionwarning</value>
124+
<value>The provided buffer is of length {0} byte(s). It must instead be exactly {1} byte(s) in length.</value>
125125
</data>
126126
<data name="CryptCommon_PayloadInvalid" xml:space="preserve">
127-
<value>The payload was invalid. For more information go to http://aka.ms/dataprotectionwarning</value>
127+
<value>The payload was invalid. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
128128
</data>
129129
<data name="Common_PropertyCannotBeNullOrEmpty" xml:space="preserve">
130130
<value>Property {0} cannot be null or empty.</value>
131131
</data>
132132
<data name="Common_DecryptionFailed" xml:space="preserve">
133-
<value>The provided payload could not be decrypted. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning</value>
133+
<value>The provided payload could not be decrypted. Refer to the inner exception for more information.</value>
134134
</data>
135135
<data name="Common_EncryptionFailed" xml:space="preserve">
136-
<value>An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning</value>
136+
<value>An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information.</value>
137137
</data>
138138
<data name="Common_KeyNotFound" xml:space="preserve">
139-
<value>The key {0:B} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning</value>
139+
<value>The key {0:B} was not found in the key ring. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
140140
</data>
141141
<data name="Common_KeyRevoked" xml:space="preserve">
142-
<value>The key {0:B} has been revoked. For more information go to http://aka.ms/dataprotectionwarning</value>
142+
<value>The key {0:B} has been revoked. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
143143
</data>
144144
<data name="ProtectionProvider_BadMagicHeader" xml:space="preserve">
145-
<value>The provided payload cannot be decrypted because it was not protected with this protection provider. For more information go to http://aka.ms/dataprotectionwarning</value>
145+
<value>The provided payload cannot be decrypted because it was not protected with this protection provider. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
146146
</data>
147147
<data name="ProtectionProvider_BadVersion" xml:space="preserve">
148-
<value>The provided payload cannot be decrypted because it was protected with a newer version of the protection provider. For more information go to http://aka.ms/dataprotectionwarning</value>
148+
<value>The provided payload cannot be decrypted because it was protected with a newer version of the protection provider.</value>
149149
</data>
150150
<data name="Common_ValueMustBeNonNegative" xml:space="preserve">
151151
<value>Value must be non-negative.</value>
@@ -154,42 +154,44 @@
154154
<value>The type '{1}' is not assignable to '{0}'.</value>
155155
</data>
156156
<data name="KeyManagementOptions_MinNewKeyLifetimeViolated" xml:space="preserve">
157-
<value>The new key lifetime must be at least one week. For more information go to http://aka.ms/dataprotectionwarning</value>
157+
<value>The new key lifetime must be at least one week. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
158158
</data>
159159
<data name="XmlKeyManager_DuplicateKey" xml:space="preserve">
160-
<value>The key {0:B} already exists in the keyring. For more information go to http://aka.ms/dataprotectionwarning</value>
160+
<value>The key {0:B} already exists in the keyring. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
161161
</data>
162162
<data name="Common_ArgumentCannotBeNullOrEmpty" xml:space="preserve">
163163
<value>Argument cannot be null or empty.</value>
164164
</data>
165165
<data name="Common_PropertyMustBeNonNegative" xml:space="preserve">
166-
<value>Property {0} must have a non-negative value. For more information go to http://aka.ms/dataprotectionwarning</value>
166+
<value>Property {0} must have a non-negative value.</value>
167167
</data>
168168
<data name="Platform_WindowsRequiredForGcm" xml:space="preserve">
169-
<value>GCM algorithms require the Windows platform. For more information go to http://aka.ms/dataprotectionwarning</value>
169+
<value>GCM algorithms require the Windows platform. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
170170
</data>
171171
<data name="CertificateXmlEncryptor_CertificateNotFound" xml:space="preserve">
172-
<value>A certificate with the thumbprint '{0}' could not be found. For more information go to http://aka.ms/dataprotectionwarning</value>
172+
<value>A certificate with the thumbprint '{0}' could not be found. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
173173
</data>
174+
<!-- This is no longer used -->
174175
<data name="EncryptedXmlDecryptor_DoesNotWorkOnCoreClr" xml:space="preserve">
175-
<value>Decrypting EncryptedXml-encapsulated payloads is not yet supported on Core CLR. For more information go to http://aka.ms/dataprotectionwarning</value>
176+
<value>Decrypting EncryptedXml-encapsulated payloads is not yet supported on Core CLR. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
176177
</data>
177178
<data name="AlgorithmAssert_BadBlockSize" xml:space="preserve">
178-
<value>The symmetric algorithm block size of {0} bits is invalid. The block size must be between 64 and 2048 bits, inclusive, and it must be a multiple of 8 bits. For more information go to http://aka.ms/dataprotectionwarning</value>
179+
<value>The symmetric algorithm block size of {0} bits is invalid. The block size must be between 64 and 2048 bits, inclusive, and it must be a multiple of 8 bits.</value>
179180
</data>
180181
<data name="AlgorithmAssert_BadDigestSize" xml:space="preserve">
181-
<value>The validation algorithm digest size of {0} bits is invalid. The digest size must be between 128 and 2048 bits, inclusive, and it must be a multiple of 8 bits. For more information go to http://aka.ms/dataprotectionwarning</value>
182+
<value>The validation algorithm digest size of {0} bits is invalid. The digest size must be between 128 and 2048 bits, inclusive, and it must be a multiple of 8 bits.</value>
182183
</data>
183184
<data name="AlgorithmAssert_BadKeySize" xml:space="preserve">
184-
<value>The symmetric algorithm key size of {0} bits is invalid. The key size must be between 128 and 2048 bits, inclusive, and it must be a multiple of 8 bits. For more information go to http://aka.ms/dataprotectionwarning</value>
185+
<value>The symmetric algorithm key size of {0} bits is invalid. The key size must be between 128 and 2048 bits, inclusive, and it must be a multiple of 8 bits.</value>
185186
</data>
186187
<data name="KeyRingProvider_NoDefaultKey_AutoGenerateDisabled" xml:space="preserve">
187-
<value>The key ring does not contain a valid default protection key. The data protection system cannot create a new key because auto-generation of keys is disabled. For more information go to http://aka.ms/dataprotectionwarning</value>
188+
<value>The key ring does not contain a valid default protection key. The data protection system cannot create a new key because auto-generation of keys is disabled. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
188189
</data>
189190
<data name="LifetimeMustNotBeNegative" xml:space="preserve">
190-
<value>{0} must not be negative. For more information go to http://aka.ms/dataprotectionwarning</value>
191+
<value>{0} must not be negative.</value>
191192
</data>
193+
<!-- This is only used to test LoggingExtensions.UsingEphemeralFileSystemLocationInContainer -->
192194
<data name="FileSystem_EphemeralKeysLocationInContainer" xml:space="preserve">
193-
<value>Storing keys in a directory '{path}' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to http://aka.ms/dataprotectionwarning</value>
195+
<value>Storing keys in a directory '{path}' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
194196
</data>
195197
</root>

src/DataProtection/Extensions/src/Resources.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -118,12 +118,12 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="CryptCommon_GenericError" xml:space="preserve">
121-
<value>An error occurred during a cryptographic operation. For more information go to http://aka.ms/dataprotectionwarning</value>
121+
<value>An error occurred during a cryptographic operation. Refer to the inner exception for more information.</value>
122122
</data>
123123
<data name="TimeLimitedDataProtector_PayloadExpired" xml:space="preserve">
124-
<value>The payload expired at {0}. For more information go to http://aka.ms/dataprotectionwarning</value>
124+
<value>The payload expired at {0}.</value>
125125
</data>
126126
<data name="TimeLimitedDataProtector_PayloadInvalid" xml:space="preserve">
127-
<value>The payload is invalid. For more information go to http://aka.ms/dataprotectionwarning</value>
127+
<value>The payload is invalid. For more information go to https://aka.ms/aspnet/dataprotectionwarning</value>
128128
</data>
129129
</root>

0 commit comments

Comments
 (0)