Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive

Reply
 
Thread Tools
stristr error Details »»
stristr error
Version: , by Mases Mases is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-01-2012 Last Update: Never Installs: 0
 
No support by the author.

I'm getting a very similar error as was mentioned in this thread

I upgraded to ibProArcade v2.7.2+ yesterday and I'm getting this error at the top of the index page of the arcade.

Quote:
Warning: stristr() [function.stristr]: needle is not a string or an integer in [path]/arcade.php on line 5550
The arcade is functional and when I go to play the game, that error is gone. When I go to submit a high score, I see the same error, but on two consecutive lines. My high score is able to submit properly and there doesn't seem to be any noticeable issue... other than the glaring error at the top of the page.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-09-2012, 05:35 AM
gsmlover4u's Avatar
gsmlover4u gsmlover4u is offline
 
Join Date: Jan 2007
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev View Post
I have used stangger5 fix but was getting the reported issue with stristr on a customer forum.

I did the below edit, code will do the same and is simpler.

In arcade.php search for the ibp_cleansql function, search for
PHP Code:
// remove any SQL-commands 
Add below :
PHP Code:
$sqlcomm = array(); 
Then search for :
PHP Code:
$value recursive_str_ireplace($sqlcomm''$value); 
Comment it out :
PHP Code:
// $value = recursive_str_ireplace($sqlcomm, '', $value); 
Add after :
PHP Code:
    foreach ($sqlcomm AS $key => $needle)
    {
        
$value str_ireplace($needle''$value);
    } 
That does the same but is fairly simpler...

Though I must admit that Mrz fixed the 2.7.1 security issue rather uglily...
That bit of code could remove actual correct content ...
there is nothing in arcade.php
Reply With Quote
  #13  
Old 03-09-2012, 11:36 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stangger5 View Post
The security issue was s_id was allowed to be a string when it was supposed to be a int, that is what allowed the exploit.
Comments should be ok because of the way strings are put in the database.
Yeah, hence what I said he over corrected...

IMO, IBProArcade really needs a cleanup of the code one day...

Quote:
Originally Posted by gsmlover4u View Post
there is nothing in arcade.php
If you haven't installed 2.7.2 there indeed is nothing.
Reply With Quote
  #14  
Old 03-09-2012, 11:50 AM
gsmlover4u's Avatar
gsmlover4u gsmlover4u is offline
 
Join Date: Jan 2007
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i installed 2.7.2+

https://vborg.vbsupport.ru/showthrea...01554&page=442
Reply With Quote
  #15  
Old 03-09-2012, 08:41 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gsmlover4u View Post
confused
Reply With Quote
  #16  
Old 03-10-2012, 03:16 AM
gsmlover4u's Avatar
gsmlover4u gsmlover4u is offline
 
Join Date: Jan 2007
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why you confused sir
Reply With Quote
  #17  
Old 03-10-2012, 03:53 AM
stangger5's Avatar
stangger5 stangger5 is offline
 
Join Date: Jan 2005
Location: Online
Posts: 1,130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gsmlover4u View Post
Quote:
Originally Posted by gsmlover4u View Post
there is nothing in arcade.php
Quote:
Originally Posted by gsmlover4u View Post
why you confused sir
You said,,,you installed 2.7.2+ and the code below isnt in the arcade.php file..

PHP Code:
// remove any SQL-commands 
Look on line 5575 in the arcade.php file..
Reply With Quote
  #18  
Old 03-23-2012, 12:48 AM
boggseric's Avatar
boggseric boggseric is offline
 
Join Date: Sep 2009
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev View Post
I have used stangger5 fix but was getting the reported issue with stristr on a customer forum.

I did the below edit, code will do the same and is simpler.

In arcade.php search for the ibp_cleansql function, search for
PHP Code:
// remove any SQL-commands 
Add below :
PHP Code:
$sqlcomm = array(); 
Then search for :
PHP Code:
$value recursive_str_ireplace($sqlcomm''$value); 
Comment it out :
PHP Code:
// $value = recursive_str_ireplace($sqlcomm, '', $value); 
Add after :
PHP Code:
    foreach ($sqlcomm AS $key => $needle)
    {
        
$value str_ireplace($needle''$value);
    } 
That does the same but is fairly simpler...

Though I must admit that Mrz fixed the 2.7.1 security issue rather uglily...
That bit of code could remove actual correct content ...
I made these changes but now there error moved down one line.

Fatal error: Call to undefined function: str_ireplace() in /home/ls2com/public_html/forums/arcade.php on line 5601


2.7.2 does it now required PHP5?

my code in arcade.php
Code:
// remove any SQL-commands
	$sqlcomm = array();
	$sqlcomm[] = 'create';
	$sqlcomm[] = 'database';
	$sqlcomm[] = 'table';
	$sqlcomm[] = 'insert';
	$sqlcomm[] = 'update';
	$sqlcomm[] = 'rename';
	$sqlcomm[] = 'replace';
	$sqlcomm[] = 'select';
	$sqlcomm[] = 'handler';
	$sqlcomm[] = 'delete';
	$sqlcomm[] = 'truncate';
	$sqlcomm[] = 'drop';
	$sqlcomm[] = 'where';
	$sqlcomm[] = 'or';
	$sqlcomm[] = 'and';
	$sqlcomm[] = 'values';
	$sqlcomm[] = 'set';
	$sqlcomm[] = 'password';
	$sqlcomm[] = 'salt';
	$sqlcomm[] = 'concat';
	$sqlcomm[] = 'schema';
	// $value = recursive_str_ireplace($sqlcomm, '', $value);
	foreach ($sqlcomm AS $key => $needle) 
    { 
        $value = str_ireplace($needle, '', $value); 
    }
Reply With Quote
  #19  
Old 03-24-2012, 04:03 PM
hohleweg's Avatar
hohleweg hohleweg is offline
 
Join Date: Oct 2005
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey
Quote:
function ibp_cleansql($value)
{
if( get_magic_quotes_gpc() )
{
$value = stripslashes( $value );
}
//check if this function exists
if( function_exists( "mysql_real_escape_string" ) )
{
$value = mysql_real_escape_string( $value );
}
//for PHP version < 4.3.0 use addslashes
else
{
$value = addslashes( $value );
}

// remove any SQL-commands
$sqlcomm = array();
$sqlcomm[] = 'create';
$sqlcomm[] = 'database';
$sqlcomm[] = 'table';
$sqlcomm[] = 'insert';
$sqlcomm[] = 'update';
$sqlcomm[] = 'rename';
$sqlcomm[] = 'replace';
$sqlcomm[] = 'select';
$sqlcomm[] = 'handler';
$sqlcomm[] = 'delete';
$sqlcomm[] = 'truncate';
$sqlcomm[] = 'drop';
$sqlcomm[] = 'where';
$sqlcomm[] = 'or';
$sqlcomm[] = 'and';
$sqlcomm[] = 'values';
$sqlcomm[] = 'set';
$sqlcomm[] = 'password';
$sqlcomm[] = 'salt';
$sqlcomm[] = 'concat';
$sqlcomm[] = 'schema';
//$value = recursive_str_ireplace($sqlcomm, '', $value);
foreach ($sqlcomm AS $key => $needle)
{
$value = str_ireplace($needle, '', $value);
}
return $value;
}
with this code it work fine!
Greetings Jo
Reply With Quote
  #20  
Old 03-29-2012, 10:23 PM
silpher silpher is offline
 
Join Date: Nov 2010
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev View Post
I have used stangger5 fix but was getting the reported issue with stristr on a customer forum.

I did the below edit, code will do the same and is simpler.

In arcade.php search for the ibp_cleansql function, search for
PHP Code:
// remove any SQL-commands 
Add below :
PHP Code:
$sqlcomm = array(); 
Then search for :
PHP Code:
$value recursive_str_ireplace($sqlcomm''$value); 
Comment it out :
PHP Code:
// $value = recursive_str_ireplace($sqlcomm, '', $value); 
Add after :
PHP Code:
    foreach ($sqlcomm AS $key => $needle)
    {
        
$value str_ireplace($needle''$value);
    } 
That does the same but is fairly simpler...

Though I must admit that Mrz fixed the 2.7.1 security issue rather uglily...
That bit of code could remove actual correct content ...
Thanks, that worked for me
Reply With Quote
  #21  
Old 04-14-2012, 05:11 PM
CristianoDiaz CristianoDiaz is offline
 
Join Date: Jun 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev View Post
I have used stangger5 fix but was getting the reported issue with stristr on a customer forum.

I did the below edit, code will do the same and is simpler.

In arcade.php search for the ibp_cleansql function, search for
PHP Code:
// remove any SQL-commands 
Add below :
PHP Code:
$sqlcomm = array(); 
Then search for :
PHP Code:
$value recursive_str_ireplace($sqlcomm''$value); 
Comment it out :
PHP Code:
// $value = recursive_str_ireplace($sqlcomm, '', $value); 
Add after :
PHP Code:
    foreach ($sqlcomm AS $key => $needle)
    {
        
$value str_ireplace($needle''$value);
    } 
That does the same but is fairly simpler...

Though I must admit that Mrz fixed the 2.7.1 security issue rather uglily...
That bit of code could remove actual correct content ...
Thank you! This fixed the problem for me, it's been driving me nuts.
Reply With Quote
Reply

Thread Tools

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 07:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06796 seconds
  • Memory Usage 2,365KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (21)bbcode_php
  • (12)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete