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

ShouldBeEncrypted job contract not working as expected #35964

Closed
JackWH opened this issue Jan 20, 2021 · 3 comments
Closed

ShouldBeEncrypted job contract not working as expected #35964

JackWH opened this issue Jan 20, 2021 · 3 comments
Assignees

Comments

@JackWH
Copy link
Contributor

JackWH commented Jan 20, 2021

  • Laravel Version: 8.23.1
  • PHP Version: 7.4.1
  • Database Driver & Version: MariaDB 10.5.8

Description:

  • PR [8.x] Introducing Job Encryption #35527 introduced Job Encryption, and its code was tidied up later in f80f647.
  • I tried adding ShouldBeEncrypted to two separate database job classes — an event listener and a Notification — both of which implement ShouldQueue.
  • The jobs are added to the database, but the command property is not encrypted.

Steps To Reproduce:

  1. Open src/Illuminate/Queue/Queue.php in your IDE
  2. Set a breakpoint at line 154
  3. You will see that $job instanceof ShouldBeEncrypted evaluates to false, and the job is not encrypted.

The $job property appears to be an instance of Illuminate\Queue\CallQueuedHandler@call when entered in to the database. I'm not sure why this would be, as the queue handler internals are a little out of my depth... any clues would be appreciated. Thanks in advance.

@themsaid
Copy link
Member

This currently works only with jobs dispatched from the bus Job::dispatch() or dispatch(new Job). It doesn't work with events or notifications because I thought these records won't hold any sensitive data.

@driesvints
Copy link
Member

@JackWH we'll make this work with other queueables soon.

@amberlampsio
Copy link

issue was resolved here, #36036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants