File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ kpxcEvent.messageHandlers = {
228228 'create_new_group' : keepass . createNewGroup ,
229229 'enable_automatic_reconnect' : keepass . enableAutomaticReconnect ,
230230 'disable_automatic_reconnect' : keepass . disableAutomaticReconnect ,
231+ 'fill_http_auth' : page . fillHttpAuth ,
231232 'generate_password' : keepass . generatePassword ,
232233 'get_color_theme' : kpxcEvent . getColorTheme ,
233234 'get_connected_database' : kpxcEvent . onGetConnectedDatabase ,
Original file line number Diff line number Diff line change @@ -379,6 +379,17 @@ page.getLoginList = async function(tab) {
379379 return [ ] ;
380380} ;
381381
382+ page . fillHttpAuth = async function ( tab , credentials ) {
383+ if ( page . tabs [ tab . id ] && page . tabs [ tab . id ] . loginList . resolve ) {
384+ page . tabs [ tab . id ] . loginList . resolve ( {
385+ authCredentials : {
386+ username : credentials . login ,
387+ password : credentials . password
388+ }
389+ } ) ;
390+ }
391+ } ;
392+
382393// Update context menu for attribute filling
383394page . updateContextMenu = async function ( tab , credentials ) {
384395 // Remove any old attribute items
Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 2 ,
33 "name" : " KeePassXC-Browser" ,
4- "version" : " 1.8.5" ,
5- "version_name" : " 1.8.5" ,
4+ "version" : " 1.8.5.1 " ,
5+ "version_name" : " 1.8.5.1 " ,
66 "description" : " __MSG_extensionDescription__" ,
77 "author" : " KeePassXC Team" ,
88 "icons" : {
Original file line number Diff line number Diff line change 1919 return ;
2020 }
2121
22- if ( data . resolve ) {
23- const id = e . target . id ;
24- const creds = data . logins [ Number ( id ) ] ;
25- data . resolve ( {
26- authCredentials : {
27- username : creds . login ,
28- password : creds . password
29- }
30- } ) ;
31- }
22+ const credentials = data . logins [ Number ( e . target . id ) ] ;
23+ browser . runtime . sendMessage ( {
24+ action : 'fill_http_auth' ,
25+ args : credentials
26+ } ) ;
27+
3228 close ( ) ;
3329 } ) ;
3430 ll . appendChild ( a ) ;
4743 } ) ;
4844
4945 $ ( '#btn-dismiss' ) . addEventListener ( 'click' , async ( ) => {
50- const loginData = await getLoginData ( ) ;
51- // Using reject won't work with every browser. So return empty credentials instead.
52- if ( loginData . resolve ) {
53- loginData . resolve ( {
54- authCredentials : {
55- username : '' ,
56- password : ''
57- }
58- } ) ;
59- }
46+ // Return empty credentials
47+ browser . runtime . sendMessage ( {
48+ action : 'fill_http_auth' ,
49+ args : { login : '' , password : '' }
50+ } ) ;
51+
6052 close ( ) ;
6153 } ) ;
6254} ) ( ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " KeePassXC-Browser" ,
3- "version" : " 1.8.5" ,
3+ "version" : " 1.8.5.1 " ,
44 "description" : " KeePassXC-Browser" ,
55 "main" : " build.js" ,
66 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments