From b5c4a6367f5364ce183548c9dfe459fb6d47742b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 24 Nov 2023 14:09:05 +0100 Subject: skovikanje --- prog/skovikanje/komentar.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'prog/skovikanje/komentar.php') diff --git a/prog/skovikanje/komentar.php b/prog/skovikanje/komentar.php index c6939ed..662b7b4 100644 --- a/prog/skovikanje/komentar.php +++ b/prog/skovikanje/komentar.php @@ -34,7 +34,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && empty($_REQUEST["login"])) { if (str_contains($_POST["avtor"], "\t") || str_contains($_POST["avtor"], "\n")) die("napaka! polje z imenom avtorja ne bi smelo vsebovati niti tabulatorja niti presledka. vrnitev nazaj"); $d = $na . "\t" . $_POST["avtor"] . "\t" . (!empty($_POST["geslo"]) ? password_hash($_POST["geslo"], PASSWORD_DEFAULT) : "") . "\n" . trim($_POST["besedilo"]) . "\n"; - if (file_put_contents("komentarji/" . ($koga ? $koga : str_replace("/", "-", base64_encode(random_bytes(6)))), $d)) { + if (file_put_contents("komentarji/" . ($koga ? $koga : str_replace("/", "-", base64_encode(random_bytes(3)))), $d)) { echo "komentar oddan! "; if (!empty($_REQUEST["ref"])) echo "vrnitev nazaj na diskusijo"; @@ -114,11 +114,12 @@ v polje vpišite črko a (za onemogočanje robotov): /> +
oblikovanje +
-- cgit v1.2.3