X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=user_guide%2Fhelpers%2Fsecurity_helper.html;fp=user_guide%2Fhelpers%2Fsecurity_helper.html;h=e0cace3252eae19416289c945fb075dc826ed125;hb=6d8f5b56b237767344bc4a283b4093e6d6f1a612;hp=0000000000000000000000000000000000000000;hpb=0f67329ebdddeb59a2b6b79aedb1fce421378ca8;p=living-lab-site.git diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html new file mode 100755 index 0000000..e0cace3 --- /dev/null +++ b/user_guide/helpers/security_helper.html @@ -0,0 +1,132 @@ + + + + + +Security Helper : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 2.0.2

+
+ + + + + + + + + +
+ + +
+ + + +
+ + +

Security Helper

+ +

The Security Helper file contains security related functions.

+ + +

Loading this Helper

+ +

This helper is loaded using the following code:

+$this->load->helper('security'); + +

The following functions are available:

+ + +

xss_clean()

+ +

Provides Cross Site Script Hack filtering. This function is an alias to the one in the +Input class. More info can be found there.

+ + +

sanitize_filename()

+ +

Provides protection against directory traversal. This function is an alias to the one in the +Security class. More info can be found there.

+ + +

do_hash()

+ +

Permits you to create SHA1 or MD5 one way hashes suitable for encrypting passwords. Will create SHA1 by default. Examples:

+ + +$str = do_hash($str); // SHA1
+
+$str = do_hash($str, 'md5'); // MD5 +
+ +

Note: This function was formerly named dohash(), which has been deprecated in favour of do_hash().

+ + + +

strip_image_tags()

+ +

This is a security function that will strip image tags from a string. It leaves the image URL as plain text.

+ +$string = strip_image_tags($string); + + +

encode_php_tags()

+ +

This is a security function that converts PHP tags to entities. Note: If you use the XSS filtering function it does this automatically.

+ +$string = encode_php_tags($string); + + + + + + + +
+ + + + + + + \ No newline at end of file