diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-03 16:21:55 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-03 16:21:55 -0800 |
commit | 0dce13377e6fe6ec6c575bdeb725cbf9fd60d107 (patch) | |
tree | a41c24123f072e29eb418eab63d76b54cce68e7c /indra/llprimitive/llmediaentry.cpp | |
parent | 051190a95530a04ce539c328d6e49a3f47e1613a (diff) |
Fix unposted bug: potential incorrect contract in LLMediaEntry::asLLSD(LLSD& sd)
Review #26
Callum found this potential bug in LLMediaEntry::asLLSD(LLSD&). It
does not erase the incoming LLSD's WHITELIST_KEY. Every other key is
overwritten in this manner, but for the WHITELIST_KEY it is just
appended. Note that this is in code common to the server...but I do
not believe at this point that there is a bug exhibited by this.
Added unit test to test for this case.
Diffstat (limited to 'indra/llprimitive/llmediaentry.cpp')
-rw-r--r-- | indra/llprimitive/llmediaentry.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp index fa04bf80e7..701300163a 100644 --- a/indra/llprimitive/llmediaentry.cpp +++ b/indra/llprimitive/llmediaentry.cpp @@ -164,6 +164,7 @@ void LLMediaEntry::asLLSD(LLSD& sd) const // "security" fields sd[WHITELIST_ENABLE_KEY] = mWhiteListEnable; + sd.erase(WHITELIST_KEY); for (U32 i=0; i<mWhiteList.size(); i++) { sd[WHITELIST_KEY].append(mWhiteList[i]); |