mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-30 09:16:35 +00:00
Fix security issue
This commit is contained in:
parent
2840a1401c
commit
475ebcf9e3
@ -14,6 +14,8 @@ class searchController
|
|||||||
* @url POST /user/search
|
* @url POST /user/search
|
||||||
*/
|
*/
|
||||||
public function searchDatabase(){
|
public function searchDatabase(){
|
||||||
|
user_login_required();
|
||||||
|
|
||||||
//Check if the query was specified with the request
|
//Check if the query was specified with the request
|
||||||
if(!isset($_POST['query']))
|
if(!isset($_POST['query']))
|
||||||
Rest_fatal_error(400, "Please specify search terms");
|
Rest_fatal_error(400, "Please specify search terms");
|
||||||
|
Loading…
Reference in New Issue
Block a user