Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-22-2010, 12:30 AM
bigrover bigrover is offline
 
Join Date: Jun 2010
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Username registration validation?

I am trying to figure out how vB validates a new username during registration. I want to use the same logic or routines to validate a loginname field I have created in the user profile. I haven't found where the username validate routines are being called. I would appreciate a pointer in the right direction.

The hack I am working on allows a user to log in with a different name than the username. The reason is to deal with some denial of service issues related to people targeting certain members of a forum. A perp can either saturate the login process with repeated login attacks/failures, or engage a user lockout for repeated login failures. In either case, users have experienced denial of access to their forum. I have been requested to provide a bit of security via obfuscation. I have read a number of threads discussing mods to add a display name similar to other products. After some consideration, I have concluded it would be preferable to not attempt to disrupt the user name functionality in vB and the many mods I may want to take advantage of. A better solution is to authenticate logins against another value linked to the standard user name and userid. I have this working with a loginname stored in field5 of the userprofile table. What I need to do now is validate the loginname is unique during the registration process.
Reply With Quote
  #2  
Old 07-22-2010, 02:38 AM
Guest190829
Guest
 
Posts: n/a
Default

It should, hopefully, be in the User datamanager class (includes/class_dm_user.php) -- I don't have the vB code available to me right now to check.
Reply With Quote
  #3  
Old 07-22-2010, 07:39 PM
bigrover bigrover is offline
 
Join Date: Jun 2010
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found that. Now I need to wrap my head around datamanagers in general. I will dig into the user datamanager class to see if the profile fields are included or if they are handled separately.
Reply With Quote
  #4  
Old 07-23-2010, 07:59 PM
bigrover bigrover is offline
 
Join Date: Jun 2010
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, this looks like it is happening at the client level. It is interactive during the entry of the new username. There must be some script running on the client that is validating the value entered as it is being typed. I would like to duplicate this behavior on another field. Any ideas?
Reply With Quote
  #5  
Old 07-23-2010, 08:12 PM
Guest190829
Guest
 
Posts: n/a
Default

Well the client checking is just another additional layer of protection, you'll still need to verify the input on the server end.

(Eg; I can enter a username that is already taken and still submit the form, despite the error popping up)
Reply With Quote
  #6  
Old 07-23-2010, 08:27 PM
bigrover bigrover is offline
 
Join Date: Jun 2010
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I see that now. It looks like the profile fields aren't using a datamanager so I need to validate them myself. What I haven't figured out yet is how the error handler works and how to extend it to custom errors.

Specifically, I want to verify that field5 in the profile is unique vs. all other user's field5. I may also choose to verify it doesn't match any other username in the system. If it fails the test I want to throw an error and have it come back to re-enter like the other required fields in the registration form.

Any suggestions on how I could do this?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:39 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
  • Page Generation 0.03606 seconds
  • Memory Usage 2,196KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (4)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete