The module input filtering is not strictly affected in versions 3.6 to 4.7 (for now)
// The WriteFile function writes files $ set = $ this-> Post ['sharetemp']; $ set = jstripslashes ($ set); $ file = ROOT_PATH. 'templates/default/share/sharetemp_'.{shareid.'.html '; if (! Is_dir (dirname ($ file) {jmkdir (dirname ($ file);} $ len = Load: lib ('io', 1) -> WriteFile ($ file, $ set); if (! $ Len) {die ($ file. "file cannot be written. Check whether you have the write permission. ") ;}{$ Topic_list [$ k] ['content'] = stripslashes ($ topic_list [$ k] ['content']); if ($ share ['string'] & $ share ['string']> 0) {$ topic_list [$ k] ['content'] = cut_str (strip_tags ($ topic_list [$ k] ['content']), $ share ['string'], '<a> ');}}
Include $ this-> TemplateHandler-> Template ('share/sharetemp _ '. $ ids); <directly include the content, causing Code Execution
Solution:The filter tag strictly specifies the input to modify the regular expression.