Merge pull request #14968 from davidkelly/dk/20726

Guard against accidentally calling wrong api/v1/places endpoint
This commit is contained in:
Shannon Romano 2019-02-25 17:16:33 -08:00 committed by GitHub
commit badd0b8bd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -315,9 +315,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
// wasn't an address - lookup the place name
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after
if (!lookupUrl.host().isNull() && !lookupUrl.host().isEmpty()) {
attemptPlaceNameLookup(lookupUrl.host(), lookupUrl.path(), trigger);
}
}
}
return true;

View file

@ -325,6 +325,11 @@
leftMargin: domainNameLeftMargin
};
// check to be sure we are going to look for an actual domain
if (!domain) {
doRequest = false;
}
if (doRequest) {
var url = Account.metaverseServerURL + '/api/v1/places/' + domain;
request({