Bug report #2296
PostGIS new connection SSLmode options in wrong order
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||12356|
The allow and require options are reversed. Allow actually is require and require is allow when sent to the PG database.
In qgsnewconnection.cpp in the constructor (about line 37) where the combobox is populated, the items must be inserted in the desired order (perhaps addItem() would be better), as the index only controls where in the list an item is inserted, not its absolute position.
The desired order as listed in the enum for SSLmode is: prefer, disable, allow, require.