level-name in server.properties not being input sanitized
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
users not being able to set
level-name=
and it leading to creation of a world with empty string as a name, leading to plugin errors, because there was an assumption that world name is not an empty string.
Observed/Actual behavior
level-name=
results in creation of the world in the server root directory.
level-name=../
will attempt to create the world in the parent directory and
level-name=/home/someuser/world
will create it on the absolute path
all cases are likely to break plugin configs relying on the world name
Steps/models to reproduce
- start a clean server
- set
level-name=in server-properties - see all the world files dumped in the server root directory
Plugin and Datapack List
n/a
Paper version
26.1.2-x (present in vanilla, bug report)
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the documented server.properties values, then trace how level-name is read and passed into world creation. Check the existing validation and world-path handling; done means empty, parent-directory, and absolute-path values are handled safely without creating worlds under unintended locations, with regression coverage for the reported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100