Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1603

PostPosted: Sun Dec 22, 2019 3:55 am Reply with quote

Doulos wrote:
Another one:
Code:
[21-Dec-2019 18:18:45 America/Chicago] PHP Warning:  array_keys() expects parameter 1 to be array, string given in /home/meme/public_html/modules/Your_Account/public/new_confirm.php on line 159


Thanks, try to replace this file.

_________________
Github: RavenNuke  
View user's profile Send private message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 710

PostPosted: Sun Dec 22, 2019 5:01 pm Reply with quote

I think that did it. Thanks.
 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1024
Location: Netherland

PostPosted: Sun Dec 22, 2019 5:57 pm Reply with quote

Code:
   // strip out link code here (added back in later if saved)

   $ShoutComment = $row['comment'];
   $ShoutComment = preg_replace("[<a rel=\"nofollow\" target=\"_blank\" href=\"", "",$ShoutComment);
   $ShoutComment = preg_replace("[<a rel=\"nofollow\" href=\"", "",$ShoutComment);
   $ShoutComment = preg_replace("[<a target=\"_blank\" href=\"", "",$ShoutComment);
   $ShoutComment = preg_replace("[<a href=\"", "",$ShoutComment);
   $ShoutComment = preg_replace("\">URL</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">FTP</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">IRC</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">TeamSpeak</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">AIM</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">Gopher</a>]", "",$ShoutComment);
   $ShoutComment = preg_replace("\">E-Mail</a>]", "",$ShoutComment);

   $i = 0;
   $ShoutNew = '';
   $ShoutArray = explode(" ",$ShoutComment);
   foreach($ShoutArray as $ShoutPart) {
      

if (preg_replace("mailto:", $ShoutPart)) { // find mailto:
         $ShoutPart = str_replace("mailto:", "",$ShoutPart); // strip out mailto:
         $ShoutPart = str_replace("%", " ",$ShoutPart);
         $ShoutPart = trim($ShoutPart);
         // decode address to ascii
         $c = 0;
         $AddyArray = explode(" ",$ShoutPart);
         foreach($AddyArray as $AddyPart) {
            $AddyNew[$c] = chr(hexdec($AddyPart));
            $c++;
         }
         $ShoutPart = implode("",$AddyNew);
         $ShoutNew[$i] = "mailto:$ShoutPart"; // add mailto: back in
      } else { $ShoutNew[$i] = $ShoutPart; }
      $i++;
   }
   $ShoutComment = implode(" ",$ShoutNew);



Guys I am getting these errors I wasn't getting before because I thought I fixed them but they are coming back again.

Code:
Warning: preg_replace(): No ending delimiter '&' found in /modules/Shout_Box/admin/index.php on line 501


Warning: preg_replace(): No ending delimiter '&' found in /modules/Shout_Box/admin/index.php on line 502

Warning: preg_replace(): No ending delimiter '&' found in /modules/Shout_Box/admin/index.php on line 503

Warning: preg_replace(): No ending delimiter '&' found in /modules/Shout_Box/admin/index.php on line 504

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 505

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 506

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 507

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 508

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 509

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php on line 510

Warning: preg_replace(): No ending delimiter '"' found in /modules/Shout_Box/admin/index.php 511

Warning: preg_replace() expects at least 3 parameters, 2 given in /modules/Shout_Box/admin/index.php on line 517

Warning: Cannot assign an empty string to a string offset in /modules/Shout_Box/admin/index.php on line 530

Warning: implode(): Invalid arguments passed in /modules/Shout_Box/admin/index.php on line 533
 
View user's profile Send private message Visit poster's website
neralex







PostPosted: Sun Dec 22, 2019 6:31 pm Reply with quote

hicuxunicorniobestbuildpc, you could start with this: [ Only registered users can see links on this board! Get registered or login! ]
 
hicuxunicorniobestbuildpc







PostPosted: Mon Dec 23, 2019 8:35 pm Reply with quote

Well I did replace them and as a result I didn't get anymore error.

Code:
   // strip out link code here (added back in later if saved)

   $ShoutComment = $row['comment'];
   $ShoutComment = str_replace("[<a rel=\"nofollow\" target=\"_blank\" href=\"", "",$ShoutComment);
   $ShoutComment = str_replace("[<a rel=\"nofollow\" href=\"", "",$ShoutComment);
   $ShoutComment = str_replace("[<a target=\"_blank\" href=\"", "",$ShoutComment);
   $ShoutComment = str_replace("[<a href=\"", "",$ShoutComment);
   $ShoutComment = str_replace("\">URL</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">FTP</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">IRC</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">TeamSpeak</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">AIM</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">Gopher</a>]", "",$ShoutComment);
   $ShoutComment = str_replace("\">E-Mail</a>]", "",$ShoutComment);

   $i = 0;
   $ShoutNew = '';
   $ShoutArray = explode(" ",$ShoutComment);
   foreach($ShoutArray as $ShoutPart) {
      if (preg_replace("mailto:", $ShoutPart)) { // find mailto:
         $ShoutPart = str_replace("~mailto~:", "",$ShoutPart); // strip out mailto:
         $ShoutPart = str_replace("~%~", " ",$ShoutPart);
         $ShoutPart = trim($ShoutPart);
         // decode address to ascii
         $c = 0;
         $AddyArray = explode(" ",$ShoutPart);
         foreach($AddyArray as $AddyPart) {
            $AddyNew[$c] = chr(hexdec($AddyPart));
            $c++;
         }
         $ShoutPart = implode("",$AddyNew);
         $ShoutNew[$i] = "mailto:$ShoutPart"; // add mailto: back in
      } else { $ShoutNew[$i] = $ShoutPart; }
      $i++;
   }
   $ShoutComment = implode(" ",$ShoutNew);
 
Doulos







PostPosted: Sat Dec 28, 2019 3:45 pm Reply with quote

I was thinking about posting that I hadn't had any Warnings for a week then I saw this one:
Code:
PHP Notice:  Undefined variable: perpage in /home/meme/public_html/admin/modules/nukesentinel/ABTrackedUsersPages.php on line 23
 
Doulos







PostPosted: Mon Dec 30, 2019 8:56 pm Reply with quote

I finally was able to track the following Warning:
Code:
[30-Dec-2019 14:10:10 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479

[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:15 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:15 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:15 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:16 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:16 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:17 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:17 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:17 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:17 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:18 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:18 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:19 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:22 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:22 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:23 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:23 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:23 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:23 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:23 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:24 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:24 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:24 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:24 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:25 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:25 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:26 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:26 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:26 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:27 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:27 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:27 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:28 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:28 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:28 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479

To a NukeSentinel Abuse-Script attempt. This is the only thing I see that happened at 14:10. Here is the email I got:
Code:
Created By: NukeSentinel(tm) 2.6.03

Date &amp; Time: 2019-12-30 14:10:28 CST GMT -0600
Blocked IP: 34.69.254.105
User ID: Anonymous (1)
Reason: Abuse-Script
--------------------
Referer: https://www.meme.com/modules.php?name="><script >alert(String.fromCharCode(88,83,83))</script>
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Rv:50.0) Gecko/20100101 Firefox/50.0
HTTP Host: [ Only registered users can see links on this board! Get registered or login! ]
Script Name: /modules.php
Query String: name="><script >alert(String.fromCharCode(88,83,83))</script>
Get String: &name="><script+>alert(String.fromCharCode(88,83,83))</script>
Post String: Not Available
Forwarded For: none
Client IP: none
Remote Address: 34.69.254.105
Remote Port: 53509
Request Method: GET
 
hicuxunicorniobestbuildpc







PostPosted: Tue Jan 07, 2020 5:40 am Reply with quote

strpos() or strstr() instead as they will be faster.
 
neralex







PostPosted: Tue Jan 07, 2020 1:28 pm Reply with quote

hicuxunicorniobestbuildpc wrote:
strpos() or strstr() instead as they will be faster.


Not sure what do you mean but your script is not a part of the RN core, so feel free to use what do you want.
 
neralex







PostPosted: Tue Jan 07, 2020 1:31 pm Reply with quote

Doulos wrote:
I finally was able to track the following Warning:
Code:


[30-Dec-2019 14:10:11 America/Chicago] PHP Warning:  preg_match(): Unknown modifier 't' in /home/clanfga/public_html/includes/nukesentinel.php on line 479
[30-Dec-2019 14:10:15 America/Chicago] PHP Warning:  preg_match(): Unknown modifier '.' in /home/clanfga/public_html/includes/nukesentinel.php on line 479

To a NukeSentinel Abuse-Script attempt. This is the only thing I see that happened at 14:10. Here is the email I got:
Code:
Created By: NukeSentinel(tm) 2.6.03

Date &amp; Time: 2019-12-30 14:10:28 CST GMT -0600
Blocked IP: 34.69.254.105
User ID: Anonymous (1)
Reason: Abuse-Script
--------------------
Referer: https://www.meme.com/modules.php?name="><script >alert(String.fromCharCode(88,83,83))</script>
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Rv:50.0) Gecko/20100101 Firefox/50.0
HTTP Host: [ Only registered users can see links on this board! Get registered or login! ]
Script Name: /modules.php
Query String: name="><script >alert(String.fromCharCode(88,83,83))</script>
Get String: &name="><script+>alert(String.fromCharCode(88,83,83))</script>
Post String: Not Available
Forwarded For: none
Client IP: none
Remote Address: 34.69.254.105
Remote Port: 53509
Request Method: GET


This can not be fixed at all because it is based on the incorrect input string. Something like this can not work and as long the sentinel has it blocked, then is all fine.
 
Doulos







PostPosted: Tue Jan 07, 2020 2:49 pm Reply with quote

Thanks, nerelax.
 
Doulos







PostPosted: Tue Jan 07, 2020 2:52 pm Reply with quote

Doulos wrote:
I was thinking about posting that I hadn't had any Warnings for a week then I saw this one:
Code:
PHP Notice:  Undefined variable: perpage in /home/meme/public_html/admin/modules/nukesentinel/ABTrackedUsersPages.php on line 23


I fixed this on my local copy but did you do so on the git depository? Will my local Git Desktop copy be overwritten the next time I pull changes from your Git depository?
 
neralex







PostPosted: Wed Jan 08, 2020 12:37 am Reply with quote

Please post this single code-line here in this thread.

Maybe something like this:

php Code:
if($perpage == '' || $perpage == 0) { $perpage = 25; }
 
Doulos







PostPosted: Wed Jan 08, 2020 5:04 am Reply with quote

By "I fixed this" I mean that I did something that was recommended by a google search of how to declare a variable, not that what I did was the correct thing to do. As I have said many times, I am a user not a programmer. I waited a few days to see if you would address it then tried Google. What I did stopped the warning. Is what you posted the appropriate way to resolve the issue?

All I did was add this above line 23
Code:
$perpage = '';
 
neralex







PostPosted: Wed Jan 08, 2020 6:33 am Reply with quote

I re-checked the functions and...

php Code:
//$perpage = $ab_config['track_perpage'];

if($perpage == 0) { $perpage = 25; }

The first line is commented out but this line is declaring the variable normally:

php Code:
$perpage = $ab_config['track_perpage'];


There are two options in the sentinel administration, where you can set the number of IP's to list per page on the Tracked IP's pages and the number of IP's to list per page on the Blocked IP's pages.

Tracked IP's: $ab_config['track_perpage']
Blocked IP's: $ab_config['block_perpage']

But there is no option for the tracked users pages and also no related field in the database. I guess this was the reason why someone of the old DEV-team has commented out this line. So we have now two ways to solve it.

1. We are using the input-data from the Tracked IP's option and can control it with the sentinel-administration:

php Code:
$perpage = $ab_config['track_perpage'];

if($perpage == 0) { $perpage = 25; }


2. Or we are defining the default-value for this variable hard-coded in the file:

php Code:
if(!isset($perpage)) $perpage = 0;

if($perpage == 0) { $perpage = 25; }


What do you think?
 
Doulos







PostPosted: Sun Jan 12, 2020 1:40 am Reply with quote

I hope you weren't asking me what I think. I have no idea - I use you for ideas, and, thanks for that.
 
neralex







PostPosted: Mon Jan 13, 2020 11:39 am Reply with quote

Yes, I was! Wink
 
Doulos







PostPosted: Wed Jan 15, 2020 4:26 am Reply with quote

I hate to be a pest, but ...
Quote:
PHP Notice: Undefined offset: 1 in /home/clanfga/public_html/modules/Your_Account/index.php on line 261
 
neralex







PostPosted: Wed Jan 15, 2020 1:23 pm Reply with quote

Doulos wrote:
I hate to be a pest, but ...
Quote:
PHP Notice: Undefined offset: 1 in /home/clanfga/public_html/modules/Your_Account/index.php on line 261

[ Only registered users can see links on this board! Get registered or login! ]
 
neralex







PostPosted: Wed Jan 15, 2020 1:23 pm Reply with quote

Doulos wrote:
I was thinking about posting that I hadn't had any Warnings for a week then I saw this one:
Code:
PHP Notice:  Undefined variable: perpage in /home/meme/public_html/admin/modules/nukesentinel/ABTrackedUsersPages.php on line 23

[ Only registered users can see links on this board! Get registered or login! ]
 
Doulos







PostPosted: Thu Jan 16, 2020 4:37 am Reply with quote

THanks.
 
Doulos







PostPosted: Sat Jan 18, 2020 11:13 pm Reply with quote

I don't remember if I've seen this on here before, but my php7.3 site is adding two apostrophes instead of one apostrophe in the forum post title. The apostrophe shows up correctly in the body. The title shows up correctly in the preview but not when it is actually posted. This occurs on my vanilla test site and on my production site - and across several different stock themes (tested it on fisubice and ravenice).



original-post.jpg
 Description:
example
 Filesize:  65.19 KB
 Viewed:  2341 Time(s)

original-post.jpg


 
neralex







PostPosted: Sun Jan 19, 2020 3:31 am Reply with quote

Looks like a database collation mismatch. Which collation you are using?
 
Doulos







PostPosted: Sat Jan 25, 2020 3:44 pm Reply with quote

neralex wrote:
Looks like a database collation mismatch. Which collation you are using?

latin1_swedish_ci

What should it be?
 
neralex







PostPosted: Mon Jan 27, 2020 12:10 pm Reply with quote

Doulos wrote:
latin1_swedish_ci

What should it be?


This was already fixed few months ago but maybe I readded the issue while rewinding some other changes in the same file.

Let us try it together...

Open: modules/Forums/includes/functions_post.php and go to the lines 193/194 and comment out the both lines like this:

php Code:
//$post_subject = $db->sql_escape_string(htmlspecialchars_decode(check_html($post_subject, 'nohtml'), ENT_QUOTES));

//$poll_title = $db->sql_escape_string(htmlspecialchars_decode(check_html($poll_title, 'nohtml'), ENT_QUOTES));


Save the file and try to change the tiltle of the topic.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©