From 9caf7e3c4588b9e5f3c4471e0ba6597a49a44941 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 19 Sep 2016 12:48:23 +0200 Subject: add access check to i.php for every file request --- include/access_check.inc.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/access_check.inc.php (limited to 'include/access_check.inc.php') diff --git a/include/access_check.inc.php b/include/access_check.inc.php new file mode 100644 index 000000000..26f77afa9 --- /dev/null +++ b/include/access_check.inc.php @@ -0,0 +1,41 @@ + 'category_id', + 'forbidden_images' => 'image_id', + ), + ' AND' + ).' + LIMIT 1;'; + if (pwg_db_num_rows(pwg_query($query)) < 1) { + doError(401, 'Access denied'); + } +} \ No newline at end of file -- cgit v1.2.3