Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

HTTP Get Params not escaped correctly #10209

@DanielHeath

Description

@DanielHeath

Angular does not url-encode semicolon characters (whereas encodeURIComponent(';') does).

As a result, if a user types a semicolon into a field which is included in a GET request resulting in a call like

$http.get('/', params: {per_page: 20, search: 'foo;bar'})

According to the relevant spec

We recommend that HTTP server implementors, 
and in particular, CGI implementors, support 
the use of ";" in place of "&"

A server using Rails will follow this spec and interpret the request as
{"per_page" =>"20", "search"=>"foo", "bar"=>nil}

Angular should escape GET params the same way as encodeURIComponent does.

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