|
75 | 75 | ## avoid the screen being blank, due to the FOUC system
|
76 | 76 | ini_set("error_append_string",'<script>document.body.classList.remove("invisible");</script>'); ## remove the FOUC
|
77 | 77 | ini_set("error_prepend_string",'<div style="{font-size: 24px;color:red;}">Sorry a software error occurred:</div><br/>
|
78 |
| - Please <a href="http://mantis.phplist.org">report a bug</a> when reporting the bug, please include URL and the entire content of this page.<br/>'); |
79 |
| - |
| 78 | + Please <a href="https://github.com/phpList/phplist3/issues">report a bug</a> when reporting the bug, please include URL and the entire content of this page.<br/>'); |
80 | 79 |
|
81 | 80 | if (function_exists('mb_internal_encoding')) {
|
82 | 81 | mb_internal_encoding('UTF-8');
|
|
97 | 96 | // @@@ needs more work
|
98 | 97 | $GLOBALS['compression_used'] = $zlib_compression || $gzhandler;
|
99 | 98 |
|
100 |
| -// make sure these are set correctly, so they cannot be injected due to the PHP Globals Problem, |
101 |
| -// http://www.hardened-php.net/globals-problem |
102 |
| -$GLOBALS['language_module'] = $language_module; |
103 |
| -$GLOBALS['database_module'] = $database_module; |
104 | 99 |
|
105 | 100 | //# this is mostly useful when using commandline, and the language is not detected
|
106 | 101 | //# with the browser
|
|
122 | 117 | // $GLOBALS['design'] = basename($GLOBALS['design']);
|
123 | 118 | }
|
124 | 119 |
|
| 120 | +$website = $domain = ''; |
| 121 | + |
125 | 122 | if (!isset($GLOBALS['ui']) || !is_dir(dirname(__FILE__).'/ui/'.$GLOBALS['ui'])) {
|
126 | 123 | if (is_dir(dirname(__FILE__).'/ui/phplist-ui-bootlist')) {
|
127 | 124 | $GLOBALS['ui'] = 'phplist-ui-bootlist';
|
|
158 | 155 |
|
159 | 156 | if (empty($GLOBALS['language_module'])) {
|
160 | 157 | $GLOBALS['language_module'] = 'english.inc';
|
| 158 | + if (isset($language_module)) { |
| 159 | + $GLOBALS['language_module'] = $language_module; |
| 160 | + } |
161 | 161 | }
|
162 | 162 | if (empty($GLOBALS['database_module']) || !is_file(dirname(__FILE__).'/'.$GLOBALS['database_module'])) {
|
163 | 163 | $GLOBALS['database_module'] = 'mysqli.inc';
|
| 164 | + if (isset($database_module)) { |
| 165 | + $GLOBALS['database_module'] = $database_module; |
| 166 | + } |
164 | 167 | }
|
165 | 168 | if (!isset($database_port)) {
|
166 | 169 | $database_port = null;
|
|
672 | 675 | if (!isset($allowed_referrers) || !is_array($allowed_referrers)) {
|
673 | 676 | $allowed_referrers = array();
|
674 | 677 | }
|
675 |
| -if (defined('ACCESS_CONTROL_ALLOW_ORIGINS') && in_array($_SERVER['HTTP_ORIGIN'], ACCESS_CONTROL_ALLOW_ORIGINS)) { |
| 678 | +if (isset($_SERVER['HTTP_ORIGIN']) && defined('ACCESS_CONTROL_ALLOW_ORIGINS') && in_array($_SERVER['HTTP_ORIGIN'], ACCESS_CONTROL_ALLOW_ORIGINS)) { |
676 | 679 | define('ACCESS_CONTROL_ALLOW_ORIGIN', $_SERVER['HTTP_ORIGIN']);
|
677 | 680 | } elseif (!defined('ACCESS_CONTROL_ALLOW_ORIGIN')) {
|
678 | 681 | define('ACCESS_CONTROL_ALLOW_ORIGIN', $GLOBALS['scheme'].'://'.$_SERVER['HTTP_HOST']);
|
|
0 commit comments