[vlc-commits] [Git][videolan/vlc][master] kwallet: fix password search for password with either a realm or authtype

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Sep 17 13:57:21 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
862c4a2d by Juliane de Sartiges at 2022-09-17T13:45:53+00:00
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

- - - - -


1 changed file:

- modules/keystore/kwallet.c


Changes:

=====================================
modules/keystore/kwallet.c
=====================================
@@ -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;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/862c4a2d9d04075f2e88c34cc011b9b06046263a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/862c4a2d9d04075f2e88c34cc011b9b06046263a
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list