Welcome Guest, Not a member yet? Register   Sign In
XSS filtering and HTML
#1

[eluser]Ahmed Nuaman[/eluser]
Hi,

I kept getting the error:

Code:
<br />

<b>Fatal error</b>:  Call to undefined function get_instance() in <b>D:\XXXX\wwwroot

\system\libraries\Input.php</b> on line <b>855</b><br />

PHP Fatal error:  Call to undefined function get_instance() in D:\XXXX\wwwroot\system

\libraries\Input.php on line 855

I fixed it by:

Code:
function _html_entity_decode_callback($match)
    {
        /*$CI =& get_instance();
        $charset = $CI->config->item('charset');*/
        
        $CFG =& load_class('Config');
        $charset = $CFG->item('charset');

        return $this->_html_entity_decode($match[0], strtoupper($charset));
    }

I hope that's cool.
#2

[eluser]Derek Jones[/eluser]
Are you running the latest release, Ahmed? This was addressed awhile back by referencing the global $CFG.
#3

[eluser]Derek Jones[/eluser]
Sorry, I see that it was only made in the SVN and never made it to the download. Checkout the latest from the SVN and you'll be fine; we're working on buttoning up 1.6 for a release that will include this fix officially.
#4

[eluser]Ahmed Nuaman[/eluser]
I haven't got the latest release I'm afraid. I'm going to wait 'til the stable release and upgrade. Also, I've noticed a few errors with the Email class. I've had to temporally moved to PHPMailer.
#5

[eluser]Derek Jones[/eluser]
I just meant the Input file, or at least the fix therein. No need to call load_class(), see this bug report for details.

If you wouldn't mind, what errors with the Email class? Have you started a forum thread or bug report for the errors?
#6

[eluser]Ahmed Nuaman[/eluser]
Yeah I did, no one got back to me. It seems that when sending out a HTML email, our mail server sees the incoming email and reports that the headers are incorrect and then flushes it. I'm afraid I can't tell you any more than that (I think).
#7

[eluser]Derek Jones[/eluser]
If you could just point me to the threads...
#8

[eluser]Ahmed Nuaman[/eluser]
http://www.ellislab.com/forums/viewthread/69007/

Also, do you have an idea on this thread:

http://www.ellislab.com/forums/viewthread/69641/
#9

[eluser]Derek Jones[/eluser]
Thanks, I'll take a look a the email issue with you in that thread.




Theme © iAndrew 2016 - Forum software by © MyBB