@@ -16,6 +16,7 @@ use async_std::net::{TcpStream, ToSocketAddrs};
16
16
use async_channel:: { self as channel, bounded} ;
17
17
#[ cfg( feature = "runtime-async-std" ) ]
18
18
use async_std:: io:: { Read , Write , WriteExt } ;
19
+ use base64:: Engine as _;
19
20
use extensions:: id:: { format_identification, parse_id} ;
20
21
use extensions:: quota:: parse_get_quota_root;
21
22
use futures:: { io, Stream , StreamExt } ;
@@ -340,16 +341,20 @@ impl<T: Read + Write + Unpin + fmt::Debug + Send> Client<T> {
340
341
Response :: Continue { information, .. } => {
341
342
let challenge = if let Some ( text) = information {
342
343
ok_or_unauth_client_err ! (
343
- base64:: decode( text. as_ref( ) ) . map_err( |e| Error :: Parse (
344
- ParseError :: Authentication ( ( * text) . to_string( ) , Some ( e) )
345
- ) ) ,
344
+ base64:: engine:: general_purpose:: STANDARD
345
+ . decode( text. as_ref( ) )
346
+ . map_err( |e| Error :: Parse ( ParseError :: Authentication (
347
+ ( * text) . to_string( ) ,
348
+ Some ( e)
349
+ ) ) ) ,
346
350
self
347
351
)
348
352
} else {
349
353
Vec :: new ( )
350
354
} ;
351
355
let raw_response = & mut authenticator. process ( & challenge) ;
352
- let auth_response = base64:: encode ( raw_response) ;
356
+ let auth_response =
357
+ base64:: engine:: general_purpose:: STANDARD . encode ( raw_response) ;
353
358
354
359
ok_or_unauth_client_err ! (
355
360
self . conn. run_command_untagged( & auth_response) . await ,
0 commit comments