From 101a91cf376c11d6a63a01860fc73d582027a8a2 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 21 Jun 2010 03:28:35 -0700 Subject: Fix for the chatlog loading/saving bad filenames, ported from Emerald. --- linden/indra/newview/lllogchat.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linden') diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp index a9b0610..62504d6 100644 --- a/linden/indra/newview/lllogchat.cpp +++ b/linden/indra/newview/lllogchat.cpp @@ -90,6 +90,9 @@ void LLLogChat::saveHistory(std::string filename, std::string line) return; } + //dont allow bad files names + filename = gDirUtilp->getScrubbedFileName(filename); + LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/ if (!fp) { @@ -111,6 +114,9 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType return ; } + //dont allow bad files names + filename = gDirUtilp->getScrubbedFileName(filename); + LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ if (!fptr) { -- cgit v1.1