<commit_before>querystring-strict
=======

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![iojs version][iojs-image]][iojs-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/querystring-strict.svg?style=flat-square
[npm-url]: https://npmjs.org/package/querystring-strict
[travis-image]: https://img.shields.io/travis/koajs/querystring-strict.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/querystring-strict
[coveralls-image]: https://img.shields.io/coveralls/koajs/querystring-strict.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/querystring-strict?branch=master
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/koajs/querystring-strict.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/querystring-strict
[iojs-image]: https://img.shields.io/badge/io.js-%3E=_1.0-yellow.svg?style=flat-square
[iojs-url]: http://iojs.org/
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.11-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/querystring-strict.svg?style=flat-square
[download-url]: https://npmjs.org/package/querystring-strict

This patches a koa app with `this.query.foo` return strict `string`. Disable multi values.

In 95% use cases, application only want `string` query params.

This patch can avoid some stupid `TypeError` and some security issues like [MongoDB inject](http://www.wooyun.org/bugs/wooyun-2010-086474)
when the developers forget handling query params type check.

## What's different<commit_msg>add appveyor badge<commit_after>querystring-strict
=======

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![appveyor build status][appveyor-image]][appveyor-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![iojs version][iojs-image]][iojs-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/querystring-strict.svg?style=flat-square
[npm-url]: https://npmjs.org/package/querystring-strict
[travis-image]: https://img.shields.io/travis/koajs/querystring-strict.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/querystring-strict
[appveyor-image]: https://ci.appveyor.com/api/projects/status/ija0bd5d7esb54x3?svg=true
[appveyor-url]: https://ci.appveyor.com/project/fengmk2/querystring-strict
[coveralls-image]: https://img.shields.io/coveralls/koajs/querystring-strict.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/querystring-strict?branch=master
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/koajs/querystring-strict.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/querystring-strict
[iojs-image]: https://img.shields.io/badge/io.js-%3E=_1.0-yellow.svg?style=flat-square
[iojs-url]: http://iojs.org/
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.11-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/querystring-strict.svg?style=flat-square
[download-url]: https://npmjs.org/package/querystring-strict

This patches a koa app with `this.query.foo` return strict `string`. Disable multi values.

In 95% use cases, application only want `string` query params.

This patch can avoid some stupid `TypeError` and some security issues like [MongoDB inject](http://www.wooyun.org/bugs/wooyun-2010-086474)
when the developers forget handling query params type check.

## What's different
{'fraction_non_alphanumeric': 0.18921592876576798, 'fraction_numerical': 0.012119713084343309, 'mean_word_length': 5.854237288135593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 30, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4165070', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1506, 'n_words': 200}