vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Database Errors (https://vborg.vbsupport.ru/showthread.php?t=52579)

GaleForce 05-04-2003 09:15 PM

Database Errors
 
I am getting Database errors with certian hacks when a member has a ' in their name. I know the ' is used in SQL syntax so I am sure that is causing some conflict. Does anyone know what I can add to my php files for the hack in question to eliminate this problem? I think its like addslashes or something but I am not sure.

GaleForce 05-04-2003 09:20 PM

Code:

$result = $DB_site->query("SELECT user FROM shoutbox_ban WHERE user='".$bbuserinfo['username']."'");
That is the line in question.

filburt1 05-04-2003 09:35 PM

Change $bbuserinfo['username'] to addslashes($bbuserinfo['username']).

GaleForce 05-04-2003 09:54 PM

Thank you.

filburt1 05-04-2003 10:06 PM

That's also pretty badly coded...it should check by userid, not username, for security and speed reasons.

GaleForce 05-04-2003 10:51 PM

Yeah, I am using the shoutbox made by a french programmer, not that he programs bad because he is french. I just liked the format of it because it just uses another table kind of like users online. The other one was nice, but I didn't need all those features.


All times are GMT. The time now is 10:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01036 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete