Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2022-11-24 11:03:56 +01:00
commit 53f350c2fa
4 changed files with 18 additions and 3 deletions

View File

@ -248,7 +248,7 @@
--------------------------------------------------------------------------------
- fix php errors in restapi
- fix 'maximum size' error when uploading a file with drag&drop
>>>>>>> seeddms-5.1.x
- update jquery to 3.6.1 (only bootstrap4 theme)
--------------------------------------------------------------------------------
Changes in version 5.1.28

View File

@ -49,6 +49,10 @@ function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */
return $objdata;
} /* }}} */
function renderPasswordHashedData($colname, $objdata) { /* {{{ */
return substr($objdata[$colname], 0, 16).'...';
} /* }}} */
function renderPasswordPlainData($colname, $objdata) { /* {{{ */
return $objdata[$colname];
} /* }}} */
@ -176,6 +180,8 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$colmap[$i] = array("getFolderData", "renderFolderData", $colname);
} elseif(in_array($colname, array('quota'))) {
$colmap[$i] = array("getQuotaData", "renderQuotaData", $colname);
} elseif(in_array($colname, array('passenc'))) {
$colmap[$i] = array("getBaseData", "renderPasswordHashedData", $colname);
} elseif(in_array($colname, array('password'))) {
/* getPasswordPlainData() will set 'passenc' */
$colmap[$i] = array("getPasswordPlainData", "renderPasswordPlainData", 'passenc');

View File

@ -120,6 +120,11 @@ class SeedDMS_View_ImportUsers extends SeedDMS_Theme_Style {
}
*/
echo "</table>";
} else {
if($colmap)
$this->warningMsg(getMLText('import_users_no_users'));
else
$this->warningMsg(getMLText('import_users_no_column_mapping'));
}
$this->columnEnd();
$this->rowEnd();

View File

@ -57,9 +57,11 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
* X-Content-Security-Policy is deprecated, Firefox understands
* Content-Security-Policy since version 23+
* 'worker-src blob:' is needed for cytoscape
* 'unsafe-inline' is needed for jquery 3.6.1 when loading the remote
* content of a modal box
*/
$csp_rules = [];
$csp_rule = "script-src 'self' 'unsafe-eval'";
$csp_rule = "script-src 'self' 'unsafe-eval' 'unsafe-inline'";
if($this->nonces) {
$csp_rule .= " 'nonce-".implode("' 'nonce-", $this->nonces)."'";
}
@ -1407,8 +1409,10 @@ function getOverallStatusIcon($status) { /* {{{ */
function getModalBoxLinkAttributes($config) { /* {{{ */
$attrs = array();
$attrs[] = array('data-target', '#'.$config['target']);
if(isset($config['remote']))
if(isset($config['remote'])) {
$attrs[] = array('href', $config['remote']);
$attrs[] = array('data-remote', $config['remote']);
}
$attrs[] = array('data-toggle', 'modal');
$attrs[] = array('role', 'button');
if(isset($config['class'])) {