mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Allow to view ticket linked files from public interface (#32410)
This commit is contained in:
committed by
GitHub
parent
a605244dea
commit
eaa05a482f
@@ -74,6 +74,16 @@ if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) {
|
||||
if (!defined("NOIPCHECK")) {
|
||||
define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||
}
|
||||
} elseif (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'ticket' && strpos($_SERVER['HTTP_REFERER'], 'public/ticket') !== false) {
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", 1);
|
||||
}
|
||||
if (!defined("NOCSRFCHECK")) {
|
||||
define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
|
||||
}
|
||||
if (!defined("NOIPCHECK")) {
|
||||
define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -295,6 +305,16 @@ if (!empty($hashp)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($modulepart == 'ticket' && !getDolGlobalString('TICKET_EMAIL_MUST_EXISTS')) {
|
||||
if ($sqlprotectagainstexternals) {
|
||||
$resql = $db->query($sqlprotectagainstexternals);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0) {
|
||||
$accessallowed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user