Wiki articles tagged with "security"

Showing 1-20 of 24 items.

Moving project code outside of webroot (plus multiple project support)

Created 10 years ago by Steve Friedl, updated 9 years ago by Steve Friedl.

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 59 746 times
Version: 1.1
Category: How-tos

Mais segurança em suas aplicações com Yii e PHPIDS

Created 10 years ago by Rafael Garcia, updated 10 years ago by Rafael Garcia.

PHPIDS é conhecido projeto que pode ser visto em php-ids.org.

2 1
3 followers
Viewed: 10 924 times
Version: 1.1
Category: How-tos

More security in your applications with Yii and PHPIDS

Created 10 years ago by Rafael Garcia, updated 10 years ago by Gustavo.

PHPIDS is a well known project that can be found in php-ids.org.

6 0
14 followers
Viewed: 18 005 times
Version: 1.1
Category: How-tos

Getting to Understand Hierarchical RBAC Scheme

Created 10 years ago by daemons, updated 6 years ago by rAWTAZ.

Authentication and Authorization is a good tutorial. Among other topics, it describes basic aspects of Yii's RBAC implementation. But however hard I read the tutorial, I couldn't understand how exactly the hierarchy works. I found how to define authorization hierarchy, how business rules are evaluated, how to configure a...

47 0
57 followers
Viewed: 116 783 times
Version: 1.1
Category: Tutorials

Configuring controller access rules to default-deny

Created 10 years ago by Steve Friedl, updated 7 years ago by nsanden.

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 followers
Viewed: 99 266 times
Version: 1.1
Category: How-tos

Logout CSRF Protection

Created 10 years ago by Rodrigo Coelho, updated 10 years ago by Rodrigo Coelho.

CSRF is the acronymn for Cross-site request forgery.
It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

10 0
11 followers
Viewed: 24 851 times
Version: 1.1
Category: Tutorials

[PT-BR] Proteção Contra Logout CSRF

Created 10 years ago by Rodrigo Coelho, updated 10 years ago by Rodrigo Coelho.

CSRF é o acrônimo para Cross-site request forgery.
CSRF é um ataque que forca o usuário a executar ações não desejadas numa aplicação Web na qual ele está autenticado.

2 1
3 followers
Viewed: 11 563 times
Version: 1.1
Category: Tutorials

Force a User to Change Their Password (ChangePasswordFilter)

Created 9 years ago by waterloomatt, updated 9 years ago by waterloomatt.

Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

14 0
10 followers
Viewed: 25 107 times
Version: 1.1
Category: Tutorials

Authenticating against phpass hashes with Yii

Created 9 years ago by Da:Sourcerer, updated 7 years ago by Da:Sourcerer.
  • 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 followers
Viewed: 35 550 times
Version: 1.1
Category: How-tos

Yii Security-extended guide

Created 9 years ago by bingjie2680, updated 9 years ago by bingjie2680.

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 followers
Viewed: 26 413 times
Version: 1.1
Category: Tips

How to write secure Yii1 applications

Created 9 years ago by François Gannaz, updated a month ago by François Gannaz.
  • 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 followers
Viewed: 288 745 times
Version: 1.1
Category: How-tos

Simple authorization system

Created 9 years ago by Gustavo, updated 8 years ago by Gustavo.

How to create a simple (non-RBAC) authorization system

14 0
17 followers
Viewed: 41 058 times
Version: 1.1
Category: How-tos

Secure password hash storage and a Yii helper extension

Created 9 years ago by fsb, updated 7 years ago by fsb.

This wiki has been replaced by Use crypt() for password storage.

13 0
13 followers
Viewed: 35 392 times
Version: 1.1
Category: Tutorials

Secure password hashing with bCrypt

Created 9 years ago by waitforit, updated 8 years ago by Ivo Pereira.

In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.

5 0
9 followers
Viewed: 31 896 times
Version: 1.1
Category: How-tos

Show captcha after <N> unsuccessfull attempts

Created 9 years ago by zitter, updated 9 years ago by zitter.

In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

13 4
15 followers
Viewed: 29 419 times
Version: 1.1
Category: How-tos

ACL and RBAC

Created 8 years ago by zeroByte, updated 8 years ago by kevinkorb.

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 followers
Viewed: 25 599 times
Version: 1.1
Category: How-tos

Using phpseclib with Yii

Created 8 years ago by nkd, updated 8 years ago by nkd.

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 followers
Viewed: 16 060 times
Version: 1.1
Category: How-tos
Tags: security

Use crypt() for password storage

Created 8 years ago by fsb, updated 6 years ago by fsb.

Update: This wiki has been rewritten to be in line with Yii 1.1.14. Since many of the detailed complexities are now handled by Yii, the article focuses on how the crypt() built-in function works and why it's important to use it correctly.

15 0
21 followers
Viewed: 125 894 times
Version: 1.1
Category: Tutorials

Checking for "expired" sessions/logins on the client side

Created 8 years ago by le_top, updated 6 years ago by le_top.

Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

4 0
12 followers
Viewed: 31 076 times
Version: 1.1
Category: How-tos

default csrf security and ajax post in one controller

Created 7 years ago by jasonban, updated 7 years ago by CeBe.

Hello Yii friends

0 3
8 followers
Viewed: 23 542 times
Version: 1.1
Category: Tutorials