GithubHelp home page GithubHelp logo

Comments (3)

johnbillion avatar johnbillion commented on June 23, 2024

I know how annoying this is, but this really isn't a problem with Extended CPTs and should be fixed in the plugins that are not returning an array from this filter. If a plugin can't trust other plugins to return the correct type from a filter then all hope is lost and every callback for every filter should perform a type safety check as a guard condition.

Do you know which plugins are affected? I'm happy to speak with the authors and advise on corrective measures.

from extended-cpts.

Mte90 avatar Mte90 commented on June 23, 2024

Well in our issues we saw developers and plugins so I report when I found it, the problem is when they get a fatal error and blame us...
It is not possible to do a function that wrap the filter and check the input?

This issues are blocking us to use the library in premium plugins and not just on custom plugins where I know the environment plugin.

I want to avoid people that creates tickets or reach us on every social or email just to report a fatal error (because happens in those cases) on upgrading our plugin because I switched to the main repo.

from extended-cpts.

johnbillion avatar johnbillion commented on June 23, 2024

Right, but this is papering over the issue instead of addressing the root cause, which is a bug in some code elsewhere.

This happened a few times with my User Switching plugin (which also uses type hinted parameters for filter callbacks) and it ultimately helped two users discover a security vulnerability in other plugins that were returning null from user capability filters. The PHP warnings had gone ignored.

Like I said, I'm happy to take a look at any plugins or themes that return an invalid type from this filter and help them fix it, but fixing this in Extended CPTs isn't the right place.

from extended-cpts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.