[4.0] Escape single quotes properly in postgres install file#28443
[4.0] Escape single quotes properly in postgres install file#28443wilsonge merged 3 commits intojoomla:4.0-devfrom
Conversation
|
@laoneo Please do the same changes in the update sql script |
|
@laoneo Regarding your testing instructions: Here with PostgreSQL 11 installation doesn't fail without this PR, it just gives a lot of warnings in the log file of the postgresql server. |
|
@alikon What do you prefer for PostgreSQL? Escape |
|
@laoneo P.S. regarding update sql script |
|
Update file done. |
|
well if it is a matter of what i prefer than my preference goes to |
|
Has both its advantages and disadvantages when doing a comparison between the joomla.sql files of the two database types to check if data is the same. Either you see an "E" at the beginning of a string or the additional single quote instead of a backslash in the middle of a string in the differences. |
|
I've just verified that we don't have the single quotes within strings elsewhere in sql, so we are free in our choice and don't need to be consistent with elsewhere, and I can confirm that this PR covers all occurrences. |
|
I have tested this item ✅ successfully on 59791d6 But there were lots of log entries like There are many log entries like This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28443. |
|
@laoneo For the other issue with quoting backslash which I've mentioned in my testing result: Do you want to make a PR for that, or shall I do that? |
|
Can you? |
|
I'll try, be patient. |
|
@laoneo It seems fixing the double backslash warnings would require to use the |
|
Forget my previous post, this PR here is good as it is. |
|
@laoneo add change for finder.sql file see Digital-Peak#14 |
|
I have tested this item ✅ successfully on 00e8113 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28443. |
|
we still have warning for the double/triple backslash, but matter for another pr |
|
I have tested this item ✅ successfully on 00e8113 The last change (file From my point of view this file is not really needed. Or is there a scenario in which com_finder has to be (re-)installed (normal install or discovery)? @wilsonge what do you think? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28443. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28443. |
|
@alikon For the (double) backslashes I have prepared a branch for a PR, using the That removes almost all of the warnings from the postgresql-11.log, but a few remain of which I haven't found the source yet. Maybe these come from database actions in PHP? If so, we would have a problem if we don't want to have database-specific statements (what would be a mess). So maybe we should set a session variable |
|
i was playing on the same toy as you 😄
Yeah better to chat on Glip ...... |
|
Thanks! |
Summary of Changes
The install file for postgres is invalid, single quotes are not escaped properly.
It is also possible to escape it with
(E'i\'m', 'en', 0),. What you guys prefer.Testing Instructions
Install joomla with postgres.
Expected result
Installation goes through.
Actual result
Installation fails.