vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   vBulliten 3.0.7 Unexistant File Edit (https://vborg.vbsupport.ru/showthread.php?t=76991)

MicroLinux? 02-24-2005 11:13 PM

vBulliten 3.0.7 Unexistant File Edit
 
Hello all, I am installing vBAdvanced Warning System (the latest in the download thread) on vBulliten 3.0.7 and when the file edit comes for private.php it tells you to do this:

Code:

In the same file, find:

                // check for valid users
                $pm['recipients'] = vbstrtolower(trim($pm['recipients']));
               
Right below that, add:

                if (!$warn_opts['collector']=='' OR !$warn_opts['collector']=='0')
                {
                        if (!$warn_opts['automatic_warner']=='')
                        {
                                $w=$warn_opts['automatic_warner'];
                                $autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                                $autowarner=vbstrtolower($autowarner['username']);
                        }
                        if (!$warn_opts['warner']=='')
                        {
                                $w=$warn_opts['warner'];
                                $warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                                $warner=vbstrtolower($warner['username']);

                        }
                        $w=$warn_opts['collector'];
                        $collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                        $collector=vbstrtolower($collector['username']);

                }

but this is the actual code in the private.php file.

Code:

                // check for valid users
                $pm['recipients'] = trim($pm['recipients']);

                if ($pm['recipients'] == '')
                {
                        eval('$errors[] = "' . fetch_phrase('pminvalidrecipient', PHRASETYPEID_ERROR) . '";');
                }
                else if (preg_match('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $pm['recipients'])) // multiple recipients attempted
                {
                        $users = preg_split('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $pm['recipients'], -1, PREG_SPLIT_NO_EMPTY);
                        foreach ($users AS $recipient)
                        {
                                $recipient = trim($recipient);
                                if ($recipient != '')
                                {
                                        $recipients["$recipient"] = addslashes(htmlspecialchars_uni($recipient));
                                }
                        }
                }

Should I just put it to make this:


Code:

                // check for valid users
                $pm['recipients'] = trim($pm['recipients']);
                if (!$warn_opts['collector']=='' OR !$warn_opts['collector']=='0')
                {
                        if (!$warn_opts['automatic_warner']=='')
                        {
                                $w=$warn_opts['automatic_warner'];
                                $autowarner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                                $autowarner=vbstrtolower($autowarner['username']);
                        }
                        if (!$warn_opts['warner']=='')
                        {
                                $w=$warn_opts['warner'];
                                $warner=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                                $warner=vbstrtolower($warner['username']);

                        }
                        $w=$warn_opts['collector'];
                        $collector=$DB_site->query_first("select username from ".TABLE_PREFIX."user where userid=$w");
                        $collector=vbstrtolower($collector['username']);

                }

                if ($pm['recipients'] == '')
                {
                        eval('$errors[] = "' . fetch_phrase('pminvalidrecipient', PHRASETYPEID_ERROR) . '";');
                }
                else if (preg_match('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $pm['recipients'])) // multiple recipients attempted
                {
                        $users = preg_split('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $pm['recipients'], -1, PREG_SPLIT_NO_EMPTY);
                        foreach ($users AS $recipient)
                        {
                                $recipient = trim($recipient);
                                if ($recipient != '')
                                {
                                        $recipients["$recipient"] = addslashes(htmlspecialchars_uni($recipient));
                                }
                        }
                }

Thanks, Travis.




EDIT: I just ignored the difference and pasted it where it should have. I dont notice any errors yet. =D

TruthElixirX 02-25-2005 12:03 AM

I did the same thing and haven't noticed any errors yet either. So I don't think it matters.

Delphiprogrammi 02-25-2005 07:20 PM

same here private.php didn't changed in the latest vb release however be sure you have the security patch for the XSS exploit in private php see announcements forum here for a list of files that has been changed in vb3.0.7 you can go here


All times are GMT. The time now is 04:42 PM.

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.01024 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete