diff options
author | McCabe Maxsted | 2010-06-21 03:28:35 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-06-26 19:00:23 -0500 |
commit | 101a91cf376c11d6a63a01860fc73d582027a8a2 (patch) | |
tree | 331d6604d2b27074319cd1e4c046248cc4482f82 /linden/indra/newview/lllogchat.cpp | |
parent | The 'unable to connect' popup now says the grid name, not 'Imprudence'. (diff) | |
download | meta-impy-101a91cf376c11d6a63a01860fc73d582027a8a2.zip meta-impy-101a91cf376c11d6a63a01860fc73d582027a8a2.tar.gz meta-impy-101a91cf376c11d6a63a01860fc73d582027a8a2.tar.bz2 meta-impy-101a91cf376c11d6a63a01860fc73d582027a8a2.tar.xz |
Fix for the chatlog loading/saving bad filenames, ported from Emerald.
Diffstat (limited to 'linden/indra/newview/lllogchat.cpp')
-rw-r--r-- | linden/indra/newview/lllogchat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
90 | return; | 90 | return; |
91 | } | 91 | } |
92 | 92 | ||
93 | //dont allow bad files names | ||
94 | filename = gDirUtilp->getScrubbedFileName(filename); | ||
95 | |||
93 | LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/ | 96 | LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/ |
94 | if (!fp) | 97 | if (!fp) |
95 | { | 98 | { |
@@ -111,6 +114,9 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType | |||
111 | return ; | 114 | return ; |
112 | } | 115 | } |
113 | 116 | ||
117 | //dont allow bad files names | ||
118 | filename = gDirUtilp->getScrubbedFileName(filename); | ||
119 | |||
114 | LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ | 120 | LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ |
115 | if (!fptr) | 121 | if (!fptr) |
116 | { | 122 | { |