Wiki articles tagged with "security"

Showing 1-20 of 26 items.
Created 3 years ago by MadAnd, updated 3 years ago by MadAnd.

Single PHP entry point with Nginx

In this article I will show you how to slightly increase application security, by exploiting the fact that Yii implements the Front Controller Pattern.

4 0
3 followers
Viewed: 9 230 times
Version: all
Category: How-tos
Created 4 years ago by raminious, updated 4 years ago by jim..

How to hide /frontend/web in url addresses on apache

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

8 0
19 followers
Viewed: 98 154 times
Version: 2.0
Category: How-tos
Created 4 years ago by darkheir, updated 4 years ago by darkheir.

Enhance security of cookie-based login

When talking about cookie-base login the Yii guide indicates the following:

2 0
2 followers
Viewed: 11 845 times
Version: 1.1
Category: How-tos
Created 4 years ago by Kostas Apazidis (KonApaz), updated 4 years ago by Kostas Apazidis (KonApaz).

Make the authentication more securely

Suppose a hacker has an account of your website He could set the PHPSESSID to empty After of that He login in your system The PHPSESSID remains blank and user has already logged with this session

2 0
4 followers
Viewed: 8 924 times
Version: 1.1
Category: Tutorials
Created 4 years ago by Kartik V, updated 4 years ago by Kartik V.

Key web server settings after installing a fresh Yii 2 basic or advanced app

So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

2 0
46 followers
Viewed: 19 809 times
Version: 2.0
Category: Tips
Created 5 years ago by sefburhan, updated 4 years ago by CeBe.

Extension Development (beginner)

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? -...
Created 5 years ago by jasonban, updated 4 years ago by CeBe.

default csrf security and ajax post in one controller

Hello Yii friends

0 3
8 followers
Viewed: 18 831 times
Version: 1.1
Category: Tutorials
Created 5 years ago by le_top, updated 3 years ago by le_top.

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

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

4 0
11 followers
Viewed: 27 053 times
Version: 1.1
Category: How-tos
Created 6 years ago by fsb, updated 4 years ago by fsb.

Use crypt() for password storage

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
22 followers
Viewed: 107 977 times
Version: 1.1
Category: Tutorials
Created 6 years ago by nkd, updated 6 years ago by nkd.

Using phpseclib with Yii

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: 13 041 times
Version: 1.1
Category: How-tos
Tags: security
Created 6 years ago by zeroByte, updated 6 years ago by kevinkorb.

ACL and RBAC

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
4 followers
Viewed: 22 120 times
Version: 1.1
Category: How-tos
Created 6 years ago by zitter, updated 6 years ago by zitter.

Show captcha after <N> unsuccessfull attempts

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
17 followers
Viewed: 25 701 times
Version: 1.1
Category: How-tos
Created 7 years ago by waitforit, updated 6 years ago by Ivo Pereira.

Secure password hashing with bCrypt

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: 27 389 times
Version: 1.1
Category: How-tos
Created 7 years ago by fsb, updated 5 years ago by fsb.

Secure password hash storage and a Yii helper extension

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

13 0
13 followers
Viewed: 33 281 times
Version: 1.1
Category: Tutorials
Created 7 years ago by Gustavo, updated 5 years ago by Gustavo.

Simple authorization system

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

14 0
17 followers
Viewed: 37 873 times
Version: 1.1
Category: How-tos
Created 7 years ago by François Gannaz, updated 5 years ago by François Gannaz.

How to write secure Yii applications

  • 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
117 followers
Viewed: 259 503 times
Version: 1.1
Category: How-tos
Created 7 years ago by bingjie2680, updated 7 years ago by bingjie2680.

Yii Security-extended guide

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: 23 435 times
Version: 1.1
Category: Tips
Created 7 years ago by Da:Sourcerer, updated 4 years ago by Da:Sourcerer.

Authenticating against phpass hashes with Yii

  • 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: 31 526 times
Version: 1.1
Category: How-tos
Created 7 years ago by waterloomatt, updated 7 years ago by waterloomatt.

Force a User to Change Their Password (ChangePasswordFilter)

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: 21 747 times
Version: 1.1
Category: Tutorials
Created 7 years ago by Rodrigo Coelho, updated 7 years ago by Rodrigo Coelho.

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

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: 9 821 times
Version: 1.1
Category: Tutorials