Skip to content

URL encode base64 next parameter before htmlspecialchars in login form #1501

@coderabbitai

Description

@coderabbitai

Description

When embedding the base64-encoded $_GET['next'] parameter in the login form action attribute in front/index.php, the + character from base64 encoding can be misinterpreted as a space during URL parsing.

Suggested Fix

Apply urlencode() before htmlspecialchars() when building the form action:

?next=' . htmlspecialchars(urlencode($_GET['next']), ENT_QUOTES, 'UTF-8')

This ensures the base64 value survives the round-trip through query string parsing.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions