Ignore invalid resized image sizes

This commit is contained in:
Jonathan Cremin 2016-06-06 17:41:00 +01:00
parent 91210205bc
commit 21bb2d4020

View file

@ -27,6 +27,11 @@ function hotlinkCheck(file, userAgent, referrer) {
}
export function* get() {
if (this.params.size && ['150', '970'].indexOf(this.params.size) < 0) {
this.throw(404);
return;
}
const file = yield this.db.Files.findOne({
_id: this.params.id,
file_name: this.params.name,