Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2802

Extensions in Development • Re: [3.3][DEV] Link 2 Topic Name

$
0
0
I've looked over your code and your template variables aren't uppercase which they should be. However most importantly your SQL statements are vulnerable because you're not using the sql_build methods available to help sanitise the input.

Here is one example in event/main_listener.php:

Code:

$sql = 'SELECT post_subject, forum_id, topic_id, poster_id, post_text FROM ' . POSTS_TABLE . ' WHERE post_id = ' . $post_id;
It really should be:

Code:

$sql = 'SELECT post_subject, forum_id, topic_id, poster_id, post_text FROM ' . POSTS_TABLE . ' WHERE ' . $this->db->sql_build_array( 'SELECT', ['post_id' => $post_id] );
Read the documentation for more information about this kind of thing. It's very useful.

Statistics: Posted by danieltj — Mon Jun 02, 2025 3:38 pm



Viewing all articles
Browse latest Browse all 2802

Trending Articles