Skip to content

Filter, sanitize and validate input variables #2

@jk

Description

@jk

As of today, you can specify GET parameters as input to your methods. There is no standardized why to do so for other HTTP verbs like POST, PUT and DELETE. You have to parse $_POST etc. by your self.

While implementing a more user friendly why for accessing input variables it's a good idea to think about security. There is some work in this field. I want to implement some kind of a plugin architecture to integrate https://github.com/Wixel/GUMP to do the filtering etc.

I want to achive something like this chunk:

/**
 * Search
 * 
 * search for something
 *
 * @url POST /search
 * @url GET /search/$value
 * @validate value required, alpha_numeric, max_len=100, min_len=4
 * @filter value trim, sanitize_string
 */
public function search($value='')
{
    # code...
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions