GUACAMOLE-641: Canonicalize individual, tokenized components of secret names rather than the whole name.
In the event that a secret name is structured, such as the URL-like notation used by Keeper Secrets Manager, canonicalizing/encoding the entire name could result in the name itself becoming invalid. Only the portions that come from tokens should be canonicalized.
This commit is contained in:
1 parent
16cb9ed69b
commit
786430612e
3 files changed
+31
-14
No files matched your search
+2
-2
@@ -66,8 +66,8 @@ public class AzureKeyVaultSecretService extends CachedVaultSecretService {
|
||||
* not allowed by Azure Key Vault, replacing them with a single dash.
|
||||
*/
|
||||
@Override
|
||||
public String canonicalize(String name) {
|
||||
Matcher disallowed = DISALLOWED_CHARACTERS.matcher(name);
|
||||
public String canonicalize(String nameComponent) {
|
||||
Matcher disallowed = DISALLOWED_CHARACTERS.matcher(nameComponent);
|
||||
return disallowed.replaceAll("-");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user