Ignore invalid resized image sizes
This commit is contained in:
parent
91210205bc
commit
21bb2d4020
1 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,11 @@ function hotlinkCheck(file, userAgent, referrer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function* get() {
|
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({
|
const file = yield this.db.Files.findOne({
|
||||||
_id: this.params.id,
|
_id: this.params.id,
|
||||||
file_name: this.params.name,
|
file_name: this.params.name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue