|
File patch.txt, 0.7 kB
(added by sci2tech, 5 months ago)
|
Proftpd accept autentificate with password made by first 8 chars of the original password
|
| Line | |
|---|
| 1 |
--- calc-functions.php 2008-06-29 04:40:03.000000000 +0300 |
|---|
| 2 |
+++ /var/www/ispcp/gui/include/calc-functions.php 2008-07-02 00:18:58.000000000 +0300 |
|---|
| 3 |
@@ -94,7 +94,7 @@ |
|---|
| 4 |
function generate_rand_salt($min = 46, $max = 126) { |
|---|
| 5 |
$salt = chr(mt_rand($min, $max)); |
|---|
| 6 |
$salt .= chr(mt_rand($min, $max)); |
|---|
| 7 |
- return $salt; |
|---|
| 8 |
+ return '$1$'.$salt; |
|---|
| 9 |
} |
|---|
| 10 |
|
|---|
| 11 |
function get_salt_from($data) { |
|---|
| 12 |
@@ -104,12 +104,12 @@ |
|---|
| 13 |
|
|---|
| 14 |
function crypt_user_pass($data) { |
|---|
| 15 |
$res = md5($data); |
|---|
| 16 |
- return $res; |
|---|
| 17 |
+ return $res; |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
function crypt_user_ftp_pass($data) { |
|---|
| 21 |
- $res = crypt($data, generate_rand_salt()); |
|---|
| 22 |
- return $res; |
|---|
| 23 |
+ $res = crypt($data, generate_rand_salt()); |
|---|
| 24 |
+ return $res; |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
function check_user_pass($crdata, $data ) { |
|---|
|
Download in other formats:
#########################################################################
# Site footer - Contents are automatically inserted after main Trac HTML
?>