diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-20 16:02:03 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-11-21 19:24:36 +0100 |
commit | 944c29b96429ec95ac1371cb33cc43704a60c7b1 (patch) | |
tree | 7be99e68d8c15fc7e210a4b3ccc44861a8d1de64 /includes/pages/user_news.php | |
parent | fd37c9d60ea818dc9a562fa88ff5f9a50132506f (diff) |
Require POST for sending forms
* Ensure that the form is submitted with a post request
* Replaced several links with forms
Closes #494 (Security Vulnerability)
Diffstat (limited to 'includes/pages/user_news.php')
-rw-r--r-- | includes/pages/user_news.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index d7e681a6..e101be6b 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -142,7 +142,7 @@ function user_news_comments() ) { $nid = $request->input('nid'); $news = DB::selectOne('SELECT * FROM `News` WHERE `ID`=? LIMIT 1', [$nid]); - if ($request->has('text')) { + if ($request->hasPostData('submit') && $request->has('text')) { $text = preg_replace( "/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', |