Skip to content

json content-type not restrictive enough #616

Closed
@stephenR

Description

@stephenR

Hi,

There is a problem with the content-type parsing that was introduced in #226 .
Bottle will accept things like "text/plain;application/json" as a json content type which might be used by an attacker to bypass security mechanisms.
For example Chrome will not allow cross-origin xmlhttprequests with the content type set to "application/json" but you can set it to "text/plain;application/json" instead and bottle will accept it.

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