Changeset 42007
- Timestamp:
- 10/24/2017 10:49:13 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r41806 r42007 654 654 655 655 /** 656 * Make sure that the file that was requested to edit, is allowed to be edited657 * 658 * Function will die if you are not allowed to edit the file 656 * Makes sure that the file that was requested to be edited is allowed to be edited. 657 * 658 * Function will die if you are not allowed to edit the file. 659 659 * 660 660 * @since 1.5.0 661 661 * 662 * @param string $file file the users is attempting to edit663 * @param array $allowed_files Array of allowed files to edit, $file must match an entry exactly662 * @param string $file File the user is attempting to edit. 663 * @param array $allowed_files Optional. Array of allowed files to edit, $file must match an entry exactly. 664 664 * @return string|null 665 665 */ -
trunk/src/wp-includes/functions.php
r41990 r42007 4239 4239 4240 4240 /** 4241 * File validates against allowed set of defined rules. 4242 * 4243 * A return value of '1' means that the $file contains either '..' or './'. A 4244 * return value of '2' means that the $file contains ':' after the first 4245 * character. A return value of '3' means that the file is not in the allowed 4246 * files list. 4241 * Validates a file name and path against an allowed set of rules. 4242 * 4243 * A return value of `1` means the file path contains directory traversal. 4244 * 4245 * A return value of `2` means the file path contains a Windows drive path. 4246 * 4247 * A return value of `3` means the file is not in the allowed files list. 4247 4248 * 4248 4249 * @since 1.2.0 4249 4250 * 4250 * @param string $file File path.4251 * @param array $allowed_files List of allowed files.4251 * @param string $file File path. 4252 * @param array $allowed_files Optional. List of allowed files. 4252 4253 * @return int 0 means nothing is wrong, greater than 0 means something was wrong. 4253 4254 */
Note: See TracChangeset
for help on using the changeset viewer.