Skip to content
Snippets Groups Projects
Commit 60a1fce2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Sec: Do not autofill password for remote access

parent 4b6d2a39
No related branches found
No related tags found
No related merge requests found
......@@ -456,7 +456,6 @@ if (! empty($force_install_message))
-->
</tr>
<tr class="hidesqlite hideroot">
<td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b>
</td>
......@@ -464,7 +463,8 @@ if (! empty($force_install_message))
id="db_pass_root" name="db_pass_root" class="needroot"
value="<?php
$autofill=((! empty($db_pass_root))?$db_pass_root:$force_install_databaserootpass);
if (! empty($dolibarr_main_prod)) $autofill='';
if (! empty($dolibarr_main_prod)) $autofill=''; // Do not autofill password if instance is a production instance
if (! empty($_SERVER["SERVER_NAME"]) && ! in_array($_SERVER["SERVER_NAME"], array('127.0.0.1', 'localhost'))) $autofill=''; // Do not autofill password for remote access
print dol_escape_htmltag($autofill);
?>"></td>
<td class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment