Skip to content

Unknown input-validator aliases silently disable validation #91

Description

@CyR1en

Affected version

CommandPrompterPaper 3.1.1 and the current development branch (5534104).

Description

An unknown -iv:<alias> silently resolves to NoopValidator, so a typo disables validation and accepts every answer.

Steps to reproduce

  1. Define a validator alias such as online.
  2. Mistype it in a prompt, for example <Player -iv:onlien>.
  3. Submit an answer the intended validator would reject.

Expected behavior

An explicitly requested unknown alias fails closed with a clear configuration/session error.

Actual behavior

The answer is accepted with no validation or warning.

Technical cause

PromptConfig#getInputValidator() returns NoopValidator both when no alias is requested and when a nonblank alias resolves to no configured validator (PromptConfig.java:700-712). NoopValidator always accepts.

Suggested direction

Distinguish absent validation from an unresolved alias. Reject or cancel the affected prompt and log/message the exact missing alias; optionally validate aliases during preset/config load.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions