Skip to content

Commit 39981b7

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 0d35fef + 3bd0d08 commit 39981b7

File tree

6 files changed

+27
-11
lines changed

6 files changed

+27
-11
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ public function grant_master_database_rights($verbose = false) {
585585
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
586586
}
587587

588-
$query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?";
588+
$query = "GRANT SELECT, UPDATE (`ssl`, `ssl_letsencrypt`, `ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?";
589589
if ($verbose){
590590
echo $query ."\n";
591591
}

interface/lib/classes/functions.inc.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ private function _idn_encode_decode($domain, $encode = true) {
302302

303303
if($encode == true) {
304304
if(function_exists('idn_to_ascii')) {
305-
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
305+
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
306+
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
307+
} else {
308+
$domain = idn_to_ascii($domain);
309+
}
306310
} elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
307311
/* use idna class:
308312
* @author Matthias Sommerfeld <mso@phlylabs.de>
@@ -319,7 +323,11 @@ private function _idn_encode_decode($domain, $encode = true) {
319323
}
320324
} else {
321325
if(function_exists('idn_to_utf8')) {
322-
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
326+
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
327+
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
328+
} else {
329+
$domain = idn_to_utf8($domain);
330+
}
323331
} elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
324332
/* use idna class:
325333
* @author Matthias Sommerfeld <mso@phlylabs.de>

server/lib/classes/functions.inc.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,11 @@ private function _idn_encode_decode($domain, $encode = true) {
354354

355355
if($encode == true) {
356356
if(function_exists('idn_to_ascii')) {
357-
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
357+
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
358+
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
359+
} else {
360+
$domain = idn_to_ascii($domain);
361+
}
358362
} elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
359363
/* use idna class:
360364
* @author Matthias Sommerfeld <mso@phlylabs.de>
@@ -371,7 +375,11 @@ private function _idn_encode_decode($domain, $encode = true) {
371375
}
372376
} else {
373377
if(function_exists('idn_to_utf8')) {
374-
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
378+
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
379+
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
380+
} else {
381+
$domain = idn_to_utf8($domain);
382+
}
375383
} elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
376384
/* use idna class:
377385
* @author Matthias Sommerfeld <mso@phlylabs.de>

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,10 +890,10 @@ function update($event_name, $data) {
890890
$primitive_root = $df_output[1];
891891

892892
if($file_system == 'xfs') {
893-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
893+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
894894

895895
// xfs only supports timers globally, not per user.
896-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
896+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
897897

898898
unset($project_uid, $username_position, $xfs_projects);
899899
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

server/plugins-available/cron_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ function update($event_name, $data) {
145145
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
146146
} elseif ($file_system == 'xfs') {
147147

148-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
148+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
149149

150150
// xfs only supports timers globally, not per user.
151-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
151+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
152152

153153
unset($project_uid, $username_position, $xfs_projects);
154154
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,10 @@ function update($event_name, $data) {
748748
$primitive_root = $df_output[1];
749749

750750
if($file_system == 'xfs') {
751-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
751+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
752752

753753
// xfs only supports timers globally, not per user.
754-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
754+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
755755

756756
unset($project_uid, $username_position, $xfs_projects);
757757
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

0 commit comments

Comments
 (0)