Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove disabled extensions from allowed_extensions #439

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

andrewandante
Copy link
Contributor

@andrewandante andrewandante commented Mar 10, 2021

Fixes #438

Currently the docs example doesn't work: https://docs.silverstripe.org/en/4/developer_guides/files/allowed_file_types/#file-extensions-validation

It just skips over the value and leaves the original in the list. This change removes it from the core list.

@@ -801,7 +801,7 @@ public function testRename()
public function testGetAllowedExtensions($allowedExtensions, $expected)
{
Config::modify()->set(File::class, 'allowed_extensions', $allowedExtensions);
$this->assertSame($expected, $expected);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one of the funnier things I've ever had to fix in a PR 😆

Copy link
Contributor

Choose a reason for hiding this comment

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

🙈

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

Good fix. This is probably worth putting into a patch release for order version. Can you retarget to the 1.7 branch?

@andrewandante andrewandante changed the base branch from 1 to 1.7 March 12, 2021 01:39
@andrewandante
Copy link
Contributor Author

Will do, just going to rebase 👍

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

Awesome!!! Merge on green.

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.

Can't remove entries from file allowed_extensions list
2 participants