The goal is to strip out data that can be used by untoward users in copying models, avatars, etc.
Showing the changes to libraries/script-engine/src/AssetScriptingInterface.cpp (1 of 36 files). Show all
Unified · Split
| @@ -398,7 +398,6 @@ void AssetScriptingInterface::loadFromCache(QScriptValue options, QScriptValue s · 397 unmodified lines | ||
| 398 | 398 | bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { |
| 399 | 399 | auto scriptEngine = qobject_cast<ScriptEngine*>(engine()); |
| 400 | 400 | if (!scriptEngine) { |
| 401 | − qCDebug(scriptengine) << __FUNCTION__ << "invalid script engine" << url; | |
| 402 | 401 | return false; |
| 403 | 402 | } |
| 404 | 403 | // allow cache writes only from Client, EntityServer and Agent scripts |
| @@ -407,7 +406,6 @@ bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { · 2 unmodified lines | ||
| 407 | 406 | scriptEngine->isAgentScript() |
| 408 | 407 | ); |
| 409 | 408 | if (!isAllowedContext) { |
| 410 | − qCDebug(scriptengine) << __FUNCTION__ << "invalid context" << scriptEngine->getContext() << url; | |
| 411 | 409 | return false; |
| 412 | 410 | } |
| 413 | 411 | return true; |
| @@ -430,7 +428,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& · 16 unmodified lines | ||
| 430 | 428 | auto atpURL = AssetUtils::getATPUrl(hashDataHex(data)); |
| 431 | 429 | atpURL.setQuery(url.query()); |
| 432 | 430 | atpURL.setFragment(url.fragment()); |
| 433 | − qCDebug(scriptengine) << "autogenerated ATP URL" << url << "=>" << atpURL; | |
| 434 | 431 | url = atpURL; |
| 435 | 432 | } |
| 436 | 433 | auto hash = AssetUtils::extractAssetHash(url.toDisplayString()); |
| @@ -440,7 +437,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& · 3 unmodified lines | ||
| 440 | 437 | JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported"); |
| 441 | 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 | 441 | jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback); |
| 446 | 442 | } |