Bug 135386: Linking secrets with colon in the name - FIXED
This commit is contained in:
@@ -38,14 +38,35 @@ namespace Novell.CASA.MiCasa.Common
|
||||
|
||||
public LinkedKeyInfo(string sDestSecretID, string sDestKey)
|
||||
{
|
||||
if (sDestSecretID.StartsWith("SS_CredSet"))
|
||||
m_sDestSecretID = sDestSecretID;
|
||||
else
|
||||
m_sDestSecretID = "SS_CredSet:" + sDestSecretID + '\0';
|
||||
if (sDestSecretID != null)
|
||||
{
|
||||
if (sDestSecretID.StartsWith("SS_CredSet"))
|
||||
sDestSecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sDestSecretID.Substring(11)) + '\0';
|
||||
else
|
||||
sDestSecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sDestSecretID) + '\0';
|
||||
}
|
||||
|
||||
m_sDestSecretID = sDestSecretID;
|
||||
m_sDestKeyID = sDestKey;
|
||||
}
|
||||
|
||||
public LinkedKeyInfo(string sDestSecretID, string sDestKey, bool bAlreadyEscaped)
|
||||
{
|
||||
if (!bAlreadyEscaped)
|
||||
{
|
||||
if (sDestSecretID != null)
|
||||
{
|
||||
if (sDestSecretID.StartsWith("SS_CredSet"))
|
||||
sDestSecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sDestSecretID.Substring(11)) + '\0';
|
||||
else
|
||||
sDestSecretID = "SS_CredSet:" + Utils.EscapeReservedChars(sDestSecretID) + '\0';
|
||||
}
|
||||
}
|
||||
|
||||
m_sDestSecretID = sDestSecretID;
|
||||
m_sDestKeyID = sDestKey;
|
||||
}
|
||||
|
||||
public string GetLinkID()
|
||||
{
|
||||
return m_sDestSecretID + ":" + m_sDestKeyID;
|
||||
@@ -56,6 +77,19 @@ namespace Novell.CASA.MiCasa.Common
|
||||
return m_sDestSecretID;
|
||||
}
|
||||
|
||||
public string GetLinkedSecretID(bool bUnescape)
|
||||
{
|
||||
if (bUnescape)
|
||||
{
|
||||
if (m_sDestSecretID.StartsWith("SS_CredSet"))
|
||||
return ("SS_CredSet:" + Utils.UnescapeString(m_sDestSecretID.Substring(11)));
|
||||
else
|
||||
return Utils.UnescapeString(m_sDestSecretID);
|
||||
}
|
||||
return m_sDestSecretID;
|
||||
|
||||
}
|
||||
|
||||
public string GetLinkedKeyID()
|
||||
{
|
||||
return m_sDestKeyID;
|
||||
|
||||
Reference in New Issue
Block a user