summaryrefslogtreecommitdiffstats
path: root/api/php/api.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2021-09-24 14:58:27 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2021-09-24 14:58:27 +0200
commit5af70b7dc13e63d85bcba34da628c6ced694602d (patch)
tree015a0fd0ca88697e89c23ecf3c13eca200a55643 /api/php/api.php
parentdodal sijanec.o (diff)
downloadsijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.gz
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.bz2
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.lz
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.xz
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.zst
sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.zip
Diffstat (limited to 'api/php/api.php')
-rw-r--r--api/php/api.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/php/api.php b/api/php/api.php
index 6fb329e..9033787 100644
--- a/api/php/api.php
+++ b/api/php/api.php
@@ -28,6 +28,11 @@
header("Content-Type: text/plain");
exit("400: Napaka. Izgleda, kakor da avtomatizirate zahteve. Koda napake: jebise");
}
+ if (strpos(@file_get_contents("b.txt"), "." . explode(".", $_SERVER["REMOTE_ADDR"])[0] . ".") !== FALSE) {
+ http_response_code(400);
+ header("Content-Type: text/plain");
+ exit("400: Napaka. Izgleda, da ste na črnem seznamu. Kontaktirajte me.");
+ }
$sporocilo = $_REQUEST['message'];
$parent = $_REQUEST['parent'];
if (strlen($sporocilo) > 1024 || strlen($parent) > 7+1+256+1+19 || strlen($vzdevek) > 256) {