Problem editing admin user

Have You Encountered Any Bug Related To The CodeFight CMS Software? Let Us Know And Help Us To Keep The CMS Clean And Bug Free.
Post Reply
eowynx
Member Neptune
Member Neptune
Posts: 7
Joined: Sun Jun 27, 2010 4:24 pm
antispam: NO

Problem editing admin user

Post by eowynx » Sun Jun 27, 2010 5:33 pm

When I've tried to edit the administrator user, putting my own e-mail and name using the backend (dont see if password can be changed?) i got the following error:

"A PHP Error was encountered

Severity: Notice

Message: Undefined property: Users::$security

Filename: helpers/security_helper.php

Line Number: 43

Fatal error: Call to a member function xss_clean() on a non-object in /home/vivelibr/public_html/0_0CI/CIcore_2_0_0/helpers/security_helper.php on line 43".

Note: After the error, I'm browsing back to the edition of the user and the changes seem to be correctely saved.

eowynx
Member Neptune
Member Neptune
Posts: 7
Joined: Sun Jun 27, 2010 4:24 pm
antispam: NO

Re: Problem editing admin user

Post by eowynx » Sun Jun 27, 2010 5:35 pm

Correction: the data was not updated at all

dbashyal
Site Admin
Posts: 30
Joined: Mon May 21, 2007 10:35 pm
antispam: NO
Contact:

Re: Problem editing admin user

Post by dbashyal » Sun Jun 27, 2010 7:50 pm

That was CI 2.0 bug, which I didn't knew before as it was working fine in previous version and have fixed in new one, which is yet to release.

It can be fixed by adding:

Code: Select all

$this->load->library('security');
to a page, or can be globally turned on at: app/admin/config

Code: Select all

$config['global_xss_filtering'] = TRUE;
Thanks for notifying again!

eowynx
Member Neptune
Member Neptune
Posts: 7
Joined: Sun Jun 27, 2010 4:24 pm
antispam: NO

Re: Problem editing admin user

Post by eowynx » Mon Jun 28, 2010 3:26 pm

Copied the line you say for admin/config at admin/config/config.php but still receiving the same error:
'A PHP Error was encountered

Severity: Notice

Message: Undefined property: Users::$security

Filename: helpers/security_helper.php

Line Number: 43

Fatal error: Call to a member function xss_clean() on a non-object in /home/vivelibr/public_html/0_0CI/CIcore_2_0_0/helpers/security_helper.php on line 43'

on trying to edit+update the user.

Regards :)

eowynx
Member Neptune
Member Neptune
Posts: 7
Joined: Sun Jun 27, 2010 4:24 pm
antispam: NO

Re: Problem editing admin user

Post by eowynx » Mon Jun 28, 2010 3:29 pm

Right now modified this file: app/admin/config/autoload.php adding 'security' to the loaded libraries.

Doing this the administrator seems to update the data ok, my question is:

This autoloaded libraries will also load in the front-end? Cause my idea is to get the front-end so light as possible :)

Thanks again :)

dbashyal
Site Admin
Posts: 30
Joined: Mon May 21, 2007 10:35 pm
antispam: NO
Contact:

Re: Problem editing admin user

Post by dbashyal » Mon Jun 28, 2010 3:42 pm

admin and frontend have separate autoload.php

You added on admin, so it will be loaded on admin pages only.

Post Reply