@@ -3006,6 +3006,13 @@ bool QgsAuthManager::reencryptAuthenticationConfig( const QString &authcfg, cons
3006
3006
{
3007
3007
QString configstring ( QgsAuthCrypto::decrypt ( prevpass, prevciv, query.value ( 0 ).toString () ) );
3008
3008
3009
+ if ( query.next () )
3010
+ {
3011
+ QgsDebugMsg ( QString ( " Select contains more than one for authcfg: %1" ).arg ( authcfg ) );
3012
+ emit messageOut ( tr ( " Authentication database contains duplicate configuration IDs" ), authManTag (), WARNING );
3013
+ return false ;
3014
+ }
3015
+
3009
3016
query.clear ();
3010
3017
3011
3018
query.prepare ( QString ( " UPDATE %1 "
@@ -3032,14 +3039,6 @@ bool QgsAuthManager::reencryptAuthenticationConfig( const QString &authcfg, cons
3032
3039
QgsDebugMsg ( QString ( " Reencrypt FAILED, could not find in db authcfg: %2" ).arg ( authcfg ) );
3033
3040
return false ;
3034
3041
}
3035
-
3036
- if ( query.next () )
3037
- {
3038
- QgsDebugMsg ( QString ( " Select contains more than one for authcfg: %1" ).arg ( authcfg ) );
3039
- emit messageOut ( tr ( " Authentication database contains duplicate configuration IDs" ), authManTag (), WARNING );
3040
- }
3041
-
3042
- return false ;
3043
3042
}
3044
3043
3045
3044
bool QgsAuthManager::reencryptAllAuthenticationSettings ( const QString &prevpass, const QString &prevciv )
@@ -3169,6 +3168,13 @@ bool QgsAuthManager::reencryptAuthenticationIdentity(
3169
3168
{
3170
3169
QString keystring ( QgsAuthCrypto::decrypt ( prevpass, prevciv, query.value ( 0 ).toString () ) );
3171
3170
3171
+ if ( query.next () )
3172
+ {
3173
+ QgsDebugMsg ( QString ( " Select contains more than one for identity id: %1" ).arg ( identid ) );
3174
+ emit messageOut ( tr ( " Authentication database contains duplicate identity IDs" ), authManTag (), WARNING );
3175
+ return false ;
3176
+ }
3177
+
3172
3178
query.clear ();
3173
3179
3174
3180
query.prepare ( QString ( " UPDATE %1 "
@@ -3195,15 +3201,6 @@ bool QgsAuthManager::reencryptAuthenticationIdentity(
3195
3201
QgsDebugMsg ( QString ( " Reencrypt FAILED, could not find in db identity id: %2" ).arg ( identid ) );
3196
3202
return false ;
3197
3203
}
3198
-
3199
- if ( query.next () )
3200
- {
3201
- QgsDebugMsg ( QString ( " Select contains more than one for identity id: %1" ).arg ( identid ) );
3202
- emit messageOut ( tr ( " Authentication database contains duplicate identity IDs" ), authManTag (), WARNING );
3203
- }
3204
-
3205
- return false ;
3206
-
3207
3204
}
3208
3205
3209
3206
bool QgsAuthManager::authDbOpen () const
0 commit comments