![]() |
Anyone help with this '
Hi Guys
Receiving database errors, when some registers with ' in the email address. Would anyone know how to fix this? PHP Code:
|
Which plugin are you using which alters the registration process? I think we have a SQL injection vulnerability here.
|
It's that one, that makes you register your email before you can sign up. Give me a sec and I'll find it.
this one? https://vborg.vbsupport.ru/showthread.php?t=294164 |
Go to your plugins in the admincp and look for the register_start hook of that plugin.
Find: Code:
$emailalreadyused = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userregcode WHERE userregemail = '$email'"); Code:
$emailalreadyused = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userregcode WHERE userregemail = '" . $db->escape_string($email) . "'"); |
I'll give that a go now mate cheers :D
|
possibly you have an old version of this mod!! because I can't find the table vbuserregcode
I think you need to uninstall the mod and install the latest version of it. I found similar issue someone else had here: http://www.vbulletin.com/forum/forum...database-error |
Quote:
|
May be I'm reading it wrong....But is that line not already the same as you provided?
PHP Code:
|
Quote:
Yes I posted this on here some time ago also, I did remove the mod when vb.org pulled it because of my thread. I will try what you have suggested.. |
I downloaded the latest version, but it's not safe:
It has a check to see if it's a string, then there's a strtolower function around it. Then the variable is being used in the query without being sanitized. You should change the following: HTML Code:
$email = strtolower($vbulletin->GPC['email']); HTML Code:
$email = $db->escape_string(strtolower($vbulletin->GPC['email'])); |
All times are GMT. The time now is 10:25 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|