kwallet: fix password search for password with either a realm or authtype

even without an authtype the "?" widlcard was always added to search making
kwallet return no password for that query
This commit is contained in:
Juliane de Sartiges 2022-09-13 16:26:41 +02:00 committed by Rémi Denis-Courmont
parent daf45fefc3
commit 862c4a2d9d
1 changed files with 4 additions and 3 deletions

View File

@ -159,10 +159,9 @@ values2key( const char* const* ppsz_values, bool b_search )
vlc_memstream_printf( &ms, "*" );
/* Realm and authtype section */
if ( ppsz_values[KEY_REALM] || ppsz_values[KEY_AUTHTYPE] || b_search )
if ( ppsz_values[KEY_REALM] || ppsz_values[KEY_AUTHTYPE] )
{
vlc_memstream_printf( &ms, "?" );
vlc_memstream_printf( &ms, "\?" );
/* Realm section */
if ( ppsz_values[KEY_REALM] || b_search )
{
@ -198,6 +197,8 @@ values2key( const char* const* ppsz_values, bool b_search )
}
}
else if ( b_search )
vlc_memstream_printf( &ms, "*" );
b_state = true;