History

Case 19754 - Remove logging URLs and related file locations.

The goal is to strip out data that can be used by untoward users in copying models, avatars, etc.

Roxanne Skelly committed 8 years ago

Commit cef70001 parent e80468e36 files · +84 −201Browse files

Showing the changes to libraries/script-engine/src/AssetScriptingInterface.cpp (1 of 36 files). Show all

Unified · Split

libraries/script-engine/src/AssetScriptingInterface.cpp+0−4
@@ -398,7 +398,6 @@ void AssetScriptingInterface::loadFromCache(QScriptValue options, QScriptValue s · 397 unmodified lines
398bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) {398bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) {
399 auto scriptEngine = qobject_cast<ScriptEngine*>(engine());399 auto scriptEngine = qobject_cast<ScriptEngine*>(engine());
400 if (!scriptEngine) {400 if (!scriptEngine) {
401 qCDebug(scriptengine) << __FUNCTION__ << "invalid script engine" << url;
402 return false;401 return false;
403 }402 }
404 // allow cache writes only from Client, EntityServer and Agent scripts403 // allow cache writes only from Client, EntityServer and Agent scripts
@@ -407,7 +406,6 @@ bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { · 2 unmodified lines
407 scriptEngine->isAgentScript()406 scriptEngine->isAgentScript()
408 );407 );
409 if (!isAllowedContext) {408 if (!isAllowedContext) {
410 qCDebug(scriptengine) << __FUNCTION__ << "invalid context" << scriptEngine->getContext() << url;
411 return false;409 return false;
412 }410 }
413 return true;411 return true;
@@ -430,7 +428,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& · 16 unmodified lines
430 auto atpURL = AssetUtils::getATPUrl(hashDataHex(data));428 auto atpURL = AssetUtils::getATPUrl(hashDataHex(data));
431 atpURL.setQuery(url.query());429 atpURL.setQuery(url.query());
432 atpURL.setFragment(url.fragment());430 atpURL.setFragment(url.fragment());
433 qCDebug(scriptengine) << "autogenerated ATP URL" << url << "=>" << atpURL;
434 url = atpURL;431 url = atpURL;
435 }432 }
436 auto hash = AssetUtils::extractAssetHash(url.toDisplayString());433 auto hash = AssetUtils::extractAssetHash(url.toDisplayString());
@@ -440,7 +437,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& · 3 unmodified lines
440 JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported");437 JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported");
441 JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data)));438 JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data)));
442 439
443 // qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata;
444 440
445 jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback);441 jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback);
446}442}