Skip to content

Commit 035e7dd

Browse files
committed
Removed the auto increment value for server table.
Fixed a bug in password encryption function.
1 parent d4c9b31 commit 035e7dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ CREATE TABLE `server` (
487487
`updated` tinyint(4) NOT NULL default '0',
488488
`active` tinyint(4) NOT NULL default '1',
489489
PRIMARY KEY (`server_id`)
490-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
490+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
491491

492492
--
493493
-- Daten für Tabelle `server`

interface/lib/classes/tform.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
693693
$sql_insert_key .= "`$key`, ";
694694
if($field['encryption'] == 'CRYPT') {
695695
$salt="$1$";
696-
for ($n=0;$n<8;$n++) {
696+
for ($n=0;$n<11;$n++) {
697697
$salt.=chr(mt_rand(64,126));
698698
}
699699
$salt.="$";
@@ -702,7 +702,7 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
702702
} else {
703703
$record[$key] = md5($record[$key]);
704704
}
705-
$sql_insert_val .= "'".$record[$key]."', ";
705+
$sql_insert_val .= "'".addslashes($record[$key])."', ";
706706
} elseif ($field['formtype'] == 'CHECKBOX') {
707707
$sql_insert_key .= "`$key`, ";
708708
if($record[$key] == '') {
@@ -720,7 +720,7 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
720720
if($field['formtype'] == 'PASSWORD') {
721721
if(isset($field['encryption']) && $field['encryption'] == 'CRYPT') {
722722
$salt="$1$";
723-
for ($n=0;$n<8;$n++) {
723+
for ($n=0;$n<11;$n++) {
724724
$salt.=chr(mt_rand(64,126));
725725
}
726726
$salt.="$";
@@ -729,7 +729,7 @@ function getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_whe
729729
} else {
730730
$record[$key] = md5($record[$key]);
731731
}
732-
$sql_update .= "`$key` = '".$record[$key]."', ";
732+
$sql_update .= "`$key` = '".addslashes($record[$key])."', ";
733733
} elseif ($field['formtype'] == 'CHECKBOX') {
734734
if($record[$key] == '') {
735735
// if a checkbox is not set, we set it to the unchecked value

0 commit comments

Comments
 (0)