FIX #11671 CVE-2019-15062
This commit is contained in:
parent
a8afb4549a
commit
d21e557100
@ -125,8 +125,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||
$link = new Link($db);
|
||||
$link->id = $linkid;
|
||||
$link->fetch();
|
||||
$link->fetch($linkid);
|
||||
$res = $link->delete($user);
|
||||
|
||||
$langs->load('link');
|
||||
@ -160,8 +159,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save','alpha') && GETPOST('l
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||
$langs->load('link');
|
||||
$link = new Link($db);
|
||||
$link->id = GETPOST('linkid', 'int');
|
||||
$f = $link->fetch();
|
||||
$f = $link->fetch(GETPOST('linkid', 'int'));
|
||||
if ($f)
|
||||
{
|
||||
$link->url = GETPOST('link', 'alpha');
|
||||
@ -169,7 +167,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save','alpha') && GETPOST('l
|
||||
{
|
||||
$link->url = 'http://' . $link->url;
|
||||
}
|
||||
$link->label = GETPOST('label', 'alpha');
|
||||
$link->label = GETPOST('label', 'alphanohtml');
|
||||
$res = $link->update($user);
|
||||
if (!$res)
|
||||
{
|
||||
|
||||
@ -1758,7 +1758,7 @@ class FormFile
|
||||
print $langs->trans('Link') . ': <input type="text" name="link" value="' . $link->url . '">';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
|
||||
print $langs->trans('Label') . ': <input type="text" name="label" value="' . dol_escape_htmltag($link->label) . '">';
|
||||
print '</td>';
|
||||
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
|
||||
print '<td align="right"></td>';
|
||||
@ -1772,7 +1772,7 @@ class FormFile
|
||||
print '<td>';
|
||||
print img_picto('', 'object_globe').' ';
|
||||
print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
|
||||
print $link->label;
|
||||
print dol_escape_htmltag($link->label);
|
||||
print '</a>';
|
||||
print '</td>'."\n";
|
||||
print '<td align="right"></td>';
|
||||
|
||||
@ -318,12 +318,12 @@ if (empty($reshook)) {
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
if (!$_POST["lastname"]) {
|
||||
if (! GETPOST("lastname", 'alpha')) {
|
||||
setEventMessages($langs->trans("NameNotDefined"), null, 'errors');
|
||||
$action = "edit"; // Go back to create page
|
||||
$error ++;
|
||||
}
|
||||
if (!$_POST["login"]) {
|
||||
if (! GETPOST("login", 'alpha')) {
|
||||
setEventMessages($langs->trans("LoginNotDefined"), null, 'errors');
|
||||
$action = "edit"; // Go back to create page
|
||||
$error ++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user