This commit is contained in:
parent
453680f92a
commit
b6652020cf
2 changed files with 6 additions and 2 deletions
|
@ -826,6 +826,10 @@
|
||||||
$newcsr = str_replace("\n\n","\n",$newcsr);
|
$newcsr = str_replace("\n\n","\n",$newcsr);
|
||||||
return(preg_replace("/[^A-Za-z0-9\n\r\-\:\=\+\/ ]/","",$newcsr));
|
return(preg_replace("/[^A-Za-z0-9\n\r\-\:\=\+\/ ]/","",$newcsr));
|
||||||
}
|
}
|
||||||
|
function clean_gpgcsr($CSR)
|
||||||
|
{
|
||||||
|
return(preg_replace("/[^A-Za-z0-9\n\r\-\:\=\+\/ ]/","",trim($CSR)));
|
||||||
|
}
|
||||||
|
|
||||||
function sanitizeFilename($text)
|
function sanitizeFilename($text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,7 @@ function verifyEmail($email)
|
||||||
$state=0;
|
$state=0;
|
||||||
if($oldid == "0" && $CSR != "")
|
if($oldid == "0" && $CSR != "")
|
||||||
{
|
{
|
||||||
$debugkey = $gpgkey = clean_csr($CSR);
|
$debugkey = $gpgkey = clean_gpgcsr($CSR);
|
||||||
$debugpg = $gpg = trim(`echo "$gpgkey"|gpg --with-colons --homedir /tmp 2>&1`);
|
$debugpg = $gpg = trim(`echo "$gpgkey"|gpg --with-colons --homedir /tmp 2>&1`);
|
||||||
$lines = "";
|
$lines = "";
|
||||||
$gpgarr = explode("\n", $gpg);
|
$gpgarr = explode("\n", $gpg);
|
||||||
|
@ -268,7 +268,7 @@ function verifyEmail($email)
|
||||||
mkdir($cwd,0755);
|
mkdir($cwd,0755);
|
||||||
|
|
||||||
$fp = fopen("$cwd/gpg.csr", "w");
|
$fp = fopen("$cwd/gpg.csr", "w");
|
||||||
fputs($fp, clean_csr($CSR));
|
fputs($fp, clean_gpgcsr($CSR));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue