Skip to content

Commit ad576c6

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents ca9ac33 + bc3a775 commit ad576c6

File tree

16 files changed

+120
-35
lines changed

16 files changed

+120
-35
lines changed

LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2007-2016, Till Brehm, ISPConfig UG
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation
11+
and/or other materials provided with the distribution.
12+
* Neither the name of ISPConfig nor the names of its contributors
13+
may be used to endorse or promote products derived from this software without
14+
specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
20+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ISPConfig - Hosting Control Panel
2+
3+
- Manage multiple servers from one control panel
4+
- Web server management (Apache2 and nginx)
5+
- Mail server management (with virtual mail users)
6+
- DNS server management (BIND and MyDNS)
7+
- Virtualization (OpenVZ)
8+
- Administrator, reseller and client login
9+
- Configuration mirroring and clusters
10+
- Open Source software (BSD license)

install/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545

546546
//* Create md5 filelist
547547
$md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5';
548-
exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename);
548+
exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename . ' 2>/dev/null');
549549
chmod($md5_filename,0700);
550550

551551
echo "Update finished.\n";

interface/lib/classes/remote.d/client.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public function client_delete_everything($session_id, $client_id)
406406
$app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id);
407407

408408
//* Delete all records (sub-clients, mail, web, etc....) of this client.
409-
$tables = 'client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic';
409+
$tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain';
410410
$tables_array = explode(',', $tables);
411411
$client_group_id = $app->functions->intval($client_group['groupid']);
412412

interface/web/client/client_del.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function onDelete() {
7777
$client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id);
7878

7979
// Get all records (sub-clients, mail, web, etc....) of this client.
80-
$tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain';
80+
$tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain';
8181
$tables_array = explode(',', $tables);
8282
$client_group_id = $app->functions->intval($client_group['groupid']);
8383

interface/web/js/scrigo.js.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ function generatePassword(passwordFieldID, repeatPasswordFieldID){
204204
var pword = password(<?php echo $min_password_length; ?>, false, 1);
205205
jQuery('#'+repeatPasswordFieldID).val(pword);
206206
newPWField.attr('id', passwordFieldID).val(pword).trigger('keyup').select();
207+
newPWField.unbind('keyup').on('keyup', function(e) {
208+
if($(this).val() != pword) {
209+
var pos = $(this).getCursorPosition();
210+
$(this).attr('type', 'password').unbind('keyup').setCursorPosition(pos);
211+
}
212+
});
207213
}
208214

209215
var funcDisableClick = function(e) { e.preventDefault(); return false; };

interface/web/sites/database_user_del.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function onBeforeDelete() {
5555
$old_record = $app->tform->getDataRecord($this->id);
5656

5757
/* we cannot use datalogDelete here, as we need to set server_id to 0 */
58-
$app->db->query("DELETE FROM `web_database_user` WHERE ?? = ?", $index_field, $index_value);
58+
$app->db->query("DELETE FROM `web_database_user` WHERE `database_user_id` = ?", $this->id);
5959
$new_rec = array();
6060
$old_record['server_id'] = 0;
6161
$app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $this->id, $old_record, $new_rec);

interface/web/sites/form/web_vhost_domain.tform.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
'datatype' => 'VARCHAR',
448448
'formtype' => 'TEXT',
449449
'validators' => array ( 0 => array ( 'type' => 'REGEX',
450-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
450+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
451451
'errmsg'=> 'ssl_state_error_regex'),
452452
),
453453
'default' => '',
@@ -459,7 +459,7 @@
459459
'datatype' => 'VARCHAR',
460460
'formtype' => 'TEXT',
461461
'validators' => array ( 0 => array ( 'type' => 'REGEX',
462-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
462+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
463463
'errmsg'=> 'ssl_locality_error_regex'),
464464
),
465465
'default' => '',
@@ -471,7 +471,7 @@
471471
'datatype' => 'VARCHAR',
472472
'formtype' => 'TEXT',
473473
'validators' => array ( 0 => array ( 'type' => 'REGEX',
474-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
474+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
475475
'errmsg'=> 'ssl_organisation_error_regex'),
476476
),
477477
'default' => '',
@@ -483,7 +483,7 @@
483483
'datatype' => 'VARCHAR',
484484
'formtype' => 'TEXT',
485485
'validators' => array ( 0 => array ( 'type' => 'REGEX',
486-
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
486+
'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
487487
'errmsg'=> 'ssl_organistaion_unit_error_regex'),
488488
),
489489
'default' => '',

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,10 +1415,6 @@ function onBeforeUpdate () {
14151415

14161416
//* Check that all fields for the SSL cert creation are filled
14171417
if(isset($this->dataRecord['ssl_action']) && $this->dataRecord['ssl_action'] == 'create') {
1418-
if($this->dataRecord['ssl_state'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_state_empty').'<br />';
1419-
if($this->dataRecord['ssl_locality'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_locality_empty').'<br />';
1420-
if($this->dataRecord['ssl_organisation'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_empty').'<br />';
1421-
if($this->dataRecord['ssl_organisation_unit'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_organisation_unit_empty').'<br />';
14221418
if($this->dataRecord['ssl_country'] == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_country_empty').'<br />';
14231419
}
14241420

interface/web/themes/default/assets/javascripts/ispconfig.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,4 +747,35 @@ $(document).on('ready', function () {
747747
e.preventDefault();
748748
}
749749
});
750+
751+
$.fn.setCursorPosition = function(pos) {
752+
var self = $(this).get(0);
753+
if(self.setSelectionRange) {
754+
self.setSelectionRange(pos, pos);
755+
} else if(self.createTextRange) {
756+
var range = self.createTextRange();
757+
range.collapse(true);
758+
if(pos < 0) {
759+
pos = $(this).val().length + pos;
760+
}
761+
range.moveEnd('character', pos);
762+
range.moveStart('character', pos);
763+
range.select();
764+
}
765+
};
766+
767+
$.fn.getCursorPosition = function() {
768+
var iCaretPos = 0;
769+
var self = $(this).get(0);
770+
771+
if(typeof self.selectionStart === 'number') {
772+
iCaretPos = self.selectionDirection == 'backward' ? self.selectionStart : self.selectionEnd;
773+
} else if(document.selection) {
774+
this.focus();
775+
var oSel = document.selection.createRange();
776+
oSel.moveStart('character', -self.value.length);
777+
iCaretPos = oSel.text.length;
778+
}
779+
return iCaretPos;
780+
};
750781
});

0 commit comments

Comments
 (0)