-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 ILIKE REGEXP workaround on oracle #26672
Conversation
0d099da
to
95375f9
Compare
95375f9
to
151db8e
Compare
These won't work: $statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(REGEXP_REPLACE(?, \'([\\*+?|^$.[\](){}])\', \'\\\1\'), \'%\', \'.*\') || \'$\', \'i\')', $statement); // ORA-12726: unmatched bracket in regular expression
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(REGEXP_REPLACE(?, \'(\]|[\\*+?|^$.[(){}])\', \'\\\1\'), \'%\', \'.*\') || \'$\', \'i\')', $statement); // ORA-12726: unmatched bracket in regular expression because ... oracle ... for reference see
|
656247b
to
c9f6040
Compare
7a93e67
to
70ac9d3
Compare
@DeepDiver1975 do we know why jenkins sometimes fails with
after successfully running the php testsuite? |
Afaik this warning is not causing the break .... at least not in the past |
70ac9d3
to
e59915e
Compare
e59915e
to
b288fff
Compare
|
unfinished, moving to backlog until there is time |
needs conflict resolution |
1548009
to
6bd1e61
Compare
Codecov Report
@@ Coverage Diff @@
## master #26672 +/- ##
==========================================
Coverage 62.63% 62.63%
- Complexity 18255 18416 +161
==========================================
Files 1145 1145
Lines 68472 68472
Branches 1234 1234
==========================================
Hits 42890 42890
Misses 25221 25221
Partials 361 361
Continue to review full report at Codecov.
|
Needs rebase.
We have made Provisioning V2 tests as well as Provisioning V1. There are now 2 suites - Between git and drone they are too stupid and do not run your code from the point on |
45fa905
to
7d9da2d
Compare
switched from
|
@ownclouders rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
Automated rebase with GitMate.io was successful! 🎉 |
7d9da2d
to
384eed3
Compare
backport? |
to oc10, yes. will do |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Analysis
It seems doctrine does not escape the regex parameter. An ILIKE becomes REGEXP_LIKE in https://github.com/owncloud/core/blob/master/lib/private/DB/AdapterOCI8.php#L44 or https://github.com/owncloud/core/blob/master/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php#L161
The only ILIKE in OC\Files\Cache\Cache is https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php#L595
and the search pattern is normalized in https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php#L833:
Conclusion
add tests containingtracked in add tests containing[
and]
in path names and search patterns forsearch()
[
and]
in path names and search patterns forsearch()
#31394to fix escape regex chars on oracle?no longer using regexcheck other usages of ILIKE:no longer neededhttps://github.com/owncloud/core/blob/master/lib/private/Repair/RepairMimeTypes.php#L102https://github.com/owncloud/core/blob/master/apps/dav/lib/CardDAV/CardDavBackend.php#L778