Code Monkey home page Code Monkey logo

phpsecurelogin's Introduction

phpSecureLogin


I'VE ABANDONED THIS PROJECT AS MAINTAINING IT IS TAKING UP TOO MUCH OF MY TIME. IF ANYONE WANTS TO CLONE IT, OR WOULD LIKE LIKE TO BE ADDED TO THE ADMINS FOR THIS LOCATION, AND CONTINUE THE WORK (INCLUDING UPDATING THE WIKIHOW PAGE) I'D BE ONLY TOO GRATEFUL.

THE MOST OBVIOUS THING THAT NEEDS DOING IS TO CLOSE THE MASSIVE XSS HOLE IN THE REFERRALS TO THE ERROR PAGE.

I NOW CONSIDER THAT THE BEST SOLUTION IS TO USE A GOOD PHP FRAMEWORK. THE CODE IN A FRAMEWORK IS ALWAYS GOING TO BE OF HIGHER QUALITY THAN ANYTHING I COULD WRITE.

THIS EXISTING CODE IS NOT OF PRODUCTION QUALITY AND SHOULD NOT BE USED AS-IS IN A PRODUCTION SETTING


NOTE: THIS DOES WORK, BUT IT'S FAR FROM FINISHED!

A secure login module for PHP. The idea is that it should be easily plugged into any PHP project.

The base code for this project has been taken from WikiHow:

http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL

A version of the WikiHow page is saved with this project as 'php-secure-login.odt'.

The idea is to modify the code so that it forms a module that can easily be plugged into other PHP projects requiring login functionality.

When it's done, users will be able to select from a variety of configuration options such as:

  • Connect via http or https
  • Specify database connection details
  • Elect whether all users should be allowed to register or whether only certain types of users should be able to do registrations (i.e. register other users)

You'll need Apache, mySQL and PHP5.3.x installed and working. On Windows and Mac, an XAMPP installation will be fine.

You'll also need to create a database called 'secure_login'. When you've done that you need to create a user with just SELECT, UPDATE and DELETE privileges on the 'secure_login' database. The user's name and password are given in the psl-config.php file. If you're not intending to contribute, you can choose whatever login details you want, but you'll have to change the psl-config.php file to match your own details.

The code to create and populate the necessary tables is included in the 'secure_login.sql' file. It populates the members table with a single user with the following details:

Username : test_user Email : [email protected] Password : 6ZaxN2Vzm9NUJT2y

The registration page is now implemented, so you can register as many users as you like. However you may still need the test_user for testing purposes in the future when we come to adding roles to users.

I'm happy to receive any suggestions ([email protected]). And if anyone would like to help...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.