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, 68 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Illegal username... [ ]
 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
roelie12
Nuke Soldier
Nuke Soldier


Joined: Oct 29, 2006
Posts: 18


PostPosted: Wed Nov 01, 2006 6:37 am Reply with quoteBack to top

Hello, Normaly i search this website before i ask a question. But the search didn` t work i got some errors.

So here is my question. I have upgraded my forum to Nuke7.6 patch 3.1 and some users can`t log in anymore. Becauce in version7.6 patch 3.1 space between an username is not allowed any more. So i would like to change this.

This is copied from the index.php from the your_account modulle.

Code:
if(isset($_GET['redirect'])) $redirect = substr($_SERVER['QUERY_STRING'], strpos($_SERVER['QUERY_STRING'], "redirect=") + strlen("redirect="), strlen($_SERVER['QUERY_STRING']));
if (isset($username) && (ereg("[^a-zA-Z0-9_-]",$username))) {
    die("Illegal username...");
}


So what do i have to change so users with space between their name can login agian. (Example nuke cops is not allowed, but nuke_cops is allowed)
Find all posts by roelie12View user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12388


PostPosted: Wed Nov 01, 2006 10:10 am Reply with quoteBack to top

Add a space here
Code:

[^a-zA-Z0-9_-]

TO

[^a-zA-Z0-9_- ]

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Dobleclick
Nuke Cadet
Nuke Cadet


Joined: Apr 16, 2006
Posts: 4


PostPosted: Mon Feb 05, 2007 10:08 am Reply with quoteBack to top

Does this work for other symbols as well? Just adding them to the list inside the brackets?

For example, I'd like to add usernames with the following symbols: =, $, @, ń, Ń, >, <, |, (, ), ., : etc.

If possible, does this suppose a security risk?
Find all posts by DobleclickView user's profileSend private message
DirtyRat
Nuke Cadet
Nuke Cadet


Joined: May 05, 2007
Posts: 3


PostPosted: Sun May 06, 2007 7:09 am Reply with quoteBack to top

This last question never got answered and it's a couple of months old, but it looks like a similar problem that I've been having. As an additional part of the above question, how do you add [ and ] characters to the above list since they are operators for the code?
Find all posts by DirtyRatView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12388


PostPosted: Sun May 06, 2007 3:33 pm Reply with quoteBack to top

Generally that should work for all characters, except those that are special for regular expressions. To escape those characters, you need to use a slash

Code:

\[

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
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.203 Seconds - 148 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::