summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychatbar.cpp
diff options
context:
space:
mode:
authorArdy Lay <none@none>2010-08-30 14:18:48 -0500
committerArdy Lay <none@none>2010-08-30 14:18:48 -0500
commitbdd1017d0d553bf0559eb9b59a9b6dbda1d5ca71 (patch)
tree5d3fdcd42a374ce02eae4d35b8155b2b06eafc06 /indra/newview/llnearbychatbar.cpp
parent1d158a312e0d7ae8df09789451eeb9e479ac6ae5 (diff)
[mq]: VWR-19499-AppUriChatLimit
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r--indra/newview/llnearbychatbar.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4f9845d704..43630c13fd 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -865,14 +865,30 @@ public:
bool handle(const LLSD& tokens, const LLSD& query_map,
LLMediaCtrl* web)
{
- if (tokens.size() < 2) return false;
- S32 channel = tokens[0].asInteger();
-
- // Send unescaped message, see EXT-6353.
- std::string unescaped_mesg (LLURI::unescape(tokens[1].asString()));
-
- send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel);
- return true;
+ bool retval = false;
+ // Need at least 2 tokens to have a valid message.
+ if (tokens.size() < 2)
+ {
+ retval = false;
+ }
+ else
+ {
+ S32 channel = tokens[0].asInteger();
+ // VWR-19499 Restrict function to chat channels greater than 0.
+ if ((channel > 0) && (channel < 2147483647))
+ {
+ retval = true;
+ // Send unescaped message, see EXT-6353.
+ std::string unescaped_mesg (LLURI::unescape(tokens[1].asString()));
+ send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel);
+ }
+ else
+ {
+ retval = false;
+ // Tell us this is an unsupported SLurl.
+ }
+ }
+ return retval;
}
};