Skip to content
Snippets Groups Projects
Commit e8d9a299 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #691 from greezybacon/issue/683


Don't leak private FAQ titles

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents d57dbc71 2e48d3fe
No related branches found
No related tags found
No related merge requests found
......@@ -61,18 +61,18 @@ if($_REQUEST['q'] || $_REQUEST['cid'] || $_REQUEST['topicId']) { //Search.
.' LEFT JOIN '.FAQ_CATEGORY_TABLE.' cat ON(cat.category_id=faq.category_id) '
.' LEFT JOIN '.FAQ_TOPIC_TABLE.' ft ON(ft.faq_id=faq.faq_id) '
.' WHERE faq.ispublished=1 AND cat.ispublic=1';
if($_REQUEST['cid'])
$sql.=' AND faq.category_id='.db_input($_REQUEST['cid']);
if($_REQUEST['topicId'])
$sql.=' AND ft.topic_id='.db_input($_REQUEST['topicId']);
if($_REQUEST['q']) {
$sql.=" AND question LIKE ('%".db_input($_REQUEST['q'],false)."%')
OR answer LIKE ('%".db_input($_REQUEST['q'],false)."%')
OR keywords LIKE ('%".db_input($_REQUEST['q'],false)."%')";
$sql.=" AND (question LIKE ('%".db_input($_REQUEST['q'],false)."%')
OR answer LIKE ('%".db_input($_REQUEST['q'],false)."%')
OR keywords LIKE ('%".db_input($_REQUEST['q'],false)."%'))";
}
$sql.=' GROUP BY faq.faq_id';
......
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