Skip to content

Commit ca49dcf

Browse files
mikhail-dclclaude
andcommitted
feat: permit self-preview-builder-collections in deep links
Now that every collection id must parse as a GUID before it reaches a signed Builder API URL (previous commit), the param is safe to accept from a deep link again. The deny-by-default allowlist introduced in #9476 had been dropping it, which silently broke the documented one-click creator flow in docs/unreleased-wearables-emotes-preview.md. Placed on the always-permitted tier, not the whitelisted-realm one: the documented link carries no realm (decentraland://?position=100,100&self-preview-builder-collections=<uuid>), so the whitelisted-realm tier could never serve it. What bounds the exposure: ids are GUID-validated, the Builder API only serves a collection to its owner or an authorized curator, and the preview is local - equipping does not publish a profile change. Verified: Unity 6000.4.0f1 batch EditMode - 0 compile errors, 63/63 tests (AppArgs incl. the new pinning test, plus the provider GUID-rejection suites). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a974929 commit ca49dcf

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

Explorer/Assets/DCL/Infrastructure/Global/AppArgs/DeepLinkAllowlist.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace Global.AppArgs
1616
/// <item>
1717
/// <b>Always permitted</b> — benign navigation / share / login intents whose worst case is already
1818
/// gated elsewhere (a consent prompt, a matching login token, or a plain coordinate): realm,
19-
/// position, community, signin, authRequestId, force-open-backpack, spawnpoint.
19+
/// position, community, signin, authRequestId, force-open-backpack, spawnpoint,
20+
/// self-preview-builder-collections.
2021
/// </item>
2122
/// <item>
2223
/// <b>Permitted only for a whitelisted realm</b> — the local-development params Creator Hub and the
@@ -76,6 +77,14 @@ public static class DeepLinkAllowlist
7677
// POSITION — it only picks where inside an already-permitted realm/position navigation the user arrives,
7778
// with no capability, infra, or exec impact.
7879
AppArgsFlags.SPAWN_POINT,
80+
81+
// Builder collection ids to preview unreleased wearables/emotes with. This is the documented one-click
82+
// creator flow (docs/unreleased-wearables-emotes-preview.md), and a deep link carries no realm, so the
83+
// whitelisted-realm tier below could not serve it. Three properties keep it in this tier: every id must
84+
// parse as a GUID before it reaches a URL (BuilderCollectionIds.IsValid), the Builder API itself only
85+
// serves a collection to its owner or an authorized curator, and the preview is local — equipping does not
86+
// publish a profile change.
87+
AppArgsFlags.SELF_PREVIEW_BUILDER_COLLECTIONS,
7988
};
8089

8190
// Local-development params Creator Hub / sdk-commands attach to preview deep links. Permitted ONLY when the

Explorer/Assets/DCL/Infrastructure/Global/AppArgs/Tests/AppArgsTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ public void DeepLinkKeepsAllowlistedParams()
8484
Assert.AreEqual("lobby", output.GetValueOrDefault(AppArgsFlags.SPAWN_POINT), "spawnpoint must survive (named scene spawn point #9369)");
8585
}
8686

87+
[Test]
88+
public void DeepLinkKeepsSelfPreviewBuilderCollections()
89+
{
90+
// The documented creator flow carries no realm (docs/unreleased-wearables-emotes-preview.md), so this has
91+
// to survive on the always-permitted tier rather than the whitelisted-realm one.
92+
Dictionary<string, string> output = ApplicationParametersParser.ProcessDeepLinkParameters(
93+
"decentraland://?position=100,100&self-preview-builder-collections=a2041268-189e-4cef-902d-70272aed077c");
94+
95+
Assert.AreEqual("a2041268-189e-4cef-902d-70272aed077c", output.GetValueOrDefault(AppArgsFlags.SELF_PREVIEW_BUILDER_COLLECTIONS),
96+
"self-preview-builder-collections must survive without a realm; ids are GUID-validated before reaching a URL");
97+
}
98+
8799
[Test]
88100
public void DeepLinkKeepsLocalSceneForLoopbackRealm()
89101
{

0 commit comments

Comments
 (0)