Merge branch 'bugs' into devNachCSRF

This commit is contained in:
2026-07-20 00:05:39 +02:00
3 changed files with 10 additions and 4 deletions
+8 -3
View File
@@ -63,9 +63,12 @@ class DatabaseArticleManager implements ArticleManagerDAO {
VALUES (:title, :content, :author, :category, :tags);";
$command = $db->prepare($sql);
if (!$command) {
throw new InternalServerErrorException("internal_error");
}
// Verknüpft die übergebenen Parameter exakt mit den SQL-Platzhaltern
$command->execute([
$success = $command->execute([
":title" => $title,
":content" => $content,
":author" => $author,
@@ -73,10 +76,13 @@ class DatabaseArticleManager implements ArticleManagerDAO {
":tags" => $tags
]);
if (!$success) {
throw new InternalServerErrorException("internal_error");
}
return intval($db->lastInsertId());
} catch (PDOException $e) {
throw new InternalServerErrorException("internal_error");
}
}
@@ -321,7 +327,6 @@ class DatabaseArticleManager implements ArticleManagerDAO {
}
}
/**
* Holt alle User-IDs, die einen bestimmten Beitrag geliked haben.
*