All posts tagged “mongodb

MongoDB Injection Example

Below is a example on how MongoDB Injection works: For example you have a PHP code like this. <?php $m = new \MongoDB\Driver\Manager(); if(isset($_POST[‘u’]) && isset($_POST[‘p’])) { $c = new \MongoDB\Driver\Query(array(‘username’ => $_POST[‘u’], ‘password’ => $_POST[‘p’]), array(‘limit’ => 10)); $user…