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
Conversation
Result is invalid for windows |
e12ab04
to
19421fc
Compare
Added new validation option for absolute paths and also added functional tests for the imagick path setting. |
|
||
// Absolute file path | ||
case 'wapath': | ||
case 'apath': |
There was a problem hiding this comment.
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? 🙊
There was a problem hiding this comment.
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
…ath block PHPBB3-13568
$form = $crawler->selectButton('Submit')->form(array('config[img_imagick]' => $imagick_path)); | ||
|
||
$crawler = self::submit($form); | ||
$this->assertContains($expected, $crawler->text()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use a filter
you need to create 2 tests and skip them if on windows/not on windows |
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.'), |
There was a problem hiding this comment.
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.
yes and then add another test suite that works on windows. |
PHPBB3-13568
Test case and unit tests that cover more paths will be added for a develop-ascraeus patch |
Tests are passing on windows for me now. |
Test failure is due to travis having dropped the PHP 5.2 environment. |
@nickvergessen @bantu if this PR looks fine to you I'll create one based on this for ascraeus that also adds unit tests |
yes please |
@bantu PHP 5.2 builds seem to not work again |
@marc1706 I have been told 5.2 is permanently gone and 5.3.3 will follow. |
http://docs.travis-ci.com/user/build-environment-updates/2015-02-03/#PHP-VM
|
merged in b9db47e |
Ticket: https://tracker.phpbb.com/browse/PHPBB3-13568