fix(legacy): improve error messages and logs

This commit is contained in:
jo 2023-02-01 20:11:00 +01:00 committed by Kyle Robbertze
parent 1e6c5a84d3
commit c34f02d916
3 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,9 @@ class CORSHelper
if (!($origin == '' || preg_match('/https?:\/\/localhost/', $origin) === 1 || in_array($origin, $allowedOrigins))) {
// Don't allow CORS from other domains to prevent XSS.
Logging::error("request origin '{$origin}' is not in allowed '" . implode(', ', $allowedOrigins) . "'!");
Logging::error(
"request origin '{$origin}' is not in the configured 'allowed_cors_origins' '" . implode(', ', $allowedOrigins) . "'"
);
throw new Zend_Controller_Action_Exception('Forbidden', 403);
}

View File

@ -41,6 +41,7 @@ define('WHOS_USING_URL', 'https://github.com/orgs/libretime/people');
define('TERMS_AND_CONDITIONS_URL', 'https://github.com/libretime/libretime/blob/main/README.md');
define('PRIVACY_POLICY_URL', 'https://github.com/libretime/organization/blob/main/CODE_OF_CONDUCT.md');
define('USER_MANUAL_URL', 'https://libretime.org/docs');
define('TROUBLESHOOTING_URL', 'https://libretime.org/docs/admin-manual/troubleshooting/');
define('ABOUT_AIRTIME_URL', 'https://libretime.org');
define('LIBRETIME_CONTRIBUTE_URL', 'https://libretime.org/contribute');
define('LIBRETIME_DISCOURSE_URL', 'https://discourse.libretime.org');

View File

@ -12,7 +12,12 @@
<h2><?php echo _("Oops!") ?></h2>
<p><?php echo _("Something went wrong!") ?></p>
<div class="button-bar">
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>"><?php echo _("Help") ?></a>
<a class="toggle-button" href="<?php echo TROUBLESHOOTING_URL; ?>" target="_blank">
<?php echo _("Troubleshooting help") ?>
</a>
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>" target="_blank">
<?php echo _("More help") ?>
</a>
</div>
</div>
</body>