PDA

View Full Version : Force New Password


Floris
04-12-2003, 10:00 PM
/*================================================= =====================*\
|| # Force New Password (en masse) - Requested by Cary from vBulletin # ||
|| # Author: xiphoid (info@vbulletin.nl) - version 1.10 for vB 2.3.0 # ||
|| # All PHP code in these files are ?2003 by their respected owners. # ||
|| # None of the files may be redistributed outside of vBulletin.org! # ||
|| # No (real) animals have been hurt during the making of this hack! # ||
\*================================================ ======================*/

##### Information

This hack integrates with the admin/email.php file from which you are then able to choose to mass email your users a new password, which it randomly generates (automaticly).
This hack is written on request by Cary (vBulletin.com Team Member) who needed it for a web site that converted from snitz forum to a vBulletin powered forum.
This hack will ONLY work if you have Sparkz hack installed 'Email users regardless of 'no mail from admin' hack' (http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=323)


##### Features

(version 1.00)
* You can keep using 'email to users' admin/email.php file as normal, this is just an extra feature
* You can 'test' without actually changing any password
* You can 'echo' the generated passwords for debugging or reference purposes
* The new features are restrickted to the userid that you set, to prevent abuse by other users with access to the admin control panel
* And ofcourse, you can now use 'email to users' mail form to inform your users they have a new password, by including $newpassword in the email and selecting the option
* All through the admin control panel !
(version 1.10)
After testing this on a 2000+ user site, we found out there were a few bugs, so we fixed those.
Fixed: Sparkz hack - now really disregards users, not just the ones on the first x on a page.
Fixed: Will now actually set md5 hashes in the mysql and plaintext in the email.
Fixed: Parses the options you selected on next page, and not just the first one.


##### Credits

Jelsoft - for comming up with the great plan to code something up like vBulletin ! :)
Cary - for thinking up this hack (and testing it on 2000+ user board)
Scott - for helping debugging and fixing the next-page issue
Erwin - for providing the line of code for the random generator and other advice
Sparkz - for the hack that lets us email everybody, regardless of their ignore-admin-emails setting
xiphoid - (me) for taking the time and effort to think up more code and integrate it and the new options into email.php [lol]


##### Extra (copyrights/disclaimer/policy)

I do NOT give permission to distribute any file, or any part of a file, from this hack outside of vBulletin.org!
If I do find this being released on any other web site, I will hunt you down and kill you.
I do not give permission to translate this hack into any other language then english, and re-release it. If I wanted it to be in german or french, I would have released it as such.
You ofcourse, are free to modify any part of the hack to your liking, just don't distribute or re-release it.
This hack requires you to have a valid license, and intented to be applied to unhacked vBulletin email.php file from version 2.3.0 - older versions should maybe apply some little changes, but I only support this version.
My support is limited, my knowledge and time restrickt me to what I can do for you. I owe you nothing. I released this after testing on 3 different 2.3.0 powered sites without any issues. This tells me it works. If you can't get it to work, you made a mistake.
I ofcourse, am not responsible for your database changes, failure of working or any other damage to your data, files, users, dog or car.
You apply the changes, I assume you therefor know what you are doing. My only advice: make a backup before you make any changes or run the new feature.
Support goes through this thread on vBulletin.org only. If you email, icq, PM, irc me about it. I will give you code that will destroy your database. [lol]
Enjoy :)


##### Installation instructions

In the .zip file


##### Upgrade instructions

To upgrade from 1.00 to 1.10 apply Step 3 F (just that one)


##### Screenshots

In the .zip file




Enjoy!


xiphoid

empreur76
04-13-2003, 10:15 AM
thx !! i'm test

DRR
04-13-2003, 10:17 AM
NICE :D *installing*

assassingod
04-13-2003, 11:17 AM
Today at 11:58 AM xiphoid said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=381378#post381378)
If you email, icq, PM, irc me about it. I will give you code that will destroy your database. [lol]



Lol!!!! :D;)


Great hack, will be of some use to me - Thanks Xiphoid

* assassingod takes a bite out of the install button

Floris
04-13-2003, 11:32 AM
Today at 01:09 PM empreur76 said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=381381#post381381)
thx !! i'm test

You are test ? :speechless:

Today at 01:11 PM DRR said this in Post #3 (https://vborg.vbsupport.ru/showthread.php?postid=381383#post381383)
NICE :D *installing*

Glad you seem to like it, hope installation goes smoothly.

Today at 02:11 PM assassingod said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=381395#post381395)
Lol!!!! :D;)


Great hack, will be of some use to me - Thanks Xiphoid

* assassingod takes a bite out of the install button

Good! :bunny: Happy to hear it doens't only give Cary pleassure

Zelda-King
04-13-2003, 11:49 AM
Tested and working without a hitch! One thing though, you have the last two steps in reverse order. One has to scroll up from the previous step to do the last one. No problem really, just potentially a little confusing.

Floris
04-13-2003, 11:52 AM
Glad to hear it works like a charm!

The instructions don't read 'further below, you will find ...' but just 'find this code'. The order shouldn't matter.

Zelda-King
04-13-2003, 12:29 PM
Actually I've had a report of 'a few' empty emails. Mine was ok and so were others.

Floris
04-13-2003, 12:34 PM
Ask those members to forward their emails to you, and you forward it to info@vBulletin.nl and I will go and check it out.

Zelda-King
04-13-2003, 12:55 PM
I just sent you one there.

Floris
04-13-2003, 01:09 PM
Wow, that is just totally empty, LOL ..
If you run the script in the admin control panel again, and only enter their name, so it just emails that user, does it work then ?

Zelda-King
04-13-2003, 01:29 PM
Checking. I've noticed that so far all reported faults are from people in Australia.

EDIT: Yes, sending a single one to a certain user still came out as blank. I forwarded you it.

EDIT 2: Two reports of emails not arriving. I wonder if that's a vBulletin thing though rather than the hack itself.

The_Cyberdemon
04-13-2003, 02:27 PM
Pretty cool, but maybe you should make it so it's a list of words, like duckweed or something. Numbers are very hard to remember

Velocd
04-13-2003, 02:30 PM
Interesting.. this may be of some use to me. ;)

Floris
04-13-2003, 02:35 PM
Today at 04:23 PM Zelda-King said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=381428#post381428)
Checking. I've noticed that so far all reported faults are from people in Australia.

EDIT: Yes, sending a single one to a certain user still came out as blank. I forwarded you it.

EDIT 2: Two reports of emails not arriving. I wonder if that's a vBulletin thing though rather than the hack itself.

It uses vBmail(); function - the normal one from email.php - so I consider it a vb 2.3.0 thing : Report it to vbulletin.com ?


Today at 05:21 PM The_Cyberdemon said this in Post #13 (https://vborg.vbsupport.ru/showthread.php?postid=381447#post381447)
Pretty cool, but maybe you should make it so it's a list of words, like duckweed or something. Numbers are very hard to remember

You can alter the code fairly easy - I have chosen to use random numbers. Glad you like the hack.

Today at 05:24 PM Velocd said this in Post #14 (https://vborg.vbsupport.ru/showthread.php?postid=381449#post381449)
Interesting.. this may be of some use to me. ;)

It is especially handy after boards get hacked, upgraded and stuff got corrupted, imports from other forum software, etc.

Dean C
04-13-2003, 03:40 PM
Excellent idea floris :)

- miSt

Floris
04-13-2003, 04:23 PM
The idea was by cary, as stated in the .txt file.

Zelda-King
04-13-2003, 08:01 PM
Hmm... quite a few blank emails. Not all from Australia either. Still, I didn't really think that had anything to do with it.

I made a poll on my board so I can get a ratio.

Floris
04-13-2003, 08:03 PM
Good
Can you re-upload the normail 2.3.0 email.php and email those users something and see if it still happens ?

Zelda-King
04-13-2003, 08:26 PM
OK, I did that. The email wasn't blank.

Floris
04-13-2003, 08:28 PM
Then we can conclude it is due to alternation :>

Zelda-King
04-13-2003, 08:30 PM
Well, the hacked email file is fine too. It's just when I apply the password change.

As for those that got NO email, they got one fine when I just sent a regular email, even WITH the hacked file... so it's something to do with applying the password reset.

So do you want me to send more blank emails or do you just need the one example?

Boofo
04-13-2003, 09:31 PM
Do we need to change anything to get this to work on 2.2.9?

Zelda-King
04-13-2003, 10:26 PM
Update: Even with a virgin email.php file some users aren't found by a user search so that's why emails weren't arriving. (I'd only tested one name before). Still, one user did get an email where they didn't before. :/

Conclusion: The 'emails not arriving' problem is mainly to do with vBulletin, not the hack.

Bison
04-14-2003, 06:26 AM
Yesterday at 06:25 PM Boofo said this in Post #23 (https://vborg.vbsupport.ru/showthread.php?postid=381687#post381687)
Do we need to change anything to get this to work on 2.2.9?

Forget it Boofo,

this function "vBmail()" in email.php file is in vb 2.30, not 2.29.

This hack seems to be dependent on that function to work. The line in email.php v2.29 that comes close to this begins with $mail ... I had to completely re-write filburt's latest 2.30 hack to get it to work in 2.29!

Zelda-King
04-14-2003, 07:32 AM
Update on my poll situation. So far, out of 26 votes 23 say they had blank emails. I was one of the 3 that didn't.

Floris
04-14-2003, 11:36 AM
Weird - well, the number is gladly low enough to change them manually.

I hope Cary can enlight us if he has the same issues, he is doing a big board.

Zelda-King
04-14-2003, 03:31 PM
Yeah, I don't trust poll statistics anyway. It tends to be those that have the trouble that feel inclined to respond to posts.

Floris
04-20-2003, 11:55 PM
Version 1.10 is out, which is actually a bug fix.
Maybe this also solves your blank email problem. (Could also be that vBmail(); can't handle more then 200 emails per page, max!@! Each user it emails, it also does a query, so lower it to like 30 users per page to avoid timeout errors and maybe blank emails)

Zelda-King
04-21-2003, 01:03 AM
I see no upgrade instructions. Only instructions for a fresh install.

Is too tired to work it out at the moment. Will probably do that later. :)

Floris
04-21-2003, 10:39 AM
The upgrade instructions say 'run step 3, f'.

This is , find a line, and add some text above it. Thaz all :)