File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,14 @@ impl Encrypted {
300300 self . state = EncryptedState :: InitCompression ;
301301 } else {
302302 auth_user. clear ( ) ;
303- auth_request. methods -= MethodSet :: PASSWORD ;
303+ if let Auth :: Reject {
304+ proceed_with_methods : Some ( proceed_with_methods) ,
305+ } = auth
306+ {
307+ auth_request. methods = proceed_with_methods;
308+ } else {
309+ auth_request. methods -= MethodSet :: PASSWORD ;
310+ }
304311 auth_request. partial_success = false ;
305312 reject_auth_request ( until, & mut self . write , auth_request) . await ;
306313 }
@@ -326,7 +333,14 @@ impl Encrypted {
326333 self . state = EncryptedState :: InitCompression ;
327334 } else {
328335 auth_user. clear ( ) ;
329- auth_request. methods -= MethodSet :: NONE ;
336+ if let Auth :: Reject {
337+ proceed_with_methods : Some ( proceed_with_methods) ,
338+ } = auth
339+ {
340+ auth_request. methods = proceed_with_methods;
341+ } else {
342+ auth_request. methods -= MethodSet :: NONE ;
343+ }
330344 auth_request. partial_success = false ;
331345 reject_auth_request ( until, & mut self . write , auth_request) . await ;
332346 }
You can’t perform that action at this time.
0 commit comments