MAINT-6648 FIXED [SECURITY] Link tags do not filter unicode and allow for easy URL spoofing.

meow-7.2.2
Mnikolenko Productengine 2016-08-23 13:01:19 +03:00
parent f69e82b584
commit 377683a8ed
1 changed files with 3 additions and 2 deletions

View File

@ -183,8 +183,9 @@ bool LLUrlEntryBase::isLinkDisabled() const
bool LLUrlEntryBase::isWikiLinkCorrect(std::string url)
{
std::string label = getLabelFromWikiLink(url);
return (LLUrlRegistry::instance().hasUrl(label)) ? false : true;
LLWString label = utf8str_to_wstring(getLabelFromWikiLink(url));
label.erase(std::remove(label.begin(), label.end(), L'\u200B'), label.end());
return (LLUrlRegistry::instance().hasUrl(wstring_to_utf8str(label))) ? false : true;
}
std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const