Skip to content
Snippets Groups Projects
Commit e919d8a6 authored by JediKev's avatar JediKev
Browse files

issue: AJAX Reflected XSS

This addresses an issue where you can exploit XSS in the help-topic AJAX
request. This adds a check for a refferal URL and if none it will return
a 403 Forbidden Response.
parent c4669d77
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,9 @@ class DynamicFormsAjaxAPI extends AjaxController {
}
function getFormsForHelpTopic($topic_id, $client=false) {
if (!$_SERVER['HTTP_REFERER'])
Http::response(403, 'Forbidden.');
if (!($topic = Topic::lookup($topic_id)))
Http::response(404, 'No such help topic');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment