Skip to content

Disable open_basedir on Ubuntu 20.04#140

Closed
phil-davis wants to merge 1 commit into
masterfrom
disable-open_basedir
Closed

Disable open_basedir on Ubuntu 20.04#140
phil-davis wants to merge 1 commit into
masterfrom
disable-open_basedir

Conversation

@phil-davis

@phil-davis phil-davis commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

https://github.com/owncloud/core/blob/master/lib/private/LargeFileHelper.php#L115 getFileSizeViaCurl() requires that open_basedir is not set (is the empty string).

In Ubuntu 20.04 with PHP 7.4 php.ini sets it by default. That causes some unit tests to fail in owncloud/core#39460:

1) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #0 ('/drone/src/tests/data/lorem.txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53

2) Test\LargeFileHelperGetFileSizeTest::testGetFileSizeViaCurl with data set #1 ('/drone/src/tests/data/strängé...2).txt', 446)
Failed asserting that null is identical to 446.

/drone/src/tests/lib/LargeFileHelperGetFileSizeTest.php:53

This PR sets open_basedir to the empty string, like it was in Ubuntu 18.04.

@phil-davis phil-davis self-assigned this Nov 8, 2021
@phil-davis
phil-davis requested review from micbar and xoxys November 8, 2021 12:48
@phil-davis

Copy link
Copy Markdown
Contributor Author

I am not really familiar with the way all this overlay stuff works. Is this the right way to change a php.ini setting?

@phil-davis
phil-davis removed request for micbar and xoxys November 8, 2021 13:13
@phil-davis

Copy link
Copy Markdown
Contributor Author

Still digging into this - this may not be required.

@phil-davis

Copy link
Copy Markdown
Contributor Author

The unit test problem is something different - closing this.

@phil-davis phil-davis closed this Nov 8, 2021
@phil-davis
phil-davis deleted the disable-open_basedir branch November 8, 2021 14:08
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.

1 participant