Skip to content

Conversation

@soymgomez
Copy link

Add a check to use only files with .conf extension in the /configs/ folder.

Add a check to use only files with .conf extension in the /configs/ folder.
if ("." != $file && ".." != $file && ".htaccess" != $file && "index.php" != $file)
$allowed = array('conf');
$ext = pathinfo($file, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the ! is wrong here as we want to get all file which have the .conf extension. don't we?

Copy link
Contributor

@BarbarossaTM BarbarossaTM Apr 16, 2023

Choose a reason for hiding this comment

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

I guess

if (pathinfo($file, PATHINFO_EXTENSION) == "conf")

would also do the trick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants