Skip to content
  • David Mudrák's avatar
    de60fc23
    MDL-52727 mod_data: Improve output of the form fields values · de60fc23
    David Mudrák authored
    This issue mostly affects the search form fields. Submitted values for
    these fields are typically obtained via optional_param() with
    PARAM_NOTAGS specified as the parameter type - see parse_search_field()
    methods. Such values themselves are not safe enough to be printed back
    directly into the HTML as they might contain malicious code.
    
    While working on the patch, some other places with weak protection were
    detected and fixed.
    
    In case of the itemid parameters, explicit clean_param() is added to
    make sure we cast the value as an integer. That should make the s()
    unnecessary but it was added anyway as an extra protection (just in case
    the code flow changes or the parts of the code are re-used elsewhere).
    de60fc23
    MDL-52727 mod_data: Improve output of the form fields values
    David Mudrák authored
    This issue mostly affects the search form fields. Submitted values for
    these fields are typically obtained via optional_param() with
    PARAM_NOTAGS specified as the parameter type - see parse_search_field()
    methods. Such values themselves are not safe enough to be printed back
    directly into the HTML as they might contain malicious code.
    
    While working on the patch, some other places with weak protection were
    detected and fixed.
    
    In case of the itemid parameters, explicit clean_param() is added to
    make sure we cast the value as an integer. That should make the s()
    unnecessary but it was added anyway as an extra protection (just in case
    the code flow changes or the parts of the code are re-used elsewhere).
Loading