Skip to content

Commit

Permalink
Update aba-decode.php
Browse files Browse the repository at this point in the history
Sanitize input
  • Loading branch information
exploitagency committed Feb 16, 2018
1 parent 48ca9ca commit 839f285
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Magstripe/aba-decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

/* Decode Track 2 data from binary */
if (defined('STDIN')) {
$binary = $argv[1];
$binary = filter_var($argv[1], FILTER_SANITIZE_NUMBER_INT);
define( "LINEBREAK", PHP_EOL);
} else {
if(isset($_POST['submit'])) {
$binary = $_POST["binary"];
$binary = filter_input(INPUT_POST, 'binary', FILTER_SANITIZE_NUMBER_INT);
}
else {
$binary = $_GET['binary'];
$binary = filter_input(INPUT_GET, 'binary', FILTER_SANITIZE_NUMBER_INT);
}
define( "LINEBREAK", "<br>");
}
Expand Down

0 comments on commit 839f285

Please sign in to comment.