Added input checking to pass-gen.php