3 declare(strict_types=1);
44 $this->convert_to_ascii = (bool) !$client_ini->
readVariable(
'file_access',
'disable_ascii');
47 $this->white_list_default = include
"./Services/FileServices/defaults/default_whitelist.php";
54 $r = $this->db->query(
55 "SELECT ref_id FROM object_reference JOIN object_data ON object_reference.obj_id = object_data.obj_id WHERE object_data.type = 'facs';" 57 $r = $this->db->fetchObject($r);
58 return (
int) ($r->ref_id ?? 0);
64 return $DIC->isDependencyAvailable(
'rbac')
65 && isset($DIC[
"rbacsystem"])
66 && $DIC->rbac()->system()->checkAccess(
67 'upload_blacklisted_files',
68 $this->file_admin_ref_id
74 if ($this->bypass !== null) {
80 private function read(): void
95 $this->white_list_negative = array_map(
97 explode(
",", $this->
settings->get(
"suffix_repl_additional") ??
'')
100 $this->white_list_positive = array_map(
102 explode(
",", $this->
settings->get(
"suffix_custom_white_list") ??
'')
105 $this->white_list_overall = array_merge($this->white_list_default, $this->white_list_positive);
106 $this->white_list_overall = array_diff($this->white_list_overall, $this->white_list_negative);
107 $this->white_list_overall = array_diff($this->white_list_overall, $this->black_list_overall);
108 $this->white_list_overall[] =
'';
109 $this->white_list_overall = array_unique($this->white_list_overall);
110 $this->white_list_overall = array_diff($this->white_list_overall, $this->black_list_prohibited);
117 $this->black_list_prohibited = array_map(
119 explode(
",", $this->
settings->get(
"suffix_custom_expl_black") ??
'')
122 $this->black_list_prohibited = array_filter($this->black_list_prohibited, fn ($item):
bool => $item !==
'');
128 return function (
string $suffix):
string {
129 return trim(strtolower($suffix));
__construct(ilSetting $settings, ilIniFile $client_ini, ilDBInterface $db)
array $white_list_negative
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
determineFileAdminRefId()
array $black_list_prohibited
array $white_list_positive
array $white_list_overall
isByPassAllowedForCurrentUser()
array $white_list_default
array $black_list_overall
readVariable(string $a_group, string $a_var_name)
reads a single variable from a group
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isASCIIConvertionEnabled()