Bugs 130336, and 130387

This commit is contained in:
Jim Norman
2005-10-26 14:40:57 +00:00
parent a2bb787e40
commit ce3c9c8fc6
3 changed files with 123 additions and 12 deletions

View File

@@ -796,7 +796,7 @@ namespace Novell.CASA
sKeyChainID,
secret.getID(),
sKey,
sValue);
EscapeReservedChars(sValue));
/*
rcode = miCASAWriteKey(
@@ -1309,8 +1309,37 @@ namespace Novell.CASA
Console.WriteLine(e.ToString());
}
}
return value;
}
return value;
}
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();
}
}
}