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

Nova 2.0.1 breaks resource update #28

Closed
raphcollective opened this issue Mar 27, 2019 · 4 comments
Closed

Nova 2.0.1 breaks resource update #28

raphcollective opened this issue Mar 27, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@raphcollective
Copy link
Contributor

After updating to Nova 2.0.1 I can't update pages anymore this function call aborts with a 404.

I'm currently digging to find a solution though I don't know Nova well enough and not having a commit history obviously doesn't help. This is what the changelog states for this version:

Security: prevent escaping the CSV parsing logic when validating unique values on resource update.

I will update the issue with my findings, I'm using Laravel 5.8.8

@raphcollective
Copy link
Contributor Author

I found the culprit, since Nova 2.0.1 the InteractsWithResources trait's function resource() doesn't use the $resource parameter from the request anymore. Instead it uses the route parameter {resource} to determine the requested resource.

Below a comparison of the same line:
Nova 2.0.0 return tap(Nova::resourceForKey($this->resource), function ($resource) {
Nova 2.0.1 return tap(Nova::resourceForKey($this->route('resource')), function ($resource) {

Not sure how I can help from there as I don't think we can really override the original nova route by using a {resource} parameter on the nova-page one. If you have a clear idea on how to fix this I can do it for you, let me know.

@voidgraphics voidgraphics added the bug Something isn't working label Mar 28, 2019
@voidgraphics
Copy link
Member

Thanks for reporting, this is up high on our priority list.

@toonvandenbos
Copy link
Member

Hi @raphcollective,

Thanks for your research, it helped me resolving this issue. You rock! :)

@raphcollective
Copy link
Contributor Author

Hey @Nyratas anytime! Thanks for the quick fix, it's really appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants