handle invalid pdf params
This commit is contained in:
parent
d48c854e42
commit
78e713a8ce
1 changed files with 2 additions and 2 deletions
|
|
@ -31,11 +31,11 @@ class GetElementPdf
|
|||
}
|
||||
|
||||
if (!$this->isAllowedPdfFolder($request->folder)) {
|
||||
throw new NotFoundException('PDF not found');
|
||||
throw new BadRequestException('folder is invalid');
|
||||
}
|
||||
|
||||
if (!$this->isValidPdfFileName($request->fileName)) {
|
||||
throw new NotFoundException('PDF not found');
|
||||
throw new BadRequestException('fileName is invalid');
|
||||
}
|
||||
|
||||
$path = "element-pdfs/$request->folder/$request->fileName";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue