Is it safe to add just some code?
-
Hello,
I found a snippet online. I added it with success. This is the code. (had to add it to the functions.php in a child theme). What it does, is giving the contributor role the possibility to upload files.
//Allow Contributors to Upload Media if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads'); function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); }
How can I be sure the uploaded file + data ( around 7 input fields for data in the attachment section of the media library) are properly, filtered, sanitized and or validated?
What happens after the upload; are the data always dragged through all the essential filters? And how can I check this?
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Is it safe to add just some code?’ is closed to new replies.