Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm querying the database directly using the exp:query tag and filtering results on the value of a segment, is this safe?
How can I make it safe?
No, it is not. Using segment variables (which is user input, effectively) in a query with the Query module is generally regarded as unsafe.
You should use the Active Record plugin instead.
4 years, 8 months ago