Skip to content

Router throws BadRequestException for UNC paths in CLI commands #9539

Open
@simomassimo

Description

@simomassimo

PHP Version

8.4

CodeIgniter4 Version

latest

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

macOS, Windows

Which server did you use?

apache

Database

No response

What happened?

checkDisallowedChars() method should be protected or contain is_cli() handling since CLI functions might use disallowed characters e.g. hidden UNC paths are marked with $ sign.

Steps to Reproduce

Create a function wich takes UNC path as argument and use hidden windows share UNC path as argument e.g. \\SHARE\thisishidden$

Expected Output

When using cli commands it is not mandatory to enforce disallowed characters policy or at least checkDisallowedChars() should be marked as protected so it can be overridden without any need to tamper with CI system files.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for infoIssues or pull requests that need further clarification from the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions