limit to 250
Deploy / deploy (push) Successful in 3s

This commit is contained in:
2026-07-22 13:21:39 +02:00
parent c5aa7ef6c3
commit d7071727bf
+2 -2
View File
@@ -53,7 +53,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$ins = $db->prepare('INSERT INTO entries (name, msg, ts) VALUES (?, ?, ?)'); $ins = $db->prepare('INSERT INTO entries (name, msg, ts) VALUES (?, ?, ?)');
$ins->execute([ $ins->execute([
gb_censor(mb_substr($name, 0, 40)), gb_censor(mb_substr($name, 0, 40)),
gb_censor(mb_substr($msg, 0, 500)), gb_censor(mb_substr($msg, 0, 250)),
$now, $now,
]); ]);
$db->prepare('INSERT INTO ratelimit (ip_hash, last_ts) VALUES (?, ?) $db->prepare('INSERT INTO ratelimit (ip_hash, last_ts) VALUES (?, ?)
@@ -100,7 +100,7 @@ require __DIR__ . '/inc/header.php';
<form hx-post="/guestbook.php" hx-target="#entries" hx-swap="innerHTML" <form hx-post="/guestbook.php" hx-target="#entries" hx-swap="innerHTML"
method="post" action="/guestbook.php"> method="post" action="/guestbook.php">
<input name="name" placeholder="name" maxlength="40" required> <input name="name" placeholder="name" maxlength="40" required>
<textarea name="msg" placeholder="say something…" maxlength="500" required></textarea> <textarea name="msg" placeholder="say something…" maxlength="250" required></textarea>
<input name="url" tabindex="-1" autocomplete="off" aria-hidden="true" <input name="url" tabindex="-1" autocomplete="off" aria-hidden="true"
style="position:absolute;left:-9999px" placeholder="leave this empty"> style="position:absolute;left:-9999px" placeholder="leave this empty">
<button type="submit">sign</button> <button type="submit">sign</button>