We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5a35dc commit 91c396bCopy full SHA for 91c396b
app/Http/Controllers/KchatController.php
@@ -172,6 +172,10 @@ function attachments(Request $request){
172
173
$tmp = DB::table('settings')->where(['key' => 'uploadpath'])->get();
174
175
+ if(!count($tmp)){
176
+ return false;
177
+ }
178
+
179
$uploadpath = $tmp[0]->value;
180
181
$tmp = $request->all();
@@ -221,10 +225,18 @@ function downattch(Request $request){
221
225
222
226
223
227
228
229
230
231
224
232
233
234
$pathToFile = $uploadpath.'/'.$file->uuid;
235
236
+ if(!file_exists($pathToFile)){
237
+ abort(404);
238
239
240
$headers = [
241
'Content-Type' => $file->MimeType,
242
];
0 commit comments