-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Panache - Sort properties injected in the query should be escaped somehow #1120
Comments
@FroMage I think this one should be taken care of sooner rather than later. |
@gsmet, I would to start contributing to Quarkus. Is a fix for this issue still needed ? |
yes, that'd be great. |
@FroMage, I saw the 'good first issue' tag and the issue looks interesting enough to be my first one in open source. Can you assign it to me? |
Yeah, that could work. But why do you need a |
I want to escape the column names but, unfortunately, not all databases use just double quotes for this (like MySql as an exception). And hibernate Dialect has a class that implemented the logic that I want to reuse - https://docs.jboss.org/hibernate/orm/6.2/javadocs/org/hibernate/dialect/Dialect.html#toQuotedIdentifier(java.lang.String) |
Reopening: we had to revert the fix in #38527 because it caused problems with attribute paths (containing dots, see #38521). We should try again with the same code, but maybe splitting on dots before quoting; see #38521 (comment):
|
Also, maybe we should provide a way to pass a raw string that is not quoted at all so that people can work around possible issues. |
Looks like I missed all the fun due to the timezone difference. I will re-work the solution next week. |
Currently, they are not and we could imagine a user passing the sort property from the UI to the backend leading to a potential SQL injection.
The text was updated successfully, but these errors were encountered: