Browse code

Bugfix: Man kann keine neuen CSR machen die nicht ein Zertifikat ersetzen sollen

Bernd Wurst authored on05/02/2013 18:51:36
Showing1 changed files
... ...
@@ -370,7 +370,7 @@ function save_csr($cn, $bits, $wildcard=true, $replace=NULL)
370 370
   $uid = (int) $_SESSION['userinfo']['uid'];
371 371
   $cn = mysql_real_escape_string(filter_input_hostname($cn));
372 372
   $bits = (int) $bits;
373
-  $replace = (int) $replace;
373
+  $replace = ($replace ? (int) $replace : 'NULL');
374 374
   $csr = mysql_real_escape_string($csr);
375 375
   $key = mysql_real_escape_string($key);
376 376
   db_query("INSERT INTO vhosts.csr (uid, hostname, bits, `replace`, csr, `key`) VALUES ({$uid}, '{$cn}', {$bits}, {$replace}, '{$csr}', '{$key}')");