Results 1 to 4 of 4

Thread: User name with spaces hack

  1. #1
    silverado350's Avatar
    Join Date
    Nov 2007
    Posts
    131

    Default User name with spaces hack

    If you would like to allow two names (words) with a space (for NickName) we need to do this:
    -
    goto admin panel, fields builder, join form, click nickname, advanced tab - find:
    Code:
    preg_match( '/^[a-zA-Z0-9_-]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );
    -
    Replace with:
    Code:
    return ( preg_match( '/^[ a-zA-Z0-9_-]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );
    -
    Be sure everything else including the ( before the preg_match stays the same. This will allow one or two word nicknames, with 0-9 and -.
    -
    Next, open .htaccess in dolphin root - find:
    Code:
    RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?ID=$1 [QSA,L]
    -
    Add this line directly AFTER the above line:
    Code:
    RewriteRule ^([A-Za-z0-9_-]+)\ ([A-Za-z0-9_-]+)$ profile.php?ID=$1\ $2 [QSA,L]
    -
    That will send the double worded nicks to the profile.php for friendlyurl support (mod_rewrite).
    -
    That's it.
    Dolphin 7
    vBulletin 3.8.4

  2. #2
    Knuty's Avatar
    Join Date
    Sep 2006
    Posts
    103

    Default

    Is it possible to check whether the user has at least two names in the field?
    Last edited by Knuty; 06-08-2010 at 04:21 AM.
    Dolphin 7.0.2

  3. #3
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Yes - you could use a preg_match and look for a space...

    Remember, if you do use two names, separated with a space, like "joe blow"

    your mod_rewrite may need to also be adjusted...

    as

    http://www.yoursite.com/joe blow

    is not good

    maybe

    http://www.yoursite.com/joe_blow
    or
    http://www.yoursite.com/joe-blow

    or whatever....

    Just a comment to consider.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  4. #4
    silverado350's Avatar
    Join Date
    Nov 2007
    Posts
    131

    Default

    Quote Originally Posted by Smoge View Post
    Yes - you could use a preg_match and look for a space...

    Remember, if you do use two names, separated with a space, like "joe blow"

    your mod_rewrite may need to also be adjusted...

    as

    http://www.yoursite.com/joe blow

    is not good

    maybe

    http://www.yoursite.com/joe_blow
    or
    http://www.yoursite.com/joe-blow

    or whatever....

    Just a comment to consider.

    Smoge
    Smoge could you be a little more detailed? could you please give us some example mod_rewrite code? It seem people are having problems getting this to work correctly my self included.
    Last edited by silverado350; 06-26-2011 at 09:14 PM. Reason: typo
    Dolphin 7
    vBulletin 3.8.4

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hire a Hack?
    By bzzrd2 in forum Open Talk
    Replies: 1
    Last Post: 04-15-2009, 06:18 PM
  2. Oh, bug or hack in Boonex Dolphin 6.0003 ?
    By docheff in forum Dolphin General Discussion v6.00 and above
    Replies: 3
    Last Post: 02-09-2008, 07:23 AM
  3. How to skip BOONEX NEWS box (hack)
    By vanarie in forum Bugs Dolphin 6.02
    Replies: 0
    Last Post: 10-12-2007, 11:00 AM
  4. Hack Attempts
    By sillywabbit in forum Dolphin General Discussion v5.0 to v5.21
    Replies: 10
    Last Post: 09-01-2006, 09:48 AM
  5. Rate.Php - HAck Attempts?
    By Smoge in forum Security / Server Administration
    Replies: 1
    Last Post: 09-06-2005, 12:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •