File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,23 @@ public function showPopup($input_id)
1111 {
1212 $ mimes = request ('mimes ' );
1313
14+ if (! isset ($ mimes )) {
15+ Log::error ('Someone attempted to tamper with mime types in elfinder popup. The attempt was blocked. ' );
16+ abort (403 , 'Unauthorized action. ' );
17+ }
18+
1419 try {
1520 $ mimes = Crypt::decrypt (urldecode (request ('mimes ' )));
1621 } catch (\Illuminate \Contracts \Encryption \DecryptException $ e ) {
1722 Log::error ('Someone attempted to tamper with mime types in elfinder popup. The attempt was blocked. ' );
1823 abort (403 , 'Unauthorized action. ' );
1924 }
2025
21- request ()->merge (['mimes ' => urlencode (serialize ($ mimes ))]);
26+ if (! empty ($ mimes )) {
27+ request ()->merge (['mimes ' => urlencode (serialize ($ mimes ))]);
28+ } else {
29+ request ()->merge (['mimes ' => '' ]);
30+ }
2231
2332 return $ this ->app ['view ' ]
2433 ->make ($ this ->package .'::standalonepopup ' )
You can’t perform that action at this time.
0 commit comments