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

[5.3] base64_encode serialized objects before passing them to json_encode #16005

Closed
wants to merge 1 commit into from

Conversation

halaei
Copy link
Contributor

@halaei halaei commented Oct 19, 2016

In Queue::createPayload(), it is unsafe to json_encode(['command' => serialize(clone $job)]). Instead of throwing exception when json_encode is failed, we can do json_encode(['command64' => base_64(serialize(clone $job))]).

Related PR: #15284

@taylorotwell @themsaid Do you consider it as a breaking change? I tried to handle old jobs already in the queue by changing the array key from 'command' to 'command64', and handling both keys in CallQueuedHandler.

@halaei
Copy link
Contributor Author

halaei commented Oct 19, 2016

Can fix #15235

@GrahamCampbell
Copy link
Member

Breaking change surely?

@taylorotwell
Copy link
Member

People should be able to base64 their binary data themselves before putting it on the queue.

@halaei
Copy link
Contributor Author

halaei commented Oct 19, 2016 via email

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.

3 participants