Coder Social home page Coder Social logo

Comments (3)

eth3lbert avatar eth3lbert commented on June 16, 2024 1

I sincerely apologize for the system disruption caused by my recent changes.

I've identified the problematic code https://github.com/eth3lbert/crates.io/blob/c4cb2b13b6790107c7d637941b9429b334998319/src/controllers/krate/search.rs#L101-L104
and https://github.com/eth3lbert/crates.io/blob/c4cb2b13b6790107c7d637941b9429b334998319/src/controllers/krate/search.rs#L310-L313 , which involves the use of the to_tsquery_with_search_config for tsquery from the diesel_full_text_search library. Reverting this specific part back to the original code should restore functionality as expected.

from crates.io.

carols10cents avatar carols10cents commented on June 16, 2024

Yeah, sorry I didn't review the original PR... the walk_ast function makes me feel really nervous in general because it sure looks like it's manipulating a raw SQL query, which is fraught with peril and injection vectors.

Is that part of the PR necessary?

from crates.io.

eth3lbert avatar eth3lbert commented on June 16, 2024

Yeah, sorry I didn't review the original PR... the walk_ast function makes me feel really nervous in general because it sure looks like it's manipulating a raw SQL query, which is fraught with peril and injection vectors.

Is that part of the PR necessary?

I believe this approach is secure because it's functionally equivalent to other uses of query. The count query is provided by the programmer, generated by Diesel, and used as a subquery within a specific location. As long as the provided query itself is secure, this method should also be secure.

from crates.io.

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.