From 30cca8ce63f98f57eecc1ccb246113c987f2ffc7 Mon Sep 17 00:00:00 2001 From: gnieark Date: Wed, 9 Dec 2015 00:11:08 +0100 Subject: [PATCH] patch non alphanum n urls --- src/act.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/act.php b/src/act.php index 81e2d43..9f3e9d0 100644 --- a/src/act.php +++ b/src/act.php @@ -43,7 +43,9 @@ switch($_POST['act']){ }else{ //enregistrer le bot et envoyer un email pour la validation - $secret=rand_str(8, '$-_.+!*(),ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); + $secret=rand_str(7, '$-_.+!*(),ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); + //last char must be alphanum. Mail client should cut url if isn't. + $secret.=rand_str(1, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); $sql = "INSERT INTO bots (name,game,url,description,active,date_inscription,validate_secret) VALUES ( '".mysqli_real_escape_string($lnMysql,htmlentities($_POST['botName']))."', '".mysqli_real_escape_string($lnMysql,$_POST['botGame'])."',