GithubHelp home page GithubHelp logo

goatella / simple-php-login Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 58.0 14 KB

A very simple PHP script with MySQL backend to store usernames, passwords, and use cookies to protect a member's area.

License: GNU General Public License v2.0

PHP 100.00%

simple-php-login's People

Contributors

clementallen avatar goatella avatar rv-vmartins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-php-login's Issues

SQL vulnerability

The file login.php is vulnerable to two SQL injections:
if the user submits the login a' OR '1'='1' LIMIT 1,2# , he is able to connect as any user who uses a given password
if the user submits admin' AND password LIKE '0% , he is able based on the response to determine whether or not the admin password hash begins with 0, and eventually get the whole hash.

Terrible...

You claim to have 15 years experience yet you know nothing about SQL injection. I can't believe how shockingly bad your code is. I can't even log into my real GitHub account because I'm too ashamed to be drudging through such mediocrity.

mysql_query("SELECT * FROM members WHERE username = '".$_POST['username']."'")

Are you kidding me? You pass the $_POST variable straight into a mysql query? And you actually have the gall to call yourself a programmer?

You should seriously take this Github account down. This is so incredibly damaging to yourself and new developers who are just learning. I can't believe you're allowed to post on About.com, this makes it even worse that you have no clue what you're talking about.

Never store passwords as plain text

You should not store passwords as plain text anywhere. This should be a pretty well known rule in 2017.
You should only ever store a (preferably encrypted) hash of the password, that way, if someone gets a hold of your database, they will not be able to easily obtain the passwords.

Please read the OWASP password storage guidance.

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.