From ea14f690e2d5b567ecfdf1094f69b78b522efd51 Mon Sep 17 00:00:00 2001 From: dmitry Date: Thu, 10 Oct 2013 12:00:10 +0300 Subject: MAINT-535 Wiki-style link markup hides potentially malicious secondlife: app URLs Partial fix: disabled URLs in the 'label' part of Wiki-style link --- indra/llui/llurlentry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llurlentry.cpp') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index b1cc502c4b..840f67968d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1067,7 +1067,8 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel() std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - return getLabelFromWikiLink(url); + std::string label = getLabelFromWikiLink(url); + return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); } std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const -- cgit v1.2.3 From f291995dac53c2aba9d79aef8b6cd91a5c836e9f Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 7 Jan 2014 15:18:29 -0800 Subject: Revert changes made for MAINT-535 to test in a release cohort. --- indra/llui/llurlentry.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui/llurlentry.cpp') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 840f67968d..2d28ac41b2 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1067,8 +1067,10 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel() std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - std::string label = getLabelFromWikiLink(url); - return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); + // MAINT-535 reversion test + // std::string label = getLabelFromWikiLink(url); + // return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); + return getLabelFromWikiLink(url); } std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const -- cgit v1.2.3 From cfadbe631fbf845db8e26793613dea37ef08d11c Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 10 Jan 2014 13:15:19 -0800 Subject: Revert earlier back-out for MAINT-535 ... it's back in --- indra/llui/llurlentry.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llui/llurlentry.cpp') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 2d28ac41b2..840f67968d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1067,10 +1067,8 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel() std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - // MAINT-535 reversion test - // std::string label = getLabelFromWikiLink(url); - // return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); - return getLabelFromWikiLink(url); + std::string label = getLabelFromWikiLink(url); + return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url); } std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const -- cgit v1.2.3