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

Reset teamId on octane #2547

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Reset teamId on octane #2547

merged 1 commit into from
Nov 9, 2023

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Nov 9, 2023

Closes #2545

@drbyte
Copy link
Collaborator

drbyte commented Nov 9, 2023

Nice refactoring. I like it.

Q:
I notice that the Spatie Multitenancy package listens on \Laravel\Octane\Events\RequestTerminated.
Is that a better spot, or are we satisfied with \Laravel\Octane\Events\OperationTerminated?

https://github.com/spatie/laravel-multitenancy/blob/a21fd5c3b686fa0a39e2651208b95000ecc9a4a5/src/MultitenancyServiceProvider.php#L38-L39

EDIT:
FWIW, I realize that I posted in #2403 the suggestion to use OperationTerminated instead of RequestTerminated.

The OperationTerminated event is an interface that is implemented by TickTerminated, TaskTerminated and RequestTerminated, which all get fired depending on the context of the application (receiving a request or executing a job/command).

... but I can't recall where I quoted that from! :D I thought it was from the Octane config.php file, but that's not it.

@erikn69
Copy link
Contributor Author

erikn69 commented Nov 9, 2023

OperationTerminated includes RequestTerminated, TaskTerminated, TickTerminated, but I don't know the scope of the others two
#2403 (comment)
#2403 (comment)

@drbyte
Copy link
Collaborator

drbyte commented Nov 9, 2023

Thanks!

@drbyte drbyte merged commit 8e584d3 into spatie:main Nov 9, 2023
22 checks passed
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.

[Octane] Potential security issue by not resetting teamId?
2 participants