Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2011, 07:48 AM
squishi squishi is offline
 
Join Date: May 2006
Location: Frankfurt
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem with user details being overwritten

I recently created three new extensions to my board. Additionally, my vbulletin forum is modded quite a bit (both in the source files and with custom plugins).

A couple of days ago, I noticed that the user details of my admin account (userid 1) were changed. Some userfields were overwritten. The avatar and profile pic were changed.
I discovered the same avatar and profile pic on a new member's profile. So he must have inadvertently changed my profile while editing his own profile.

I was not able to recreate the problem. I signed up with a new account, changed the user details of that account, but it did not have any effect on the admin account's details.

Say that for some reason, the user data gets saved with the userid "1" to the database. But then the guy would not be able to change his own info. It seems though as if his userdata was copied into my admin account.
I can't explain it. It is very worrysome.

I have three plugins that effect the signup process. I've looked at them multiple times, and cannot find a problem with it. And the user details are changed after the signup anyway.

The question is how I can debug this? I know on vbulletin.com I would just get the standard copy & repaste reply of pretty much reinstalling the forum from scratch. I am not going to do that.
Has anybody ever had such a problem before?
Reply With Quote
  #2  
Old 04-26-2011, 04:16 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without being able to reproduce the problem, you are going to have a hard time fixing it. I would probably try setting us a test site - a duplicate of my live site as it is now - and then trying to reproduce this.
Reply With Quote
  #3  
Old 04-26-2011, 05:19 PM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There will be some extensive logging necessary. Either way, this will be nasty.

I know you don't want to hear it, but re-install (at least restore the vb source files) will be the best way to go.
Reply With Quote
  #4  
Old 04-26-2011, 08:58 PM
squishi squishi is offline
 
Join Date: May 2006
Location: Frankfurt
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A test site would be a lot of work (because my site is quite big).
Logging is probably the better way. I could log all edits of user info, avatars and profile pics. :erm:

The most annoying thing is that it has not happened again.
Maybe it was just once? Could this happen when I install a plugin but not turn the board off?

I do this in a custom plugin at the "profile_start" hook:
PHP Code:
if ($_REQUEST['do'] == 'nameofplugin')
{
// init user data manager
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($vbulletin->userinfo);
// set custom profile fields
$userdata->set_userfields($vbulletin->GPC['userfield']);
// save the data
$userdata->save();

//...

That should be the right way to do it, no? That's the only place I can think of that could cause this.
Or maybe the bug is that the above code is executed, and then the script saves the data again (in the original code).
Reply With Quote
  #5  
Old 04-26-2011, 09:21 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have an idea about this - this is the thing you posted in another thread, where you originally didn't have the set_existing() call? I see now what you meant there - if you don't have the existing fields set, like the userid, then it won't save. Is it possible at some point while you were working on it, you had it so it did save with a userid of 1?
Reply With Quote
  #6  
Old 04-26-2011, 09:34 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you tried disabling the custom plugin and THEN doing some testing? That would at least narrow it down somewhat.
Reply With Quote
  #7  
Old 04-27-2011, 08:09 AM
squishi squishi is offline
 
Join Date: May 2006
Location: Frankfurt
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no testing that I can do but to let it sit and wait for it to happen again.

I never used the set_existing call to save only my info, not even during development.

So far, it has not happened again. I hope it was only a temporary glitch.
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 05:43 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.06105 seconds
  • Memory Usage 2,219KB
  • 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)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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