about summary refs log tree commit diff stats
path: root/superstack.php
diff options
context:
space:
mode:
authorCase Duckworth2023-01-20 15:36:44 -0600
committerCase Duckworth2023-01-20 15:36:44 -0600
commit71a2d856c6d70fea67275eb2d92230e0c455b1bc (patch)
tree7847c52b00b7193fdbb97621d585b3e8026bb9e0 /superstack.php
parentStyle images (diff)
downloadsuperstack-71a2d856c6d70fea67275eb2d92230e0c455b1bc.tar.gz
superstack-71a2d856c6d70fea67275eb2d92230e0c455b1bc.zip
Some hardening
Diffstat (limited to 'superstack.php')
-rw-r--r--superstack.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/superstack.php b/superstack.php index c02ae6d..8f8b2a0 100644 --- a/superstack.php +++ b/superstack.php
@@ -1,5 +1,11 @@
1<?php 1<?php
2$site = urldecode($_GET['page']); 2$site = urldecode($_GET['page']);
3
4if(!empty($site) && !preg_match("substack\.com", $site)) {
5 http_response_code(403);
6 exit
7}
8
3$ch = curl_init($site); 9$ch = curl_init($site);
4curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 10curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
5$page = curl_exec($ch); 11$page = curl_exec($ch);