fix: Remove duplicate memory session creation on cron jobs#38722
Closed
juliusknorr wants to merge 1 commit intomasterfrom
Closed
fix: Remove duplicate memory session creation on cron jobs#38722juliusknorr wants to merge 1 commit intomasterfrom
juliusknorr wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: Julius Härtl <[email protected]>
come-nc
reviewed
Oct 10, 2023
Contributor
come-nc
left a comment
There was a problem hiding this comment.
I do not grasp what this is about…
git says @nickvergessen touched these lines, do you know more?
Member
|
PR was owncloud/core#18482 |
Merged
Member
|
Would it make more sense to move the explicit memory session creation to before the app loading? |
This was referenced Mar 12, 2024
Merged
Merged
Merged
Member
Author
|
Closing as I cannot reproduce the underlying issue anymore. |
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 free
to 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.
Summary
There might be scenarios (especially on previous versions where session writes do not reopen) where application code lie the encryption KeyManager still holds the previously initialized Memory session which they obtained through DI. There should be no need to close the existing one and create a new one and crypto wrappers should also be unneeded as we are storing in memory only anyways.
There is already a memory session by default which is available if no session is set manually through
OC::initSessionor the calls removed in ths PR.server/lib/private/Server.php
Line 561 in a2afc7b
TODO
Checklist