-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Db manager does not correctly retrieve the ssl mode of postgreSQL connections #37479
Comments
@FERRATON can you propose a patch via PR? |
I'm sorry, I'm not familiar with the process. |
Note that I'm commenting on the patch only, I didn't investigate the original issue. I think that the patch is wrong: given the following configuration (SslDisable): connections\docker%208.4\sslmode=1 QgsDataSourceUri.SslPrefer
Out[4]: 0
QgsDataSourceUri.SslDisable
Out[6]: 1
settings.beginGroup('/PostgreSQL/connections/docker 8.4')
settings.value("sslmode", QgsDataSourceUri.SslPrefer)
Out[8]: 1 # this is the expected value
settings.enumValue("sslmode", QgsDataSourceUri.SslPrefer)
Out[9]: 0 # this is wrong! CC @3nids may know more about how this |
for me (QGIS 3.10 windows) sslmode is not stored as an integer in QGIS3.ini but for example as : settings.value("sslmode", QgsDataSourceUri.SslPrefer) return 'SslDisable' |
should be
|
Ok, so the patch looks good and we have a bug somewhere because I didn't forge |
Update: I've found from where my |
so could someone please pass the patch for ... \ db_manager \ db_plugins \ postgis \ plugin.py ? |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
@FERRATON do you mean create the pull request? |
Yes if it's possible. I don't have the experience to do it myself yet. |
If it's short, you can edit straight from GitHub website, it will create the commit and PR for you. |
Backport qgis#37479 to 3.10 LTR
Backport qgis#37479 to 3.10 LTR
All right, thank you. |
backport patch of qgis#37479
@FERRATON closing then? |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this Issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
It's all in the title!
the cause of the error is on line 87 in
...\db_manager\db_plugins\postgis\plugin.py
I suggest replacing
try:
sslmode = settings.value("sslmode", QgsDataSourceUri.SslPrefer, type=int)
except TypeError:
sslmode = QgsDataSourceUri.SslPrefer
by
sslmode = settings.enumValue("sslmode", QgsDataSourceUri.SslPrefer)
The text was updated successfully, but these errors were encountered: