Permalink
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.
  • Loading branch information...
JediKev committed Mar 20, 2018
1 parent c4669d7 commit e919d8a630e42e7a20e1ec391be090bb45a698fb
Showing with 3 additions and 0 deletions.
  1. +3 −0 include/ajax.forms.php
View
@@ -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');

0 comments on commit e919d8a

Please sign in to comment.