-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fix espace query on DatabaseEngine (#1355) #1360
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Do we need the extra inverted commas? I assumed Laravel would handle that. E.g. would this work? fn ($query) => $query->whereFullText('content', '"'.$builder->query.'*"', ['mode' => 'boolean']) |
Also, could you add a test to show it working? |
No, me too ! Laravel don't espace, i needed to do before inject on whereFullText. fn ($query) => $query->whereFullText('content', '"'.$builder->query.'*"', ['mode' => 'boolean']) Works fine too. More clean But i found a new error with "@email string => Syntax error or access violation: 1064 syntax error, unexpected FTS_TERM, expecting FTS_NUMB. I had make a quick fix, but the issue is also maybe a mysql injection security report when boolean mode is active on Laravel ? I'm not found any espace on Illuminate/Database/Query/Grammars/MySqlGrammar.php The code works in any case. I think no user will use the + and - operators in their search fn ($query) => $query->whereFullText('content', '"'.$builder->query.'*"') |
@alecritson i closed accidentally this issue, oups |
This PR fix issue #1355
DatabaseEngine no longer espace query on SQL
The engine execute query without quote and generate syntax error on database server
Before
After