Skip to content

Prevent SQL injections #73

Closed
Closed

Description

@lstrojny

Currently column objects are responsible for escaping and quoting values which does not work. I would suggest the following design change.

  • Change Columns getValue() method to alway return it’s raw values and do no quoting our escaping
  • Let columns hint if a value is meant to be strictly or partially matched against a source (= or LIKE in SQL)
  • Make Sources responsible to do the right thing with values

Comments?

Activity

  1. lstrojny commented on Jan 21, 2012

    @lstrojny
    ContributorAuthor

    I’m not sure this would work as various sources may have different control characters. As the columns are responsible for doing everything a column should do, it looks like violating clean responsibilities to let them filter data, especially since the appropriate filter result depends on the source.

  2. ghost
    self-assigned this
    on Feb 10, 2012
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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions