summaryrefslogtreecommitdiff
path: root/inc/db.inc.php
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-06-14 14:27:45 +0200
committerPatrick Simianer <p@simianer.de>2016-06-14 14:27:45 +0200
commitabcae4f39145863b4861588f885991b6dac662aa (patch)
tree18249899164ecc4ffbe51653b11551c06d304258 /inc/db.inc.php
parent9df3b86e6a5b087d441c161c03a6fb3298943864 (diff)
parent1a51b3797d4c3a846e47b105a5edcb8283726651 (diff)
Merge branch 'master' of github.com:pks/lfpe
Diffstat (limited to 'inc/db.inc.php')
-rw-r--r--inc/db.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/db.inc.php b/inc/db.inc.php
index ed45f7b..e023c3a 100644
--- a/inc/db.inc.php
+++ b/inc/db.inc.php
@@ -1,7 +1,10 @@
<?php
$SESSION_DIR="/srv/postedit/sessions";
-$json = file_get_contents($SESSION_DIR."/".$_GET["key"]."/data.json");
+$key = $_GET["key"];
+if (preg_match('/^[a-z0-9]{1,4}$/', $key)) {
+ $json = file_get_contents($SESSION_DIR."/".$key."/data.json");
+}
$db = json_decode($json);
?>