fix: validate CraftEngine block ID format in fromMap at config-load time#517
Merged
tastybento merged 2 commits intodevelopfrom May 3, 2026
Merged
fix: validate CraftEngine block ID format in fromMap at config-load time#517tastybento merged 2 commits intodevelopfrom
tastybento merged 2 commits intodevelopfrom
Conversation
Merged
…key) Agent-Logs-Url: https://github.com/BentoBoxWorld/AOneBlock/sessions/f42227f2-922c-49bc-9ac2-a3a093110e4f Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [WIP] Address feedback from review on Release 1.25.0 pull request
fix: validate CraftEngine block ID format in fromMap at config-load time
May 3, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



CraftEngineCustomBlock.fromMap()silently accepted blank strings and non-Stringvalues (coerced viaObjects.toString) as valid block IDs, deferring failures to runtime placement.Changes
CraftEngineCustomBlock.fromMap()— replacesObjects.toStringcoercion with aninstanceof Stringpattern match; rejects blank strings and IDs that don't satisfynamespace:keyformatisValidNamespacedKey(String)— new package-private helper; validates format without touching the CraftEngine block registry (preserving the startup timing fix from Fix false "Bad custom block" errors for CraftEngine blocks on startup #511)CraftEngineCustomBlockTest— added test cases for all new rejection paths and direct coverage ofisValidNamespacedKey