ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: inter on October 23, 2016, 02:27:54 am

Title: Search engine: url param
Post by: inter on October 23, 2016, 02:27:54 am
File: C:\...\sources\admin\ManageSearch.controller.php
Url: /index.php?action=admin;area=managesearch;sa=settings

Code: [Select]
'url' => trim(Util::htmlspecialchars($_POST['engine_url'][$id], ENT_COMPAT))

htmlspecialchars replaced & symbol in my url.

Maybe better to check the url function filter_var('http://example.com', FILTER_VALIDATE_URL) ?

~ See fix example ~ (https://github.com/interlab/Elkarte/commit/baffb6cd4a6e0989cab49bb8e8cfa89be0548f48), but it is not safe  :-\
Title: Re: Search engine: url param
Post by: emanuele on October 23, 2016, 10:51:03 am
Good point...
Title: Re: Search engine: url param
Post by: emanuele on October 23, 2016, 10:52:52 am
Or in alternative un_htmlspecialchars the url before using it?

hmm... I don't remember posting the previous one... writing yes, but not posting... unless I was doing something else. meh.