We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b151674 commit 698be4aCopy full SHA for 698be4a
templates.php
@@ -10,10 +10,17 @@
10
$active_nav = 'templates';
11
include_once ADMIN_VIEWS_DIR . DS . 'header.php';
12
13
+$templates = look_for_templates();
14
+$valid_templates = array_map(function($t) { return $t['location']; }, $templates);
15
+
16
/**
17
* Changing the client's template
18
*/
19
if (isset($_GET['activate_template'])) {
20
+ if (!in_array($_GET['activate_template'], $valid_templates)) {
21
+ exit_with_error_code(403);
22
+ }
23
24
$save = save_option('selected_clients_template', $_GET['activate_template']);
25
26
global $flash;
@@ -28,8 +35,6 @@
28
35
29
36
ps_redirect(BASE_URI . 'templates.php');
30
37
}
31
-
32
-$templates = look_for_templates();
33
38
?>
34
39
<div class="row">
40
<div class="col-12 col-sm-12 col-lg-12">
0 commit comments