OpenClaw
Security
https://docs.openclaw.ai/gateway/security
Run regularly:
openclaw security audit --fix
openclaw security audit --deepprivate bool IsSingleLineFile(char[] file)
{
return !file.Contains('\r') && !file.Contains('\n');
}
case TransactionRecordEnum.Text:
if (IsSingleLineFile(file))
{
var text = ReadTransactionTextAndContinuations(file, ref position);
transactionRecord.AssignField(field, text);
return true;
}
var textFieldLineEndingChars = new[] { '\\n', '\\r' };
readResult = ReadUntilFieldOrRecordEnds(file, ref position, textFieldLineEndingChars);
var sb = new StringBuilder();
sb.Append((readResult.result as string)?.TrimEnd());
while (readResult.canContinue)
{
readResult = ReadUntilFieldOrRecordEnds(file, ref position, textFieldLineEndingChars);
sb.Append($" {(readResult.result as string)?.TrimEnd()}");
}
transactionRecord.AssignField(field, sb.ToString());
return true;