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

[ticket/13568] Validate imagick path as readable absolute path #3359

Closed
wants to merge 8 commits into from

Conversation

marc1706
Copy link
Member

@marc1706 marc1706 commented Feb 2, 2015

@nickvergessen
Copy link
Contributor

Result is invalid for windows

@marc1706
Copy link
Member Author

marc1706 commented Feb 2, 2015

Added new validation option for absolute paths and also added functional tests for the imagick path setting.


// Absolute file path
case 'wapath':
case 'apath':
Copy link
Contributor

Choose a reason for hiding this comment

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

better useful names then short ones? 🙊

Copy link
Member Author

Choose a reason for hiding this comment

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

<nickvergessen> better use apath <nickvergessen> or absolute path

But sure, I'll use more descriptive ones

$form = $crawler->selectButton('Submit')->form(array('config[img_imagick]' => $imagick_path));

$crawler = self::submit($form);
$this->assertContains($expected, $crawler->text());
Copy link
Contributor

Choose a reason for hiding this comment

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

please use a filter

@nickvergessen
Copy link
Contributor

you need to create 2 tests and skip them if on windows/not on windows
(or 3 because of mac?)

@marc1706
Copy link
Member Author

marc1706 commented Feb 2, 2015

I'd say skip these tests if not on linux.

array('C:\Windows\system32', 'The entered path “C:\Windows\system32” does not exist.'),
array('/usr/nope', 'The entered path “/usr/nope” does not exist.'),
array('mkdir /usr/test', 'The entered path “mkdir /usr/test” does not exist.'),
array('/usr/bin/which', 'The entered path “/usr/bin/which” is not a directory.'),
Copy link
Contributor

Choose a reason for hiding this comment

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

What about a test case for . which should fail, but doesn't look like it will.

@nickvergessen
Copy link
Contributor

I'd say skip these tests if not on linux.

yes and then add another test suite that works on windows.
We want to make sure this works on IIS right?!

@marc1706
Copy link
Member Author

marc1706 commented Feb 2, 2015

Test case and unit tests that cover more paths will be added for a develop-ascraeus patch

@nickvergessen nickvergessen added this to the 3.0.14 milestone Feb 2, 2015
@marc1706
Copy link
Member Author

marc1706 commented Feb 3, 2015

Tests are passing on windows for me now.

@marc1706
Copy link
Member Author

marc1706 commented Feb 3, 2015

Test failure is due to travis having dropped the PHP 5.2 environment.

@marc1706
Copy link
Member Author

marc1706 commented Feb 5, 2015

@nickvergessen @bantu if this PR looks fine to you I'll create one based on this for ascraeus that also adds unit tests

@nickvergessen
Copy link
Contributor

yes please

@marc1706
Copy link
Member Author

marc1706 commented Feb 6, 2015

@bantu PHP 5.2 builds seem to not work again

@bantu
Copy link
Collaborator

bantu commented Feb 9, 2015

@marc1706 I have been told 5.2 is permanently gone and 5.3.3 will follow.

@nickvergessen
Copy link
Contributor

http://docs.travis-ci.com/user/build-environment-updates/2015-02-03/#PHP-VM

PHP VM

  • PHP updates: 5.4.35 → 5.4.37, 5.5.19 → 5.5.21, 5.6.3 → 5.6.5
  • HHVM 3.4.0 → 3.5.0
  • xdebug 2.2.5 → 2.2.7
  • PHP 5.2.17 is removed

@Nicofuma
Copy link
Member

Nicofuma commented Feb 9, 2015

@marc1706 marc1706 closed this Feb 13, 2015
@marc1706 marc1706 reopened this Feb 13, 2015
@Nicofuma Nicofuma closed this in b9db47e Mar 29, 2015
@Nicofuma
Copy link
Member

merged in b9db47e

@marc1706 marc1706 deleted the ticket/13568 branch March 29, 2015 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants