The Protevus Platform: Unified Full-Stack Development https://protevus.com
Find a file
thosakwe 166bad95f6 +1
2017-01-12 22:11:55 -05:00
lib +1 2017-01-12 22:11:55 -05:00
test +1 2017-01-12 22:11:55 -05:00
.gitignore 0.0.0-alpha 2017-01-12 18:57:13 -05:00
.travis.yml 0.0.0-alpha 2017-01-12 18:57:13 -05:00
LICENSE Initial commit 2017-01-10 08:24:29 -05:00
pubspec.yaml +1 2017-01-12 22:11:55 -05:00
README.md +1 2017-01-12 22:11:55 -05:00

security

version 0.0.0-alpha+1 build status

Angel middleware designed to enhance application security by patching common Web security holes.

Currently unfinished, with incomplete code coverage - USE AT YOUR OWN RISK!!!

Sanitizing HTML

app.before.add(sanitizeHtmlInput());

// Or:
app.chain(sanitizeHtmlInput()).get(...)

CSRF Tokens

app.chain(verifyCsrfToken()).post('/form', ...);
app.responseFinalizers.add(setCsrfToken());

Banning IP's

app.before.add(banIp('1.2.3.4'));

// Or a range:
app.before.add(banIp('1.2.3.*'));
app.before.add(banIp('1.2.*.4'));

// Or multiple filters:
app.before.add(banIp(['1.2.3.4', '192.*.*.*', new RegExp(r'1\.2.\3.\4')]));