Showing 1-20 of 24 items.

Extension Development (beginner)

Created 12 years ago by sefburhan sefburhan, updated 12 years ago by CeBe CeBe. 2 comments

To extend the functionality of you web application relative to your requirements you are supposed to use existing yii core libraries or use external libraries. There are some steps to ensure security, uniqueness, modularity, performance and to avoid rework in future.

Step 01: Have a Strategy

  • Is my extension just for fun/demonstration purposes or for everyday use in the real world? -...

Using phpseclib with Yii

Created 13 years ago by nkd nkd, updated 13 years ago by nkd nkd. 9 comments

I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module (securityManager). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does...

0 0
6
Viewed: 23 134 times
Version: 1.1
Category: How-tos

ACL and RBAC

Created 14 years ago by zeroByte zeroByte, updated 14 years ago by kevinkorb kevinkorb. 0 comments

This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obs...

0 0
3
Viewed: 36 746 times
Version: 1.1
Category: How-tos

How to write secure Yii1 applications

Created 14 years ago by François Gannaz François Gannaz, updated 5 years ago by François Gannaz François Gannaz. 22 comments
  • Validate the user input (see below for details).
  • Protect (escape) your application output according to context (see below for a few output types, mostly HTML and SQL).
  • Test your application in debug mode.
    Set the constant YII_DEBUG to true (by default, it is defined in index.php) and put alongside error_reporting(E_ALL);. Then errors and warnings will stop the execution an...
80 0
114
Viewed: 339 258 times
Version: 1.1
Category: How-tos

Yii Security-extended guide

Created 14 years ago by bingjie2680 bingjie2680, updated 14 years ago by bingjie2680 bingjie2680. 11 comments

This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in you...

6 6
12
Viewed: 37 173 times
Version: 1.1
Category: Tips

Authenticating against phpass hashes with Yii

Created 14 years ago by Da:Sourcerer Da:Sourcerer, updated 12 years ago by Da:Sourcerer Da:Sourcerer. 18 comments
  • iteration_count_log2 controls the number of iterations for key stretching. A setting of 8 means the hash algorithm will be applied 2^8 = 256 times. This setting should be kept between 4 and 31.
  • portable_hashes controls whether portable hashes should be used or not. Portable hashes are salted MD5 hashes prefixed by $P$.
22 0
28
Viewed: 45 597 times
Version: 1.1
Category: How-tos

Configuring controller access rules to default-deny

Created 15 years ago by Steve Friedl Steve Friedl, updated 12 years ago by nsanden nsanden. 3 comments

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12
Viewed: 145 507 times
Version: 1.1
Category: How-tos