Skip to content

Chris' Laboratory

chrislee.kr – Personal blog as bookshelves

Menu
  • Home
  • Github
  • Contact Me
Menu

Upgrade to Codeigniter 2.0

Posted on 27/04/201111/09/2016 by Chris Lee
Read Time:58 Second

$this->input->xss_clean();

In codeigniter 2.0, you will need to modify $this->input->xss_clean() to $this->secuirty->xss_clean(). Otherwise, it won’t work. Of course, don’t forget to load ‘security’ library before you use the function.

extends Controller or extends Model

You will need to change

class Test extends Controller

to

class Test extends CI_Controller

And

class Test extends Model

to

class Test extends CI_Model

 

Constructors and parent constructors

class Test extends CI_Controller{
function Test(){
parent::Controller();
}
}

to

class Test extends CI_Controller{
function __construct(){
parent::__construct();
}
}

 

CSRF Protection
If you are using ‘form_open()’ for all form elements, then it will generate a hidden CSRF field and works well.

Here is good tutorial “Protect a CodeIgniter Application Against CSRF”: http://net.tutsplus.com/tutorials/php/protect-a-codeigniter-application-against-csrf/

And here is good tutorial for jQuery AJAX, which can be pain to fix it: “CodeIgniter CSRF Protection With Ajax” http://ericlbarnes.com/blog/post/codeigniter_csrf_protection_with_ajax

Well, it looks like many people suffering with CSRF ignorance problem: http://codeigniter.com/forums/viewthread/186026/

Share

Facebook
Twitter
LinkedIn
Email

Related

1 thought on “Upgrade to Codeigniter 2.0”

  1. Mehmood says:
    04/08/2011 at 12:45 am

    Thanks for the $this->security->xss_clean() tip. It should have been documented in the Codeigniter’s online documentation.

    Loading...
    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

  • Adobe Flex (2)
  • Android (20)
  • Angular (ngx) (3)
  • Arduino (2)
  • Codeigniter (6)
  • CSS (5)
  • Django (2)
  • Docker (5)
  • E-Commerce (6)
  • Finance (2)
  • General Documents (15)
  • Google App Engine (5)
  • Helm (1)
  • iPhone (13)
  • Javascript (13)
  • Kubernetes (2)
  • Linux (13)
  • Magento (8)
  • Marketing (3)
  • MongoDB (4)
  • MS-SQL (1)
  • MySQL (6)
  • Node.js (6)
  • PHP (17)
  • Platforms (1)
  • Raspberry Pi (5)
  • React Native (4)
  • React.js/Next.js (2)
  • Samsung Smart TV (4)
  • Security (17)
  • Sencha Touch (4)
  • Server (31)
  • SVN (7)
  • Terraform (1)
  • Tools (7)
  • Uncategorized (1)
  • VirtualBox (1)
  • Vue.js (1)
  • Web Development (7)
  • WordPress (4)
  • Yii2 (3)

Search

Recent Posts

  • Gitlab Helm upgrade failed to register Gitlab runner 403 Forbidden
  • Run docker-dind and docker in Kubernetes cluster
  • Next.js Tutorial – Setting up your database in your local development environment
  • helm list error stream ID 3; INTERNAL_ERROR
  • Bootstrapping Kubernetes cluster with kubeadm

Recent Comments

  • Vadim on Alpine – Plugin caching_sha2_password could not be loaded
  • Andris on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Obayed on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Ari on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Mida ali on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins

Tags

1 ajax amazon android android-addpart browser chrislee-kr codeigniter codeigniter-tcpdf com-apple-net-racoon CSS CSS history hack delpaigmail-com entity-addpart-double exception-printing-is-disabled-by-default-for-security-reasons ext-plugins-listpagingplugin ext-plugins-listpagingplugin-example f iphone javascript jquery-defaultchecked jquery-samsung-smart-tv listpagingplugin mac magento-exception-printing-is-disabled-by-default-for-security-reasons magento-sample-data-exception-printing-is-disabled-by-default-for-security-reasons nu-vot null-core-errors-confignotfound-config-mk9engine-ini php samsung-smart-tv-jquery samsung-smart-tv-sdk-ajax samsung-smart-tv-sdk-jquery samsung-tv-sdk samsung-tv-sdk-jquery samsung tv sencha-smart-tv sencha-touch-list-paging smart-tv-jquery sqlite subversion svn tcedook tcpdf-codeigniter uilinebreakmodecharacterwrap-is-deprecated unknown-column-link-area

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 Chris' Laboratory | Powered by Minimalist Blog WordPress Theme
%d