Bug 135386: Linking secrets with colon in the name - FIXED
This commit is contained in:
@@ -61,13 +61,13 @@ namespace Novell.CASA.MiCasa.Common
|
||||
if (sSecretID != null)
|
||||
{
|
||||
if (sSecretID.StartsWith("SS_CredSet"))
|
||||
m_SecretID = "SS_CredSet:" + EscapeReservedChars(sSecretID.Substring(11)) + '\0';
|
||||
m_SecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sSecretID.Substring(11)) + '\0';
|
||||
else
|
||||
m_SecretID = "SS_CredSet:" + EscapeReservedChars(sSecretID) + '\0';
|
||||
m_SecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sSecretID) + '\0';
|
||||
}
|
||||
|
||||
if (sKeyID != null)
|
||||
m_KeyID = EscapeReservedChars(sKeyID); // + '\0';
|
||||
m_KeyID = Utils.EscapeReservedChars(sKeyID); // + '\0';
|
||||
|
||||
// serialize the object
|
||||
m_object = theObject;
|
||||
@@ -118,34 +118,5 @@ namespace Novell.CASA.MiCasa.Common
|
||||
{
|
||||
return m_errorMsg;
|
||||
}
|
||||
|
||||
private string EscapeReservedChars(string origString)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i=0; i<origString.Length; i++)
|
||||
{
|
||||
switch (origString[i])
|
||||
{
|
||||
case ':' :
|
||||
{
|
||||
sb.Append("\\");
|
||||
break;
|
||||
}
|
||||
case '\\' :
|
||||
{
|
||||
sb.Append("\\");
|
||||
break;
|
||||
}
|
||||
case '=' :
|
||||
{
|
||||
sb.Append("\\");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
sb.Append(origString[i]);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user