{"_id":"@aftership/express-sanitized","_rev":"4-863bd8d063af3c60c7b900765d53e01c","name":"@aftership/express-sanitized","description":"Express middleware for the sanitizer module using Caja's HTML Sanitizer. Identical as 0.5.1","dist-tags":{"latest":"0.5.2"},"versions":{"0.5.1":{"name":"@aftership/express-sanitized","description":"Express middleware for the sanitizer module using Caja's HTML Sanitizer. Identical as 0.5.1","version":"0.5.1","author":{"name":"Patrick Hogan","email":"patrick@callinize.com"},"homepage":"https://github.com/aftership/express-sanitized","bugs":{"url":"https://github.com/aftership/express-sanitized/issues","email":"patrick@callinize.com"},"repository":{"type":"git","url":"git://github.com/aftership/express-sanitized.git"},"license":"MIT","main":"./index.js","scripts":{},"engines":{"node":"*"},"dependencies":{"sanitizer":"0.1.2","underscore":"1.7.0"},"keywords":["express","sanitize","sanitization","xss"],"devDependencies":{"body-parser":"^1.7.0","connect":"^3.1.1","express":"^4.8.7","mocha":"^1.21.4","optimist":"^0.6.1","supertest":"^0.13.0"},"gitHead":"a72537ea31b09e7cd102b1bc05e2a4ea413b1354","_id":"@aftership/express-sanitized@0.5.1","_shasum":"d7d9d7717f00ce6ecf232d6dfc859fd18c4d50b3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.0","_npmUser":{"name":"aftership","email":"support@aftership.com"},"dist":{"shasum":"d7d9d7717f00ce6ecf232d6dfc859fd18c4d50b3","tarball":"https://registry.npmjs.org/@aftership/express-sanitized/-/express-sanitized-0.5.1.tgz","integrity":"sha512-CCyGuEPWmUNZPUy4jx5PIDkQFHD2mW5dbSya3iMuhfoW0sRPLCduf9dH9wqaKuRsG/QCuETY/QDW6kqrvKOKtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdgHAKbvjvr3p55r8Wt00tjVrNOL2/7jw9iNewybN79AiBJs1G49pP2oEUWGBU10WHnXB0Qm4L8lrCTklQSVSJyzQ=="}]},"maintainers":[{"name":"aftership","email":"support@aftership.com"}]},"0.5.2":{"name":"@aftership/express-sanitized","description":"Express middleware for the sanitizer module using Caja's HTML Sanitizer. Identical as 0.5.1","version":"0.5.2","author":{"name":"Patrick Hogan","email":"patrick@callinize.com"},"homepage":"https://github.com/aftership/express-sanitized","bugs":{"url":"https://github.com/aftership/express-sanitized/issues","email":"patrick@callinize.com"},"repository":{"type":"git","url":"git://github.com/aftership/express-sanitized.git"},"license":"MIT","main":"./index.js","scripts":{},"engines":{"node":"*"},"dependencies":{"sanitizer":"0.1.2","underscore":"^1.7.0"},"keywords":["express","sanitize","sanitization","xss"],"devDependencies":{"body-parser":"^1.7.0","connect":"^3.1.1","express":"^4.8.7","mocha":"^1.21.4","optimist":"^0.6.1","supertest":"^0.13.0"},"gitHead":"b046b5e5487697be08ca6eca5adfa091bacd7f80","_id":"@aftership/express-sanitized@0.5.2","_shasum":"085b8c26dd031cc328f6d9493b72269c457b2977","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"aftership","email":"support@aftership.com"},"dist":{"shasum":"085b8c26dd031cc328f6d9493b72269c457b2977","tarball":"https://registry.npmjs.org/@aftership/express-sanitized/-/express-sanitized-0.5.2.tgz","integrity":"sha512-wr8C8ATTG690qULjoIx1bQmGAW4qmWOBTFfCNAf9qLxa1fNrm2Cdk6FNaLqP9VzaEmD5LwM4F73fil0vqVAjzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHPIISJ0SuDcRcK1H0rSjqWpT+b/eTRBCq+zsAyJeYgAiBFcLttvhWbwsWdA059OP2YUmSxVeohw5hclRVqVZ5bAQ=="}]},"maintainers":[{"name":"aftership","email":"support@aftership.com"}]}},"readme":"# express-sanitized\n\n## Installation\n\n```\nnpm install @aftership/express-sanitized\n```\n\n## Usage\n\nPlace this directly after express.bodyParser() and before any express middleware that accesses query or body parameters, e.g.:\n\n\n```javascript\nvar express = require('express'),\n    expressSanitized = require('express-sanitized');\n\napp.use(express.bodyParser());\napp.use(expressSanitized()); // this line follows express.bodyParser()\n\n```\n\n\n## Output\n\nThe string \n```javascript\n'<script>document.write('cookie monster')</script> download now'\n```\nwill be sanitized to ' download now'.\n\n## Limitations\n\nThis is a basic implementation of [Caja-HTML-Sanitizer](https://github.com/theSmaw/Caja-HTML-Sanitizer) with the specific purpose of mitigating against persistent XSS risks. \n\n## Caveats\n\nThis module trusts the dependencies to provide basic persistent XSS risk mitigation. A user of this package should review all packages and make their own decision on security and fitness for purpose. \n\nThis module was inspired by [express-sanitizer](https://www.npmjs.org/package/express-sanitizer).\n  The difference here is strict laziness.  This middleware automatically\n  sanitizes post and query values whereas that module requires you to manually sanitize each\n  parameter.\n\n## Changelog\n\n### v0.5.1\n- Initial release\n\n## Contributors\n\n- Patrick Hogan <patrick@callinize.com> - Wrap the sanitizer in an npm package\n- Mark Andrews <20metresbelow@gmail.com>* - Wrote the initial express-sanitizer.  I forked his library.\n- [Callinize](http://www.callinize.com)\n\n## License\n\nCopyright (c) 2014 Patrick Hogan <patrick@callinize.com>, MIT License\n\n","maintainers":[{"name":"aftership","email":"support@aftership.com"}],"time":{"modified":"2022-06-12T14:20:43.792Z","created":"2015-10-27T03:41:08.193Z","0.5.1":"2015-10-27T03:41:08.193Z","0.5.2":"2015-10-28T09:12:29.497Z"},"homepage":"https://github.com/aftership/express-sanitized","keywords":["express","sanitize","sanitization","xss"],"repository":{"type":"git","url":"git://github.com/aftership/express-sanitized.git"},"author":{"name":"Patrick Hogan","email":"patrick@callinize.com"},"bugs":{"url":"https://github.com/aftership/express-sanitized/issues","email":"patrick@callinize.com"},"license":"MIT","readmeFilename":"README.md"}