File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,10 @@ protected function makeExportFormWidget($theme)
265
265
266
266
public function index_onLoadImportForm ()
267
267
{
268
+ if (\Cms \Helpers \Cms::safeModeEnabled ()) {
269
+ throw new ApplicationException (trans ('cms::lang.cms_object.safe_mode_enabled ' ));
270
+ }
271
+
268
272
$ theme = $ this ->findThemeObject ();
269
273
$ this ->vars ['widget ' ] = $ this ->makeImportFormWidget ($ theme );
270
274
$ this ->vars ['themeDir ' ] = $ theme ->getDirName ();
@@ -274,6 +278,10 @@ public function index_onLoadImportForm()
274
278
275
279
public function index_onImport ()
276
280
{
281
+ if (\Cms \Helpers \Cms::safeModeEnabled ()) {
282
+ throw new ApplicationException (trans ('cms::lang.cms_object.safe_mode_enabled ' ));
283
+ }
284
+
277
285
$ theme = $ this ->findThemeObject ();
278
286
$ widget = $ this ->makeImportFormWidget ($ theme );
279
287
Original file line number Diff line number Diff line change @@ -18,18 +18,22 @@ final class SecurityPolicy implements SecurityPolicyInterface
18
18
* @var array List of forbidden methods.
19
19
*/
20
20
protected $ blockedMethods = [
21
- // \October\Rain\Extension\ExtendableTrait
21
+ // Prevent manipulating Twig itself
22
+ 'getTwig ' ,
23
+
24
+ // Prevent dynamic methods and props
22
25
'addDynamicMethod ' ,
23
26
'addDynamicProperty ' ,
24
27
25
- // \October\Rain\Support\Traits\Emitter
28
+ // Prevent binding event logic
26
29
'bindEvent ' ,
27
30
'bindEventOnce ' ,
28
31
29
32
// Eloquent & Halcyon data modification
30
33
'insert ' ,
31
34
'update ' ,
32
35
'delete ' ,
36
+ 'write ' ,
33
37
];
34
38
35
39
/**
You can’t perform that action at this time.
0 commit comments