Skip to content

htmlspecialchars is called on strings before inserting into the database #52

Description

@pchote

switch ($type)
{
case PDO::PARAM_INT: $value = intval($value); break;
case PDO::PARAM_BOOL: $value = intval(filter_var($value, FILTER_VALIDATE_BOOLEAN)); break;
case PDO::PARAM_STR: $value = htmlspecialchars($value); break;
}

There is no need to encode data that will be returned as yaml, and possibly likewise for JSON (I'd expect that to have its own sanitize function that could be done on display). We probably want to remove this to avoid issues like:

screen shot 2018-01-02 at 23 35 01

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions