[vlc-commits] [Git][videolan/vlc][3.0.x] kwallet: fix password search for password with either a realm or authtype
    Steve Lhomme (@robUx4) 
    gitlab at videolan.org
       
    Thu Sep 22 10:20:15 UTC 2022
    
    
  
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
a4c6e997 by Juliane de Sartiges at 2022-09-19T15:28:44+02: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
(cherry picked from commit 862c4a2d9d04075f2e88c34cc011b9b06046263a)
- - - - -
1 changed file:
- modules/keystore/kwallet.c
Changes:
=====================================
modules/keystore/kwallet.c
=====================================
@@ -160,10 +160,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 )
         {
@@ -199,6 +198,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/a4c6e9973998d749e33ba15b43fc2665f9f194ba
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a4c6e9973998d749e33ba15b43fc2665f9f194ba
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