mojira.dev
MC-256705

Discrepancy exists between identifier-allowed characters and path segment-allowed characters

Namespaced IDs' paths can have ASCII lowercase alphabets, ASCII digits, dots, underscores, slashes, and hyphens. However, the path segment of a directory-based resource pack only allows ASCII lowercase alphabets, ASCII digits, dots, or underscores, but not hyphens.

This can potentially interfere with overriding assets/data using extracted resource pack/data pack if the path contains a hyphen. However, I am not aware of a vanilla stuff with a hyphen in the path. This mostly affects mods and potentially custom data packs.

(Slashes are directory separators and thus does not cause issues.)

See the following code:

public class x {

private static final Pattern d = Pattern.compile("[._a-z0-9]+"); // notice there is no hyphen

Comments 0

No comments.

apple502j

boq

Plausible

Platform

Normal

Resource Packs

22w42a

22w43a

Retrieved