Skip to content

Commit 37b2923

Browse files
author
Marius Cramer
committed
- don't set password via remoting if field is empty
1 parent 92edaf2 commit 37b2923

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ protected function updateQueryPrepare($formdef_file, $client_id, $primary_id, $p
336336

337337
//* get old record and merge with params, so only new values have to be set in $params
338338
$old_rec = $app->remoting_lib->getDataRecord($primary_id);
339+
340+
foreach ($app->remoting_lib->formDef['fields'] as $fieldName => $fieldConf)
341+
{
342+
if ($fieldConf['formtype'] === 'PASSWORD' && empty($params[$fieldName])) {
343+
unset($old_rec[$fieldName]);
344+
}
345+
}
346+
339347
$params = $app->functions->array_merge($old_rec,$params);
340348

341349
//* Get the SQL query

0 commit comments

Comments
 (0)