Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

VIP Scanner: filter_files() now accepts arrays of file types. #266

Closed
wants to merge 2 commits into from
Closed

VIP Scanner: filter_files() now accepts arrays of file types. #266

wants to merge 2 commits into from

Conversation

emrikol
Copy link
Contributor

@emrikol emrikol commented Mar 27, 2015

This should be a solution to GitHub issue #265.

I made this change so that when searching for XSS vulnerabilities, I wouldn't have to run through two foreach ( $this->filter_files() ) blocks--one for PHP and one for HTML.

It should make scanning multiple types at once much easier.

… efficient scanning.

I made this change so that when searching for XSS vulnerabilities, I wouldn't have to run through two foreach ( $this->filter_files() ) blocks.  One for php and one for html.
It should make scanning multiple types at once much easier.
return array();
if ( $type ) {
if ( is_array( $type ) ) {
$file_types = array();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming of this variable is confusing, as we're not storing an array of file types, but rather files themselves.

…iptive of its contents.

The variable $file_types had a name that could cause confusion.  Instead of storing file types, it stores files of multiple types (if $type is an array).
I renamed it to $files_of_multiple_types to be more in line with what the variable contains.
@emrikol emrikol closed this by deleting the head repository Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants