Skip to content

Commit

Permalink
issue: AJAX Reflected XSS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JediKev committed Mar 20, 2018
1 parent c4669d7 commit e919d8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ajax.forms.php
Expand Up @@ -15,6 +15,9 @@ function getForm($form_id) {
}

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');

Expand Down

0 comments on commit e919d8a

Please sign in to comment.