Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 12:18 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Wed Jun 06, 2007 7:05 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
try to set in php.ini

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off


reload httpd server afterwards.

Rgds, Areski


Top
 Profile  
 
 Post subject: Disabling magic quotes at runtime
PostPosted: Fri Jun 15, 2007 7:02 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I have an idea Areski,

If the problem is caused by magic quote, is it possible then to use the stripslashes() function to fix it? And since magic quote cannot be changed at the runtime, this will affect everything else on the apache server that needs magic quote.

Here is a function that will make any script act as if magic_quote_gpc was disabled:

Code:
<?php
if (get_magic_quotes_gpc()) {
    function stripslashes_deep($value)
    {
        $value = is_array($value) ?
                    array_map('stripslashes_deep', $value) :
                    stripslashes($value);

        return $value;
    }

    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
    $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
}
?>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 9:12 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
Great !
Could u make a patch and test it !?
Rgds, Areski


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 9:16 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Sure, no problem. I will let you guys know about the result.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 16, 2007 1:43 am 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
fresh trixbox 2.2 install + asterisk 1.2.18 -> first customer - created sip friend just fine. I haven't changed anything much since the install.
Customer was set up through signup page.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 2:21 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Areski, on second thought, I think that we shouldn't deactivate magic_quotes_gpc at all. Cause this may open up an opportunity for code injection. What do you think? We could use addslashes() and stripslashes() whenever we need it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 4:01 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
you are right, actually for the moment the only issue is the tariff value on the signup.
We might find a way to fix this.

Rgds, Areski


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 22, 2007 3:26 am 
Offline

Joined: Fri Jun 01, 2007 5:12 am
Posts: 41
latest install from svn is working fine. thanks for fix it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group