From c5eac169ec1fab9ecdab9e4acc64a732106b99aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Dec 2025 12:14:09 +0100 Subject: [PATCH 1/5] use password field for encryption key --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 4bb307cec..36e5cc44b 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -777,7 +777,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) showConfigUser('settings_autoLoginUser', 'autoLoginUser', true); ?> showConfigText('settings_quota', 'quota'); ?> showConfigUser('settings_undelUserIds', 'undelUserIds', true, true); ?> -showConfigText('settings_encryptionKey', 'encryptionKey'); ?> +showConfigText('settings_encryptionKey', 'encryptionKey', 'password'); ?> showConfigText('settings_cookieLifetime', 'cookieLifetime'); ?> showConfigOption('settings_defaultAccessDocs', 'defaultAccessDocs', array(' 0'=>'inherited', ' '.M_NONE=>'access_mode_none', ' '.M_READ=>'access_mode_read', ' '.M_READWRITE=>'access_mode_readwrite'), false, true); ?> From 5949c4ed358f62aa58ba36b482aaf871015e8e0e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Dec 2025 12:14:38 +0100 Subject: [PATCH 2/5] add command to return a random string --- op/op.Ajax.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index bcf3f2da7..9a3c07290 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -30,6 +30,7 @@ require_once("../inc/inc.ClassController.php"); require_once("../inc/inc.Notification.php"); use Seeddms\Seeddms\Session; +use Seeddms\Seeddms\Utilities; require_once("../inc/inc.ClassSession.php"); require_once("../inc/inc.ClassPasswordStrength.php"); @@ -100,6 +101,12 @@ switch($command) { } break; /* }}} */ + case 'randomstring': /* {{{ */ + $len = $_REQUEST["len"] ?? 16; + header('Content-Type: application/json'); + echo json_encode(array('success'=>true, 'string'=>Utilities::makeRandomString($len))); + break; /* }}} */ + case 'sessioninfo': /* {{{ */ if($user) { header('Content-Type: application/json'); From 7c53c1aae424f494d3f7ed36014150257e5cbac7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Dec 2025 12:15:14 +0100 Subject: [PATCH 3/5] require symfony/http-client --- composer-dist.json | 3 ++- composer.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer-dist.json b/composer-dist.json index 23a4d0311..e1a5fa567 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -72,7 +72,8 @@ "symfony/console": "^7.2", "twig/twig": "^3.0", "league/commonmark": "^2.7", - "symfony/process": "^7.3" + "symfony/process": "^7.3", + "symfony/http-client": "^7.4" }, "require-dev": { "composer/composer": "dev-main" diff --git a/composer.json b/composer.json index 3523f25d2..402d1181e 100644 --- a/composer.json +++ b/composer.json @@ -75,7 +75,8 @@ "symfony/console": "^7.2", "twig/twig": "^3.0", "league/commonmark": "^2.7", - "symfony/process": "^7.3" + "symfony/process": "^7.3", + "symfony/http-client": "^7.4" }, "require-dev": { "composer/composer": "dev-main", From 55c6a9492a734102b7c5154f62d71627bc27a188 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Dec 2025 19:29:48 +0100 Subject: [PATCH 4/5] do not remove custom attributes which were not set when editing attributes --- CHANGELOG | 1 + controllers/class.EditAttributes.php | 4 ++-- controllers/class.EditDocument.php | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f48703689..833d40122 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ - droping an url in the drag&drop area will download the url - add button to all password fields to make password visible - fix formatting of date input fields +- do not remove custom attributes which were not set when editing attributes -------------------------------------------------------------------------------- Changes in version 5.1.42 diff --git a/controllers/class.EditAttributes.php b/controllers/class.EditAttributes.php index 1df2c91e6..25caf2dab 100644 --- a/controllers/class.EditAttributes.php +++ b/controllers/class.EditAttributes.php @@ -83,7 +83,6 @@ class SeedDMS_Controller_EditAttributes extends SeedDMS_Controller_Common { if(!isset($oldattributes[$attrdefid]) || $attribute != $oldattributes[$attrdefid]->getValue()) { if(!$version->setAttributeValue($dms->getAttributeDefinition($attrdefid), $attribute)) { - //UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); return false; } } @@ -92,7 +91,6 @@ class SeedDMS_Controller_EditAttributes extends SeedDMS_Controller_Common { return false; } elseif(isset($oldattributes[$attrdefid])) { if(!$version->removeAttribute($dms->getAttributeDefinition($attrdefid))) - // UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("error_occured")); return false; } } else { @@ -102,12 +100,14 @@ class SeedDMS_Controller_EditAttributes extends SeedDMS_Controller_Common { } } } + /* Do not remove any old attributes if they have not be set by the form foreach($oldattributes as $attrdefid=>$oldattribute) { if(!isset($attributes[$attrdefid])) { if(!$version->removeAttribute($dms->getAttributeDefinition($attrdefid))) return false; } } + */ } elseif($result === false) { if(empty($this->errormsg)) diff --git a/controllers/class.EditDocument.php b/controllers/class.EditDocument.php index cd86dfedf..ea77f46da 100644 --- a/controllers/class.EditDocument.php +++ b/controllers/class.EditDocument.php @@ -174,12 +174,14 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common { } } } + /* Do not remove any old attributes if they have not be set by the form foreach($oldattributes as $attrdefid=>$oldattribute) { if(!isset($attributes[$attrdefid])) { if(!$document->removeAttribute($dms->getAttributeDefinition($attrdefid))) return false; } } + */ $sequence = $this->params['sequence']; if(strcasecmp($sequence, "keep")) { From 73cb39beca195d7a6d2a12e7fbee98c00e075f67 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 10 Dec 2025 06:46:20 +0100 Subject: [PATCH 5/5] add js for addon with refresh symbol (temp. solution) --- views/bootstrap/class.Bootstrap.php | 2 +- views/bootstrap/styles/application.js | 15 +++++++++++++++ views/bootstrap4/class.Bootstrap4.php | 2 +- views/bootstrap4/styles/application.js | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 27a77c3eb..dd0e50ece 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1269,7 +1269,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; break; default: if(!empty($value['addon'])) - echo ''; + echo ''; echo ''; + echo '
'; echo '