Ignore:
Timestamp:
Mar 25, 2014, 1:53:10 PM (10 years ago)
Author:
plg
Message:

merge r26825 from trunk to branch 2.5

bug 3020 and bug 3021 fixed: additionnal checks in search inputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/search.php

    r20609 r27933  
    4848      and !preg_match('/^\s*$/', $_POST['search_allwords']))
    4949  {
     50    check_input_parameter('mode', $_POST, false, '/^(OR|AND)$/');
     51   
    5052    $drop_char_match = array(
    5153      '-','^','$',';','#','&','(',')','<','>','`','\'','"','|',',','@','_',
     
    7476  {
    7577    check_input_parameter('tags', $_POST, true, PATTERN_ID);
     78    check_input_parameter('tag_mode', $_POST, false, '/^(OR|AND)$/');
    7679   
    7780    $search['fields']['tags'] = array(
     
    8689      'words' => preg_split(
    8790        '/\s+/',
    88         $_POST['search_author']
     91        strip_tags($_POST['search_author'])
    8992        ),
    9093      'mode' => 'OR',
Note: See TracChangeset for help on using the changeset viewer.