Uh oh!
There was an error while loading. Please reload this page.
[stable24] Fix size calculation on copying the skeleton files - #35049
Merged
Conversation
otherwise the filecache will have a wrong size for skeleton files Signed-off-by: Julius Härtl <jus@bitgrid.net>
juliusknorr
requested review from
a team, PVince81, come-nc and icewind1991
and removed request for
a teamNovember 9, 2022 12:12
come-nc
approved these changes
Nov 10, 2022
icewind1991
approved these changes
Nov 10, 2022
nickvergessen
commented
Nov 18, 2022
Member
This breaks skeleton file creation for guest app users. Easily testable with running talks integration test: features/conversation/find-listed.feature:22 |
nickvergessen
commented
Nov 18, 2022
Member
{
"Exception": "OCP\\Files\\GenericFileException",
"Message": "file_put_contents failed",
"Code": 0,
"Trace": [
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/legacy/OC_Util.php",
"line": 257,
"function": "putContent",
"class": "OC\\Files\\Node\\File",
"type": "->"
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/legacy/OC_Util.php",
"line": 216,
"function": "copyr",
"class": "OC_Util",
"type": "::"
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 553,
"function": "copySkeleton",
"class": "OC_Util",
"type": "::"
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 403,
"function": "prepareUserLogin",
"class": "OC\\User\\Session",
"type": "->"
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 616,
"function": "completeLogin",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 355,
"function": "loginWithPassword",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 450,
"function": "login",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/private/User/Session.php",
"line": 575,
"function": "logClientIn",
"class": "OC\\User\\Session",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/home/nickv/Nextcloud/24/server/lib/base.php",
"line": 1081,
"function": "tryBasicAuthLogin",
"class": "OC\\User\\Session",
"type": "->"
},
{
"file": "/home/nickv/Nextcloud/24/server/ocs/v1.php",
"line": 59,
"function": "handleLogin",
"class": "OC",
"type": "::"
},
{
"file": "/home/nickv/Nextcloud/24/server/ocs/v2.php",
"line": 23,
"args": [
"/home/nickv/Nextcloud/24/server/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/home/nickv/Nextcloud/24/server/lib/private/Files/Node/File.php",
"Line": 72,
"CustomMessage": "--"
} |
This was referenced Nov 18, 2022
juliusknorr
commented
Nov 18, 2022
MemberAuthor
Strange, I've tried to debug this a bit but could not figure out why 24 would behave different yet. Overall it seems that the guests app on 24 does not trigger a failure of the newFile call. On master this properly throws a NotPermittedException which is catched and expected in the copy skeleton. To be continued. Small test script to trigger the issue directly: <?php// curl http://stable24.dev.local/playground/test.php -H 'Cookie: XDEBUG_SESSION=PHPSTORM' -u "guest@guest.com:guest@guest.com"try {
require_once__DIR__ . '/../lib/versioncheck.php';
require_once__DIR__ . '/../lib/base.php';
// v1.php
OC_App::loadApps(['session']);
OC_App::loadApps(['authentication']);
OC_App::loadApps();
if (!\OC::$server->getUserSession()->isLoggedIn()) {
OC::handleLogin(\OC::$server->getRequest());
}
$userFolder = \OC::$server->getUserFolder('guest@guest.com');
OC_Util::copySkeleton('guest@guest.com', $userFolder);
} catch (\Exception$e) {
echo'<pre>';
echoget_class($e) . PHP_EOL;
echo$e->getMessage() . PHP_EOL;
echo$e->getTraceAsString();
} |
juliusknorr
commented
Nov 18, 2022
MemberAuthor
Filed #35248 for follow up investigations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #34834