In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "what are the CodeIgniter security-related settings", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the CodeIgniter security-related settings"?
The CodeIgniter framework itself provides some security settings, such as protection against XSS and CSRF attacks, defense against SQL injection attacks and so on.
As far as the profile is concerned:
In application/config/config.php
$config ['encryption_key'] =''; / / this must be set to encrypt your own cookie, etc. $config ['cookie_secure'] = TRUE / / set to TRUE/* |-| Global XSS Filtering global XSS filtering is set to TRUE | -| | Determines whether the XSS filter is always active when GET | POST or | COOKIE data is encountered | * / $config ['global_xss_filtering'] = TRUE / / prevent csrf attacks $config ['csrf_protection'] = TRUE;$config [' csrf_token_name'] = 'mall_tooken';$config [' csrf_cookie_name'] = 'mall_cookie';$config [' csrf_expire'] = 7200 / set the appropriate time
Open system/core/Input.php
Set the $xss_clean in the get and post methods to true. Of course, if your site is secure, don't set it or explicitly set it when you call get or post to get the parameters.
You need to pay attention to:
1. Use
$this- > input- > get ('name', true)
Instead of using $_ GET ['name']
two。 Use
$this- > input- > post ('name', true)
Instead of using $_ POST ['name']
3. Use ActiveRecord query statements instead of statements such as select
At this point, I believe you have a deeper understanding of "what are the CodeIgniter security-related settings"? you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
This article mainly explains "how to achieve the tag navigation effect of Ajax". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Ajax how to achieve tag navigation effect" bar! The code is as follows:
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.