Coder Social home page Coder Social logo

server's People

Contributors

brthiel avatar dannyboycurtis avatar djgagnon avatar mglumac avatar mrdavidgagnon avatar mtolly avatar phildo avatar zeroeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

server's Issues

Security vulnerability

I'm seeing a number of security vulnerabilities that's preventing us from going production. If you haven't already, please check out the OWASP Top Ten. For example, just looking at resetpassword.php:

SQL Injection

$query = "SELECT user_name FROM players WHERE player_id = ".$_GET['i'];

$rsResult = @mysql_query($query);
$editorRecord = mysql_fetch_array($rsResult);

would be better written as (http://php.net/manual/en/pdo.prepared-statements.php)

$query = "SELECT user_name FROM players WHERE player_id = ?";
$stmt = $dbh->prepare($query);
$stmt->execute($_GET['i']);

$editorRecord = $stmt->fetch(PDO::FETCH_ASSOC);

XSS

echo "<input type = 'hidden' name='accounttype' value='".$_GET['t']."'>";

needs input validation and/or proper escaping, such as:

echo "<input type = 'hidden' name='accounttype' value='" . htmlentities($_GET['t']) . "'>";

Password storage

See http://www.php.net/manual/en/faq.passwords.php#faq.passwords.fasthash

$query = "UPDATE editors
SET password = MD5('{$newpassword}')
WHERE editor_id = $editorid";

That MD5 is only a bit stronger than plain-text, especially for weak passwords. You should look into stronger, salted hashing algorithms.

Oh No!

"Error establishing a database connection" error is currently on the page, can't access the site! Perhaps the updates two days ago to the php broke something?

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.