Jump to content
MakeWebGames

Fix to a forum bug: Apostrophe in thread title.


Ragnar
 Share

Recommended Posts

If you get....

QUERY ERROR: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 're not training when...' WHERE ff_id=4' at line 1

Query was UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=302, ff_lp_poster_name='nesqueen', ff_lp_t_id=210, ff_lp_t_name='You know you're not training when...' WHERE ff_id=4

when you reply to a thread, and it's still added, it get's generated when you reply to the thread that has a Apostrophe (') in the title.

Replace

$db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$_GET['reply']}, ff_lp_t_name='{$topic['ft_name']}' WHERE ff_id={$forum['ff_id']}");

with

$db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$_GET['reply']}, ff_lp_t_name='{$_POST['ft_name']}' WHERE ff_id={$forum['ff_id']}");

to fix it.

Link to comment
Share on other sites

Re: Fix to a forum bug: Apostrophe in thread title.

Send that link to MCcodes who made the crummy code in the first place!! Every one who bought the script has that code. All I did was get rid of the annoying error, so it's no less secure than it already was.

And buy the v2 of the script, fix every secure bug, and post a paid mod with all the search and replace codes to fix them! :-D Sell for $50 and after six sales and you'll start racking in the cash, and we'll all have a much more secure game!! :-D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...