You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 57 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Dup Usernames - Nuke 6.0 Port 2.0.6 [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Wizarium
Nuke Soldier
Nuke Soldier


Joined: Jan 15, 2003
Posts: 26

Location: USA

PostPosted: Wed Jan 22, 2003 9:53 am Reply with quoteBack to top

A bug was posted over at BBtoNuke, which allows new Users to enter a duplicate uname. The Forums have a built-in validation to check for this, but it wasn't ported over correctly. This bug concerns Nuke 6.0 and the 2.0.6 port, but it may affect other versions... I posted the fix over there, and the link is:

http://bbtonuke.sourceforge.net/modules.php?name=Forums&file=viewtopic&t=1985
Find all posts by WizariumView user's profileSend private messageVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Wed Jan 22, 2003 10:09 am Reply with quoteBack to top

You rock Keith!! I hope quoting here is ok, if not let me know:

_I_AM_I_ wrote:
I have verified this bug exists in Nuke 6.0 Port 2.0.6

Here's the FIX:

Open file ../modules/Forums/includes/functions_validate.php

Search for:
Code:
//
// Check to see if the uname has been taken, or if it is disallowed.
// Also checks if it includes the " character, which we don't allow in unames.
// Used for registering, changing names, and posting anonymously with a uname
//
function validate_username($username)
{
   global $db, $lang, $userdata;

   $username = str_replace("\'", "''", $username);

   $sql = "SELECT uname
      FROM " . USERS_TABLE . "
      WHERE LOWER(username) = '" . strtolower($username) . "'";
   if ( $result = $db->sql_query($sql) )
   {


Change to:
Code:
//
// Check to see if the uname has been taken, or if it is disallowed.
// Also checks if it includes the " character, which we don't allow in unames.
// Used for registering, changing names, and posting anonymously with a uname
//
function validate_username($username)
{
   global $db, $lang, $userdata;

   $username = str_replace("\'", "''", $username);

   $sql = "SELECT uname
      FROM " . USERS_TABLE . "
      WHERE LOWER(uname) = '" . strtolower($username) . "'";
   if ( $result = $db->sql_query($sql) )
   {


Basically changing two instances of 'username' to 'uname'...

I have verified this FIX on my site... Remember to backup this file before you make changes. Great find Imago.. thanks! Smile

I don't use Admin validation, so I don't know offhand where to look to fix it for you. If I have time, I'll check over the weekend. If not, maybe someone else will fix it.

EDIT - the BB keeps changing my upper 'Search for' code so that 'username' is turned into 'uname'. So in the 'Search for section', <b>$sql = "SELECT uname</b> is really <b>$sql = "SELECT 'username'</b> without the single quotes... someone just posted about not being able to post the word 'username' over at Nuke Cops... hehe

- Keith

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Wizarium
Nuke Soldier
Nuke Soldier


Joined: Jan 15, 2003
Posts: 26

Location: USA

PostPosted: Wed Jan 22, 2003 10:12 am Reply with quoteBack to top

Zhen-Xjell wrote:
I hope quoting here is ok, if not let me know


That's fine.. didn't know if I should've or not, so I just posted the link instead.. whatever gets the word out.. that was a pretty major bug..!! heh
Find all posts by WizariumView user's profileSend private messageVisit poster's website
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Jan 22, 2003 10:13 am Reply with quoteBack to top

thanks.

the only thing I think should have been mentioned is that the whole user registration through the forum should have been disabled during the port, and new users should be directed to the normal nuke registration screen instead.

Also, you said in that post that you changed two instances of 'username' to 'uname', but i only counted one instance change in the code you posted.

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
Wizarium
Nuke Soldier
Nuke Soldier


Joined: Jan 15, 2003
Posts: 26

Location: USA

PostPosted: Wed Jan 22, 2003 10:18 am Reply with quoteBack to top

Read the EDIT part bro.......

and this post:

http://nukecops.com/modules.php?name=Forums&file=viewtopic&t=125
Find all posts by WizariumView user's profileSend private messageVisit poster's website
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Wed Jan 22, 2003 10:30 am Reply with quoteBack to top

Code:

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources

Last edited by chatserv on Mon Sep 13, 2004 1:36 pm; edited 4 times in total
Find all posts by chatservView user's profileSend private messageVisit poster's website
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Jan 22, 2003 10:30 am Reply with quoteBack to top

yeah yeah......

that's another issue I'll have to take a look at in the next day or 2 (probably 2night).

ArtificialIntel
Find all posts by ArtificialIntelView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Wed Jan 22, 2003 10:38 am Reply with quoteBack to top

The post changed most of the values as bbtonuke doesn't seem to like them being used, anyway you get the idea, i have changed these values both in my IRC site (uses nuke 6.0 & bbtonuke 2.0.6) and the test site with nuke 6.5 & bbtonuke (??) and nothing has stopped working, one of Nuke life's greatest mysteries Rolling Eyes

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.209 Seconds - 229 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::