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

.user.ini not passed the integrity check #115

Closed
hunter-nl opened this issue Jun 15, 2016 · 6 comments
Closed

.user.ini not passed the integrity check #115

hunter-nl opened this issue Jun 15, 2016 · 6 comments

Comments

@hunter-nl
Copy link

When using nginx and change .user.ini file then the code integrity check complains about a different hash value.

So when you change the following values with different values to allow bigger files to be uploaded:

upload_max_filesize=513M
post_max_size=513M

Code integrity check complains.

I think .user.ini file should not be included in the code integrity check

@MorrisJobke
Copy link
Member

cc @LukasReschke

@LukasReschke
Copy link
Member

That should actually work since a longer time. Can you post your whole .user.ini file?

// The .user.ini and the .htaccess file of ownCloud can contain some
// custom modifications such as for example the maximum upload size
// to ensure that this will not lead to false positives this will
// copy the file to a temporary folder and reset it to the default
// values.
if($filename === $this->environmentHelper->getServerRoot() . '/.htaccess'
|| $filename === $this->environmentHelper->getServerRoot() . '/.user.ini') {
if(!$copiedWebserverSettingFiles) {
$tmpFolder = rtrim($this->tempManager->getTemporaryFolder(), '/');
copy($this->environmentHelper->getServerRoot() . '/.htaccess', $tmpFolder . '/.htaccess');
copy($this->environmentHelper->getServerRoot() . '/.user.ini', $tmpFolder . '/.user.ini');
\OC_Files::setUploadLimit(
\OCP\Util::computerFileSize('513MB'),
[
'.htaccess' => $tmpFolder . '/.htaccess',
'.user.ini' => $tmpFolder . '/.user.ini',
]
);
}
}
should catch such situations.

@hunter-nl
Copy link
Author

upload_max_filesize=10G
post_max_size=10G
memory_limit=1024M
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0

I have also changed the memory_limit value.
The integrity checker produce this output:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
    - INVALID_HASH
        - .user.ini

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [.user.ini] => Array
                        (
                            [expected] => 0a557e3cdca4c2e3675deed761d79d109011dcdebbd9c7f6429f1d3476938ec95729543d7384651d1d0c48e26c5024cc5f517445920915a704ea748bdb903c5f
                            [current] => 7558302f8a5f2dccb117e5c6d9e2e4564553cad44b7edd4df7882fafe39a1f648a9dc806c4afc3cd831be42b177a531b45ddce8635757681d723dee1d37a236e
                        )

                )

        )

)

@LukasReschke
Copy link
Member

LukasReschke commented Jun 15, 2016

That explains it. Adjusting the memory limit is not supported yet. Filed feature request at #121

@nfguide
Copy link

nfguide commented Jul 24, 2019

Getting the same result after upgrade from 16.0.1 to 16.0.3.

Two different domains upgraded and same error;

Domain cld-sa
Contents of .user.ini
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'

Error:
Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • .user.ini

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[.user.ini] => Array
(
[expected] => 4843b3217e91f8536cb9b52700efb20300290292cf6286f92794d4cec99df286afeb7dd6c91b1be20bc55eda541eef230a5c5e7dcd46c189edd0ed1e80c6d3f5
[current] => ad26affa3843f3b9d31e419bfdfa9ec0052e306451c69666ad31358ff5aebd868a3ec42ab90cd838292c100de579651f6d11198b60397e7feae1252c98e4366f
)

            )

    )

)

Domain pcg
Contents of .user.ini
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
upload_max_filesize=1G
post_max_size=1G
memory_limit=512M

Error message:
Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • .user.ini

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[.user.ini] => Array
(
[expected] => 4843b3217e91f8536cb9b52700efb20300290292cf6286f92794d4cec99df286afeb7dd6c91b1be20bc55eda541eef230a5c5e7dcd46c189edd0ed1e80c6d3f5
[current] => 421779918fa61139a4d9393e62715840ec78bc7d37d7aeac81d6a38006204ad28cec0c06f63b8e770573fbd4684efa194dcabce4663c2e60a575e63ad89a3add
)

            )

    )

)

@kesselb
Copy link
Contributor

kesselb commented Jul 24, 2019

@nfguide This issue was closed over 3 years ago. Replace your .user.ini with https://github.com/nextcloud/server/blob/stable16/.user.ini. For further questions visit https://help.nextcloud.com or create a new issue.

@nextcloud nextcloud locked as resolved and limited conversation to collaborators Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants